Skip to content

Commit 0a07b98

Browse files
Merge pull request #232742 from hazemelh/CLU-Suggest-Utterances
New suggestion feature
2 parents fad8b5a + 975b536 commit 0a07b98

File tree

2 files changed

+21
-13
lines changed

2 files changed

+21
-13
lines changed

articles/cognitive-services/language-service/conversational-language-understanding/how-to/tag-utterances.md

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,25 +29,17 @@ See the [project development lifecycle](../overview.md#project-development-lifec
2929

3030
## Data labeling guidelines
3131

32-
After [building your schema](build-schema.md) and [creating your project](create-project.md), you will need to label your data. Labeling your data is important so your model knows which words will be associated with the entities you need to extract. You will want to spend time labeling your utterances - introducing and refining the data that will be used to in training your models.
33-
34-
35-
<!-- Composition guidance where does this live -->
36-
37-
<!--
38-
> [!NOTE]
39-
> An entity's learned components is only defined when you label utterances for that entity. You can also have entities that include _only_ list or prebuilt components without labelling learned components. see the [entity components](../concepts/entity-components.md) article for more information.
40-
-->
32+
After [building your schema](build-schema.md) and [creating your project](create-project.md), you will need to label your data. Labeling your data is important so your model knows which words and sentences will be associated with the intents and entities in your project. You will want to spend time labeling your utterances - introducing and refining the data that will be used to in training your models.
4133

4234
As you add utterances and label them, keep in mind:
4335

4436
* The machine learning models generalize based on the labeled examples you provide it; the more examples you provide, the more data points the model has to make better generalizations.
4537

4638
* The precision, consistency and completeness of your labeled data are key factors to determining model performance.
4739

48-
* **Label precisely**: Label each entity to its right type always. Only include what you want extracted, avoid unnecessary data in your labels.
40+
* **Label precisely**: Label each intent and entity to its right type always. Only include what you want classified and extracted, avoid unnecessary data in your labels.
4941
* **Label consistently**: The same entity should have the same label across all the utterances.
50-
* **Label completely**: Label all the instances of the entity in all your utterances.
42+
* **Label completely**: Provide varied utterances for every intent. Label all the instances of the entity in all your utterances.
5143

5244
* For [Multilingual projects](../language-support.md#multi-lingual-option), adding utterances in other languages increases the model's performance in these languages, but avoid duplicating your data across all the languages you would like to support. For example, to improve a calender bot's performance with users, a developer might add examples mostly in English, and a few in Spanish or French as well. They might add utterances such as:
5345

@@ -91,15 +83,31 @@ Use the following steps to label your utterances:
9183

9284

9385
> [!NOTE]
94-
> list and prebuilt components are not shown in the data labeling page, and all labels here only apply to the **learned component**.
86+
> List and prebuilt components are not shown in the data labeling page, and all labels here only apply to the **learned component**.
9587
9688
To remove a label:
9789
1. From within your utterance, select the entity you want to remove a label from.
9890
3. Scroll through the menu that appears, and select **Remove label**.
9991

100-
To delete or rename an entity:
92+
To delete an entity:
10193
1. Select the entity you want to edit in the right side pane.
10294
2. Click on the three dots next to the entity, and select the option you want from the drop-down menu.
10395

96+
## Suggest utterances with Azure OpenAI
97+
98+
In CLU, use Azure OpenAI to suggest utterances to add to your project using GPT models. You first need to get access and create a resource in Azure OpenAI. You'll then need to create a deployment for the GPT models. Follow the pre-requisite steps [here](../../../openai/how-to/create-resource.md).
99+
100+
In the Data Labeling page:
101+
102+
1. Click on the **Suggest utterances** button. A pane will open up on the right side prompting you to select your Azure OpenAI resource and deployment.
103+
2. On selection of an Azure OpenAI resource, click **Connect**, which allows your Language resource to have direct access to your Azure OpenAI resource. It assigns your Language resource the role of `Cognitive Services User` to your Azure OpenAI resource, which allows your current Language resource to have access to Azure OpenAI's service.
104+
3. Once the resource is connected, select the deployment. The recommended model for the Azure OpenAI deployment is `text-davinci-002`.
105+
4. Select the intent you'd like to get suggestions for. Make sure the intent you have selected has at least 5 saved utterances to be enabled for utterance suggestions. The suggestions provided by Azure OpenAI are based on the **most recent utterances** you've added for that intent.
106+
5. Click on **Generate utterances**. Once complete, the suggested utterances will show up with a dotted line around it, with the note *Generated by AI*. Those suggestions need to be accepted or rejected. Accepting a suggestion simply adds it to your project, as if you had added it yourself. Rejecting it deletes the suggestion entirely. Only accepted utterances will be part of your project and used for training or testing. You can accept or reject by clicking on the green check or red cancel buttons beside each utterance. You can also use the `Accept all` and `Reject all` buttons in the toolbar.
107+
108+
:::image type="content" source="../media/suggest-utterances.png" alt-text="A screenshot showing utterance suggestions in Language Studio." lightbox="../media/suggest-utterances.png":::
109+
110+
Using this feature entails a charge to your Azure OpenAI resource for a similar number of tokens to the suggested utterances generated. Details for Azure OpenAI's pricing can be found [here](https://azure.microsoft.com/pricing/details/cognitive-services/openai-service/).
111+
104112
## Next Steps
105113
* [Train Model](./train-model.md)
453 KB
Loading

0 commit comments

Comments
 (0)