Skip to content

Commit f06a54e

Browse files
authored
Merge pull request #96130 from diberry/diberry/1115-luis-howto-label-utterances
[Cogsvcs] LUIS - labeling example utterances
2 parents 296ff79 + 2c7009a commit f06a54e

10 files changed

+102
-5
lines changed
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
---
2+
title: Label entity example utterance
3+
titleSuffix: Azure Cognitive Services
4+
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+
ms.topic: quickstart
11+
ms.date: 11/15/2019
12+
ms.author: diberry
13+
#Customer intent: As a new user, I want to label a machine-learned entity in an example utterance.
14+
---
15+
16+
# Label machine-learned entity in an example utterance
17+
18+
Labeling an entity in an example utterance shows LUIS has an example of the entity is and where the entity can appear in the utterance.
19+
20+
## Labeling machine-learned entity
21+
22+
Consider the phrase, `hi, please I want a cheese pizza in 20 minutes`.
23+
24+
1. Select the left-most text, then select the right-most text of the entity. The _complete order_ is labeled in the following image.
25+
26+
> [!div class="mx-imgBorder"]
27+
> ![Label complete machine-learned entity](media/label-utterances/example-1-label-machine-learned-entity-complete-order.png)
28+
29+
1. Select the entity from the pop-up window. The labeled complete pizza order entity includes all words (from left to right in English) that are labeled.
30+
31+
> [!TIP]
32+
> The entities available in the pop-up window are relative to the context in which the text appears. For example, if you have a 5-level machine-learned entity, and you are selecting text at the 3rd level (indicated by a labeled entity name under the example utterance), the entities available in the pop-up window are limited to the context of subcomponents of the 3rd level (4th level subcomponents).
33+
34+
## Review labeled text
35+
36+
After labeling, review the example utterance. LUIS applies the current model to the example utterance after labeling. The solid line indicates the text has been labeled.
37+
38+
> [!div class="mx-imgBorder"]
39+
> ![Labeled complete machine-learned entity](media/label-utterances/example-1-label-machine-learned-entity-complete-order-labeled.png)
40+
41+
## When to train
42+
43+
If the current model should support your labeled entity, but the example utterance continues to show the text as predicted but not labeled, train your app.
44+
45+
## Confirm predicted entity
46+
47+
If the visual indicator is above the utterance, it indicates the text is predicted but _not labeled yet_. To turn the prediction into a label, select the utterance, then select **Confirm entity predictions**.
48+
49+
> [!div class="mx-imgBorder"]
50+
> ![Predict complete machine-learned entity](media/label-utterances/example-1-label-machine-learned-entity-complete-order-predicted.png)
51+
52+
## Label subcomponent entity by painting with entity palette cursor
53+
54+
1. In order to correct predictions (entities, which appear above the example utterance), open the entity palette.
55+
56+
> [!div class="mx-imgBorder"]
57+
> ![Entity palette for machine-learned entity](media/label-utterances/pizza-entity-palette-with-pizza-type-selected.png)
58+
59+
1. Select the entity subcomponent. This action is visually indicated with a new cursor. The cursor follows the mouse as you move in the portal.
60+
61+
> [!div class="mx-imgBorder"]
62+
> ![Entity palette for machine-learned entity](media/label-utterances/pizza-type-entity-palette-cursor.png)
63+
64+
1. In the example utterance, _paint_ the entity with the cursor.
65+
66+
> [!div class="mx-imgBorder"]
67+
> ![Entity palette for machine-learned entity](media/label-utterances/paint-subcomponent-with-entity-palette-cursor.png)
68+
69+
## Labeling matching-text entities to a machine-learned entity
70+
71+
Matching-text entities include prebuilt entities, regular expression entities, and list entities. You add these to a machine-learned entity, as constraints to a subcomponent, when you create or edit the machine-learned entity.
72+
73+
**Once these constraints are added, you do not need to label the matching text in the example utterance.**
74+
75+
## Entity prediction errors
76+
77+
Entity prediction errors show a caution indicator. This indicates the predicted entity doesn't match the labeled entity.
78+
79+
> [!div class="mx-imgBorder"]
80+
> ![Entity palette for machine-learned entity](media/label-utterances/example-utterance-indicates-prediction-error.png)
81+
82+
## Next steps
83+
84+
Use the [dashboard](luis-how-to-use-dashboard.md) and [review endpoint utterances](luis-how-to-review-endpoint-utterances.md) to improve the prediction quality of your app.

articles/cognitive-services/LUIS/luis-how-to-add-entities.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ms.custom: seodec18
99
ms.service: cognitive-services
1010
ms.subservice: language-understanding
1111
ms.topic: conceptual
12-
ms.date: 11/11/2019
12+
ms.date: 11/15/2019
1313
ms.author: diberry
1414
---
1515

@@ -21,9 +21,20 @@ The entity represents a word or phrase inside the utterance that you want extrac
2121

2222
[!INCLUDE [Uses preview portal](includes/uses-portal-preview.md)]
2323

24-
## Creating an entity is different from labeling an entity
24+
## Plan entities, then create and label
2525

26-
You first need to create an entity before you can label the entity in the example utterance.
26+
Machine-learned entities can be created from the example utterances or created from the **Entities** page.
27+
28+
In general, a best practice is to spend time planning the entities before creating a machine-learned entity in the portal. Then create the machine-learned entity from the example utterance with as much detail in the subcomponents and descriptors and constraints as you know at the time. The [decomposable entity tutorial](tutorial-machine-learned-entity.md) demonstrates how to use this method.
29+
30+
As part of planning the entities, you may know you need text-matching entities (such as prebuilt entities, regular expression entities, or list entities). You can create these from the **Entities** page before they are labeled in example utterances.
31+
32+
When labeling, you can either label individual entities then build up to a parent machine-learned entity. Or you can start with a parent machine-learned entity and decompose into child entities.
33+
34+
> [!TIP]
35+
>Label all words that may indicate an entity, even if the words are not used when extracted in the client application.
36+
37+
## Creating an entity before or with labeling
2738

2839
Use the following table to understand which entities where to create or add each entity to the app.
2940

Loading
Loading
6.36 KB
Loading
2.59 KB
Loading
3.9 KB
Loading
8.2 KB
Loading
1.97 KB
Loading

articles/cognitive-services/LUIS/toc.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,8 @@
172172
displayName: roles, import
173173
- name: Use prebuilt models
174174
href: howto-add-prebuilt-models.md
175+
- name: Label entity in utterance
176+
href: label-entity-example-utterance.md
175177
- name: With REST APIs
176178
items:
177179
- name: Build app programmatically using Node.js
@@ -189,8 +191,8 @@
189191
- name: Using the dashboard
190192
displayName: dashboard, analytics, charts, data, unclear predictions, incorrect predictions, imbalance, endpoint hits, status, evaluation, accuracy, active version, problematic intents, nearest rival, usage
191193
href: luis-how-to-use-dashboard.md
192-
- name: Add Phrase list
193-
displayName: synonym, interchange
194+
- name: Add Descriptor
195+
displayName: synonym, interchange, phrase list, descriptor
194196
href: luis-how-to-add-features.md
195197
- name: Review endpoint utterances
196198
displayName: active learning

0 commit comments

Comments
 (0)