Skip to content

Commit bf90454

Browse files
committed
edits
1 parent 7cc3041 commit bf90454

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

articles/cognitive-services/LUIS/luis-concept-entity-types.md

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,23 @@ Machine-learned entities learn from context in the utterance. This makes variati
109109

110110
## Non-machine-learned entities don't use context
111111

112-
Non-machine learned entities do not use context for matching in the utterance. If you want context of the utterance to matter for non-machine learned entities, you should use [roles](luis-concept-roles.md).
112+
The following non-machine learned entities do not take utterance context into account when matching entities:
113113

114-
If you have a non-machine-learned entity, such as regex or list, which is matching beyond the instance you want, consider creating one entity with two roles. One roles will capture what you are looking for, and one role will capture what you are not looking for. Both versions will need to be labeled in example utterances.
114+
* [Prebuilt entities](#prebuilt-entity)
115+
* [Regex entities](#regular-expression-entity)
116+
* [List entities](#list-entity)
117+
118+
These entities do not require labeling or training the model. Once you add or configure the entity, the entities are extracted. The tradeoff is that these entities can be overmatched, where if context was taken into account, the match would not have been made.
119+
120+
This happens with list entities on new models frequently. You build and test your model with a list entity but when you publish your model and receive queries from the endpoint, you realize your model is overmatching due to lack of context.
121+
122+
If you want to match words or phrases and take context into account, you have two options. The first is to use a simple entity paired with a phrase list. The phrase list will not be used for matching but instead will help signal relatively similar words (interchangeable list). If you must have an exact match instead of a phrase list's variations, use a list entity with a role, described below.
123+
124+
### Context with non-machine-learned entities
125+
126+
If you want context of the utterance to matter for non-machine learned entities, you should use [roles](luis-concept-roles.md).
127+
128+
If you have a non-machine-learned entity, such as [prebuilt entities](#prebuilt-entity), [regex](#regular-expression-entity) entities or [list](#list-entity) entities, which is matching beyond the instance you want, consider creating one entity with two roles. One role will capture what you are looking for, and one role will capture what you are not looking for. Both versions will need to be labeled in example utterances.
115129

116130
## Composite entity
117131

@@ -137,8 +151,9 @@ List entities represent a fixed, closed set of related words along with their sy
137151
The entity is a good fit when the text data:
138152

139153
* Are a known set.
154+
* Doesn't change often. If you need to change the list often or want the list to self-expand, a simple entity boosted with a phrase list is a better choice.
140155
* The set doesn't exceed the maximum LUIS [boundaries](luis-boundaries.md) for this entity type.
141-
* The text in the utterance is an exact match with a synonym or the canonical name. LUIS doesn't use the list beyond exact text matches. Stemming, plurals, and other variations are not resolved with a list entity. To manage variations, consider using a [pattern](luis-concept-patterns.md#syntax-to-mark-optional-text-in-a-template-utterance) with the optional text syntax.
156+
* The text in the utterance is an exact match with a synonym or the canonical name. LUIS doesn't use the list beyond exact text matches. Fuzzy matching, case-insensitivity, stemming, plurals, and other variations are not resolved with a list entity. To manage variations, consider using a [pattern](luis-concept-patterns.md#syntax-to-mark-optional-text-in-a-template-utterance) with the optional text syntax.
142157

143158
![list entity](./media/luis-concept-entities/list-entity.png)
144159

@@ -236,7 +251,7 @@ Regular expressions may match more than you expect to match. An example of this
236251
(plus )?(zero|one|two|three|four|five|six|seven|eight|nine)(\s+(zero|one|two|three|four|five|six|seven|eight|nine))*
237252
```
238253
239-
This regex expression also matches any words that end with this numbers, such as `phone`. In order to fix issues like this, make sure the regex matches takes into account word boundaries. The regex to use word boundaries for this example is used in the following regex:
254+
This regex expression also matches any words that end with these numbers, such as `phone`. In order to fix issues like this, make sure the regex matches takes into account word boundaries. The regex to use word boundaries for this example is used in the following regex:
240255
241256
```javascript
242257
\b(plus )?(zero|one|two|three|four|five|six|seven|eight|nine)(\s+(zero|one|two|three|four|five|six|seven|eight|nine))*\b

0 commit comments

Comments
 (0)