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

Commit b22d577

Browse files
vishwacsenaVishwac Sena Kannan
andauthored
docs (#856)
Co-authored-by: Vishwac Sena Kannan <[email protected]>
1 parent 5d7dd80 commit b22d577

File tree

4 files changed

+117
-0
lines changed

4 files changed

+117
-0
lines changed

packages/luis/docs/cross-train.png

52.3 KB
Loading
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# `luis:cross-train`
2+
Cross-train writes out updated .lu files that contain cross-trained `_interruption` as well as `DeferToRecognizer` intent.
3+
4+
Cross-train is required to use the [CrossTrainedRecognizerSet][1] available as part of [adaptive dialogs][2] as well as if you are looking or CI/CD support for [Composer][3] generated bots.
5+
6+
## What is cross-train?
7+
With [adaptive dialog][2], you now have the ability to use one [LUIS.ai][4] application per dialog. Cross train command supports this by adding an `_Interruption` intent for each child LUIS application for your bot that has the trigger utterances from all other siblings to that child.
8+
9+
<img src="./cross-train.png" />
10+
11+
In cases where you are taking advantage of [CrossTrainedRecognizerSet][1], cross train command also sets up a `DeferToRecognizer_QnA_DialogName` with questions from [.qna files][5] automatically pulled in for any dialog.
12+
13+
## Usage
14+
15+
```bash
16+
> bf luis:cross-train --in <source .lu files> --out <output folder> --config <cross-train configuration>
17+
```
18+
19+
A cross-train configuration is necessary for the command to work. Here is an example cross-train configuration
20+
21+
```jsonc
22+
{
23+
// list each .lu file including variations per lang x locale.
24+
// Lang x locale is denoted using 4 letter code. e.g. it-it, fr-fr
25+
// Paths can either be absolute (full) paths or paths relative to this config file.
26+
"./RootDialog/RootDialog.lu": {
27+
// indicate if this is an .lu file for a root dialog.
28+
"rootDialog": true,
29+
// list of trigers within that dialog
30+
"triggers": {
31+
// Key is name of intent within the .lu file (in this case RootDialog.lu)
32+
// Value is the path to the child dialog's .lu file.
33+
"AddItem": "./AddToDoDialog/AddToDoDialog.lu",
34+
"DeleteItem": "./DeleteToDoDialog/DeleteToDoDialog.lu",
35+
"ViewItem": "./ViewToDoDialog/ViewToDoDialog.lu",
36+
"GetUserProfile": "./GetUserProfileDialog/GetUserProfileDialog.lu"
37+
}
38+
}
39+
}
40+
```
41+
42+
## Related commands
43+
You might find these additional commands relevant/ helpful -
44+
45+
- [bf luis:build][6]
46+
- [bf qnamaker:cross-train][7]
47+
- [bf qnamaker:build][8]
48+
49+
[1]:https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-concept-adaptive-dialog-recognizers?view=azure-bot-service-4.0#cross-trained-recognizer-set
50+
[2]:https://aka.ms/adaptive-dialogs
51+
[3]:https://aka.ms/composer
52+
[4]:https://luis.ai
53+
[5]:https://aka.ms/qna-file-format
54+
[6]:./using-luis-build.md
55+
[7]:../../qnamaker/docs/using-cross-train-command.md
56+
[8]:../../qnamaker/using-qnamaker-build.md
84.3 KB
Loading
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# `qnamaker:cross-train`
2+
Cross-train writes out updated .qna files that contain cross-trained `DeferToRecognizer` QnA pair.
3+
4+
Cross-train is required to use the [CrossTrainedRecognizerSet][1] available as part of [adaptive dialogs][2] as well as if you are looking or CI/CD support for [Composer][3] generated bots.
5+
6+
## What is cross-train?
7+
With [adaptive dialog][2], you now have the ability to author one or more [.qna file][5] file per dialog. Cross train command supports this by analyzing your cross-train configuration and does the following:
8+
- Automatically adds a `dialogName = <dialogName>` meta data filter to each QnA pair
9+
- Adds one or QnA pairs that pull utterances from .lu content (if any) with answer `intent=DeferToRecognizer_LUIS_DialogName`.
10+
11+
Both these are necessary for cross-trained recognizer to work.
12+
13+
<img src="./cross-train.png" />
14+
15+
In cases where you are taking advantage of [CrossTrainedRecognizerSet][1], cross train command also sets up a `_interruption` intent with cross trained uttrances for your interruptions. See [here][10] to learn more.
16+
17+
## Usage
18+
19+
```bash
20+
> bf qnamaker:cross-train --in <source .lu files> --out <output folder> --config <cross-train configuration>
21+
```
22+
23+
A cross-train configuration is necessary for the command to work. Here is an example cross-train configuration
24+
25+
```jsonc
26+
{
27+
// list each .lu file including variations per lang x locale.
28+
// Lang x locale is denoted using 4 letter code. e.g. it-it, fr-fr
29+
// Paths can either be absolute (full) paths or paths relative to this config file.
30+
"./RootDialog/RootDialog.lu": {
31+
// indicate if this is an .lu file for a root dialog.
32+
"rootDialog": true,
33+
// list of trigers within that dialog
34+
"triggers": {
35+
// Key is name of intent within the .lu file (in this case RootDialog.lu)
36+
// Value is the path to the child dialog's .lu file.
37+
"AddItem": "./AddToDoDialog/AddToDoDialog.lu",
38+
"DeleteItem": "./DeleteToDoDialog/DeleteToDoDialog.lu",
39+
"ViewItem": "./ViewToDoDialog/ViewToDoDialog.lu",
40+
"GetUserProfile": "./GetUserProfileDialog/GetUserProfileDialog.lu"
41+
}
42+
}
43+
}
44+
```
45+
46+
## Related commands
47+
You might find these additional commands relevant/ helpful -
48+
49+
- [bf qnamaker:build][6]
50+
- [bf luis:cross-train][7]
51+
- [bf luis:build][8]
52+
53+
[1]:https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-concept-adaptive-dialog-recognizers?view=azure-bot-service-4.0#cross-trained-recognizer-set
54+
[2]:https://aka.ms/adaptive-dialogs
55+
[3]:https://aka.ms/composer
56+
[4]:https://luis.ai
57+
[5]:https://aka.ms/qna-file-format
58+
[6]:./using-qnamaker-build.md
59+
[7]:../../luis/docs/using-cross-train-command.md
60+
[8]:../../luis/using-luis-build.md
61+
[10]:../../luis/docs/using-cross-train-command.md

0 commit comments

Comments
 (0)