Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Cross train cornet cases #2520

@boydc2014

Description

@boydc2014

Describe the bug

Current cross train design only cover the happy path that assume intent trigger and only intent trigger will followed by one or more begin dialog action.

There are a few cases don't meet this assumption and thus not working as expected.

  1. beginDialog in OnBeginDialog trigger

Example:
Main.dialog have 2 triggers
OnBeginDialog, in this trigger, it directly started a dialog called DialogA
OnIntent(Name=IntentB) trigger, in this trigger, started a dialog called DialogB

So Main.lu looks like

# IntentB
utterance for IntentB

The issue is that for dialogA.lu, we should cross train IntentB into dialogA.lu's _interruption intent.

which means in the config used, we should allow trigger key as "empty", such as

{
  "Main.lu":
   {
     "": ["dialogA.lu"],     // we previously assume key can't be empty
     "IntentB": ["dialogB.lu"],
   }
}
  1. no beginDialog action in OnIntent trigger

Example:
Main.dialog have 2 triggers
OnIntent(Name=IntentA) in this trigger, started a dialog called DialogA
OnIntent(Name=IntentB) in this trigger, just an SendActivity action

Main.lu will be

#IntentA
utterance for IntentA

#IntentB
utterance for IntentB

The issue is, for dialogA.lu, i think IntentB should goes into _interruption after cross train. So the config we will support is

{
  "Main.lu":
   {
     "IntentA" : ["dialogA.lu"],    
     "IntentB": [],  // we previously assume key must have a dialog
   }
}
  1. Local intent should not be cross-trained

Here by local intent, i mean those intents created with Inputs, I think today the library will bring local intents into _Interruption.

Example
Main.dialog have 3 trigge
OnBeginDialog, in this trigger, it has a TextInput which created a local intent (Inputs.TextInput.123)
OnIntent(Name=IntentA) in this trigger, started a dialog called DialogA
OnIntent(Name=IntentB) in this trigger, started a dialog called DialogB

In this case, I think today's implementation will bring Inputs.TextInput.123 into dialogA.lu's _intteruption intent, which i don't think it's right, because i assume what's goes into _interruption should only be trigger phrases, so that i can be correctly dispatched again when bubbling up. Otherwise, even we hit _interruption in children and buble up, it won't match.

So the proposed fix is to let cross train library only care about trigger intents. Leave local intents alone. As a library, it just means the library will only touch the intent listed in config, since we will support [] as target, that will work when someone just want to include certain intent.

{
  "Main.lu":
   {
     "IntentA" : ["dialogA.lu"],   // dialogA.lu only cross-pick from IntentB/C
     "IntentB" : [],
     "IntentC" => ...
   }
}

Metadata

Metadata

Assignees

Labels

R9Release 9 - May 15th, 2020Type: BugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions