You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/cognitive-services/LUIS/get-started-portal-build-app.md
+2-3Lines changed: 2 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: "Quickstart: Create a new app in the LUIS portal"
3
3
description: In this quickstart, you create the basic parts of an app, intents, and entities as well as test with sample utterance in the LUIS portal.
4
4
ms.topic: quickstart
5
-
ms.date: 03/24/2020
5
+
ms.date: 04/14/2020
6
6
#Customer intent: As a new user, I want to quickly get a LUIS app created in the LUIS portal so I can understand the different models of intent, entity, and example utterances.
7
7
---
8
8
@@ -84,13 +84,12 @@ Add the following 15 example utterances to the `FindForm` intent.
84
84
By design, these example utterances vary in the following ways:
To return the form number in the runtime prediction response, the form must be marked as an entity. Because the form number text is highly structured, you can mark it using a regular expression entity. Create the entity with the following steps:
Copy file name to clipboardExpand all lines: articles/cognitive-services/LUIS/includes/do-not-use-too-few-utterances.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,11 +6,11 @@ author: diberry
6
6
manager: nitinme
7
7
ms.custom: seodec18
8
8
ms.service: cognitive-services
9
-
ms.date: 02/14/2020
9
+
ms.date: 04/14/2020
10
10
ms.subservice: language-understanding
11
11
ms.topic: include
12
12
ms.custom: include file
13
13
ms.author: diberry
14
14
---
15
15
16
-
These few utterances are for demonstration purposes only. A real-world app should have at least 15 utterances of varying length, word order, tense, grammatical correctness, punctuation, and word count.
16
+
These few utterances are for demonstration purposes only. A real-world app should have at least 15 utterances of varying length, word order, tense, grammatical correctness, [punctuation](../luis-reference-application-settings.md#punctuation-normalization), and word count.
Copy file name to clipboardExpand all lines: articles/cognitive-services/LUIS/label-entity-example-utterance.md
+5-8Lines changed: 5 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,8 @@
1
1
---
2
2
title: Label entity example utterance
3
-
titleSuffix: Azure Cognitive Services
4
3
description: Learn how to label a machine-learned entity with subcomponents in an example utterance in an intent detail page of the LUIS portal.
5
-
services: cognitive-services
6
-
author: diberry
7
-
manager: nitinme
8
-
ms.service: cognitive-services
9
-
ms.subservice: language-understanding
10
4
ms.topic: conceptual
11
-
ms.date: 12/16/2019
12
-
ms.author: diberry
5
+
ms.date: 04/14/2020
13
6
#Customer intent: As a new user, I want to label a machine-learned entity in an example utterance.
14
7
---
15
8
@@ -84,6 +77,10 @@ Entity roles are labeled using the entity palette.
84
77
1. Move to the **Entity inspector**, and either select an existing role or create a new role.
85
78
1. In the example utterance text, label the text with the entity role.
86
79
80
+
## Labeling for punctuation
81
+
82
+
You do not need to label for punctuation. Use [application settings](luis-reference-application-settings.md) to control if punctuation impacts utterance predictions.
83
+
87
84
## Unlabel entities
88
85
89
86
To unlabel an entity, select the entity name underneath the text and select **Unlabel**. If the entity you are trying to unlabel has labeled subcomponents, then the subcomponents must be unlabeled first.
Copy file name to clipboardExpand all lines: articles/cognitive-services/LUIS/luis-concept-best-practices.md
+32-64Lines changed: 32 additions & 64 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,28 +1,21 @@
1
1
---
2
2
title: Best practices for building your LUIS app
3
-
titleSuffix: Azure Cognitive Services
4
3
description: Learn the best practices to get the best results from your LUIS app's model.
5
-
services: cognitive-services
6
-
author: diberry
7
-
manager: nitinme
8
-
ms.custom: seodec18
9
-
ms.service: cognitive-services
10
-
ms.subservice: language-understanding
11
4
ms.topic: conceptual
12
-
ms.date: 10/25/2019
5
+
ms.date: 04/14/2020
13
6
ms.author: diberry
14
7
---
15
8
# Best practices for building a language understanding (LUIS) app
16
-
Use the app authoring process to build your LUIS app:
9
+
Use the app authoring process to build your LUIS app:
17
10
18
11
* Build language models (intents and entities)
19
12
* Add a few training example utterances (15-30 per intent)
20
13
* Publish to endpoint
21
-
* Test from endpoint
14
+
* Test from endpoint
22
15
23
-
Once your app is [published](luis-how-to-publish-app.md), use the development lifecycle to add features, publish, and test from endpoint. Do not begin the next authoring cycle by adding more example utterances because that does not let LUIS learn your model with real-world user utterances.
16
+
Once your app is [published](luis-how-to-publish-app.md), use the development lifecycle to add features, publish, and test from endpoint. Do not begin the next authoring cycle by adding more example utterances because that does not let LUIS learn your model with real-world user utterances.
24
17
25
-
Do not expand the utterances until the current set of both example and endpoint utterances are returning confident, high prediction scores. Improve scores using [active learning](luis-concept-review-endpoint-utterances.md).
18
+
Do not expand the utterances until the current set of both example and endpoint utterances are returning confident, high prediction scores. Improve scores using [active learning](luis-concept-review-endpoint-utterances.md).
26
19
27
20
28
21
@@ -43,7 +36,7 @@ The following list includes best practices for LUIS apps:
43
36
## Do define distinct intents
44
37
Make sure the vocabulary for each intent is just for that intent and not overlapping with a different intent. For example, if you want to have an app that handles travel arrangements such as airline flights and hotels, you can choose to have these subject areas as separate intents or the same intent with entities for specific data inside the utterance.
45
38
46
-
If the vocabulary between two intents is the same, combine the intent, and use entities.
39
+
If the vocabulary between two intents is the same, combine the intent, and use entities.
47
40
48
41
Consider the following example utterances:
49
42
@@ -52,20 +45,20 @@ Consider the following example utterances:
52
45
|Book a flight|
53
46
|Book a hotel|
54
47
55
-
`Book a flight` and `Book a hotel` use the same vocabulary of `book a `. This format is the same so it should be the same intent with the different words of `flight` and `hotel` as extracted entities.
48
+
`Book a flight` and `Book a hotel` use the same vocabulary of `book a `. This format is the same so it should be the same intent with the different words of `flight` and `hotel` as extracted entities.
56
49
57
50
## Do add descriptors to intents
58
51
59
-
Descriptors help describe features for an intent. A descriptor can be a phrase list of words that are significant to that intent or an entity that is significant to that intent.
52
+
Descriptors help describe features for an intent. A descriptor can be a phrase list of words that are significant to that intent or an entity that is significant to that intent.
60
53
61
54
## Do find sweet spot for intents
62
-
Use prediction data from LUIS to determine if your intents are overlapping. Overlapping intents confuse LUIS. The result is that the top scoring intent is too close to another intent. Because LUIS does not use the exact same path through the data for training each time, an overlapping intent has a chance of being first or second in training. You want the utterance's score for each intention to be farther apart so this flip/flop doesn't happen. Good distinction for intents should result in the expected top intent every time.
63
-
55
+
Use prediction data from LUIS to determine if your intents are overlapping. Overlapping intents confuse LUIS. The result is that the top scoring intent is too close to another intent. Because LUIS does not use the exact same path through the data for training each time, an overlapping intent has a chance of being first or second in training. You want the utterance's score for each intention to be farther apart so this flip/flop doesn't happen. Good distinction for intents should result in the expected top intent every time.
56
+
64
57
<aname="#do-build-the-app-iteratively"></a>
65
58
66
59
## Do build your app iteratively with versions
67
60
68
-
Each authoring cycle should be within a new [version](luis-concept-version.md), cloned from an existing version.
61
+
Each authoring cycle should be within a new [version](luis-concept-version.md), cloned from an existing version.
69
62
70
63
## Do build for model decomposition
71
64
@@ -76,58 +69,33 @@ Model decomposition has a typical process of:
76
69
* label top-level data concept in example utterance
77
70
* break data concept into subcomponents
78
71
* add descriptors (features) to subcomponents
79
-
* add descriptors (features) to intent
72
+
* add descriptors (features) to intent
80
73
81
-
Once you have created the intent and added example utterances, the following example describes entity decomposition.
74
+
Once you have created the intent and added example utterances, the following example describes entity decomposition.
82
75
83
-
Start by identifying complete data concepts you want to extract in an utterance. This is your machine-learned entity. Then decompose the phrase into its parts. This includes identifying subcomponents (as entities), along with descriptors and constraints.
76
+
Start by identifying complete data concepts you want to extract in an utterance. This is your machine-learned entity. Then decompose the phrase into its parts. This includes identifying subcomponents (as entities), along with descriptors and constraints.
84
77
85
-
For example if you want to extract an address, the top machine-learned entity could be called `Address`. While creating the address, identify some of its subcomponents such as street address, city, state, and postal code.
78
+
For example if you want to extract an address, the top machine-learned entity could be called `Address`. While creating the address, identify some of its subcomponents such as street address, city, state, and postal code.
86
79
87
80
Continue decomposing those elements by **constraining** the postal code to a regular expression. Decompose the street address into parts of a street number (using a prebuilt number), a street name, and a street type. The street type can be described with a **descriptor** list such as avenue, circle, road, and lane.
88
81
89
-
The V3 authoring API allows for model decomposition.
82
+
The V3 authoring API allows for model decomposition.
90
83
91
84
## Do add patterns in later iterations
92
85
93
-
You should understand how the app behaves before adding [patterns](luis-concept-patterns.md) because patterns are weighted more heavily than example utterances and will skew confidence.
94
-
95
-
Once you understand how your app behaves, add patterns as they apply to your app. You do not need to add them with each [iteration](luis-concept-app-iteration.md).
96
-
97
-
There is no harm adding them in the beginning of your model design but it is easier to see how each pattern changes the model after the model is tested with utterances.
98
-
99
-
<!--
100
-
101
-
### Phrase lists
102
-
103
-
[Phrase lists](luis-concept-feature.md) allow you to define dictionaries of words related to your app domain. Seed your phrase list with a few words then use the suggest feature so LUIS knows about more words in the vocabulary specific to your app. A Phrase List improves intent detection and entity classification by boosting the signal associated with words or phrases that are significant to your app.
104
-
105
-
Don't add every word to the vocabulary since the phrase list isn't an exact match.
106
-
107
-
For more information:
108
-
* Concept: [Phrase list features in your LUIS app](luis-concept-feature.md)
109
-
* How-to: [Use phrase lists to boost signal of word list](luis-how-to-add-features.md)
110
-
111
-
112
-
113
-
### Patterns
114
-
115
-
Real user utterances from the endpoint, very similar to each other, may reveal patterns of word choice and placement. The [pattern](luis-concept-patterns.md) feature takes this word choice and placement along with regular expressions to improve your prediction accuracy. A regular expression in the pattern allows for words and punctuation you intend to ignore while still matching the pattern.
86
+
You should understand how the app behaves before adding [patterns](luis-concept-patterns.md) because patterns are weighted more heavily than example utterances and will skew confidence.
116
87
117
-
Use pattern's [optional syntax](luis-concept-patterns.md) for punctuation so punctuation can be ignored. Use the [explicit list](luis-concept-patterns.md#explicit-lists) to compensate for pattern.any syntax issues.
88
+
Once you understand how your app behaves, add patterns as they apply to your app. You do not need to add them with each [iteration](luis-concept-app-iteration.md).
* How-to: [How to add Patterns to improve prediction accuracy](luis-how-to-model-intent-pattern.md)
122
-
-->
90
+
There is no harm adding them in the beginning of your model design but it is easier to see how each pattern changes the model after the model is tested with utterances.
In order for LUIS predictions to be accurate, the quantity of example utterances in each intent (except for the None intent), must be relatively equal.
96
+
In order for LUIS predictions to be accurate, the quantity of example utterances in each intent (except for the None intent), must be relatively equal.
129
97
130
-
If you have an intent with 100 example utterances and an intent with 20 example utterances, the 100-utterance intent will have a higher rate of prediction.
98
+
If you have an intent with 100 example utterances and an intent with 20 example utterances, the 100-utterance intent will have a higher rate of prediction.
131
99
132
100
## Do add example utterances to None intent
133
101
@@ -139,49 +107,49 @@ Use [active learning](luis-how-to-review-endpoint-utterances.md)'s **Review endp
139
107
140
108
## Do monitor the performance of your app
141
109
142
-
Monitor the prediction accuracy using a [batch test](luis-concept-batch-test.md) set.
110
+
Monitor the prediction accuracy using a [batch test](luis-concept-batch-test.md) set.
143
111
144
-
Keep a separate set of utterances that aren't used as [example utterances](luis-concept-utterance.md) or endpoint utterances. Keep improving the app for your test set. Adapt the test set to reflect real user utterances. Use this test set to evaluate each iteration or version of the app.
112
+
Keep a separate set of utterances that aren't used as [example utterances](luis-concept-utterance.md) or endpoint utterances. Keep improving the app for your test set. Adapt the test set to reflect real user utterances. Use this test set to evaluate each iteration or version of the app.
145
113
146
114
## Don't add many example utterances to intents
147
115
148
-
After the app is published, only add utterances from active learning in the development lifecycle process. If utterances are too similar, add a pattern.
116
+
After the app is published, only add utterances from active learning in the development lifecycle process. If utterances are too similar, add a pattern.
149
117
150
118
## Don't use few or simple entities
151
119
152
-
Entities are built for data extraction and prediction. It is important that each intent have machine-learned entities that describe the data in the intent. This helps LUIS predict the intent, even if your client application doesn't need to use the extracted entity.
120
+
Entities are built for data extraction and prediction. It is important that each intent have machine-learned entities that describe the data in the intent. This helps LUIS predict the intent, even if your client application doesn't need to use the extracted entity.
153
121
154
122
## Don't use LUIS as a training platform
155
123
156
-
LUIS is specific to a language model's domain. It isn't meant to work as a general natural language training platform.
124
+
LUIS is specific to a language model's domain. It isn't meant to work as a general natural language training platform.
157
125
158
126
## Don't add many example utterances of the same format, ignoring other formats
159
127
160
-
LUIS expects variations in an intent's utterances. The utterances can vary while having the same overall meaning. Variations can include utterance length, word choice, and word placement.
128
+
LUIS expects variations in an intent's utterances. The utterances can vary while having the same overall meaning. Variations can include utterance length, word choice, and word placement.
161
129
162
130
|Don't use same format|Do use varying format|
163
131
|--|--|
164
132
|Buy a ticket to Seattle<br>Buy a ticket to Paris<br>Buy a ticket to Orlando|Buy 1 ticket to Seattle<br>Reserve two seats on the red eye to Paris next Monday<br>I would like to book 3 tickets to Orlando for spring break|
165
133
166
-
The second column uses different verbs (buy, reserve, book), different quantities (1, two, 3), and different arrangements of words but all have the same intention of purchasing airline tickets for travel.
134
+
The second column uses different verbs (buy, reserve, book), different quantities (1, two, 3), and different arrangements of words but all have the same intention of purchasing airline tickets for travel.
167
135
168
136
## Don't mix the definition of intents and entities
169
137
170
-
Create an intent for any action your bot will take. Use entities as parameters that make that action possible.
138
+
Create an intent for any action your bot will take. Use entities as parameters that make that action possible.
171
139
172
-
For a bot that will book airline flights, create a **BookFlight** intent. Do not create an intent for every airline or every destination. Use those pieces of data as [entities](luis-concept-entity-types.md) and mark them in the example utterances.
140
+
For a bot that will book airline flights, create a **BookFlight** intent. Do not create an intent for every airline or every destination. Use those pieces of data as [entities](luis-concept-entity-types.md) and mark them in the example utterances.
173
141
174
142
## Don't create descriptors with all the possible values
175
143
176
-
Provide a few examples in the descriptor [phrase lists](luis-concept-feature.md) but not every word. LUIS generalizes and takes context into account.
144
+
Provide a few examples in the descriptor [phrase lists](luis-concept-feature.md) but not every word. LUIS generalizes and takes context into account.
177
145
178
146
## Don't add many patterns
179
147
180
148
Don't add too many [patterns](luis-concept-patterns.md). LUIS is meant to learn quickly with fewer examples. Don't overload the system unnecessarily.
181
149
182
150
## Don't train and publish with every single example utterance
183
151
184
-
Add 10 or 15 utterances before training and publishing. That allows you to see the impact on prediction accuracy. Adding a single utterance may not have a visible impact on the score.
152
+
Add 10 or 15 utterances before training and publishing. That allows you to see the impact on prediction accuracy. Adding a single utterance may not have a visible impact on the score.
0 commit comments