Skip to content

Commit 4680779

Browse files
Merge pull request #192038 from aahill/baher-orchestration
screenshots, quickstart updates, evaluation metrics
2 parents 274e7e7 + 67e02e2 commit 4680779

File tree

10 files changed

+151
-166
lines changed

10 files changed

+151
-166
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
title: Orchestration workflow model evaluation metrics
3+
titleSuffix: Azure Cognitive Services
4+
description: Learn about evaluation metrics in orchestration workflow
5+
services: cognitive-services
6+
author: aahill
7+
manager: nitinme
8+
ms.service: cognitive-services
9+
ms.subservice: language-service
10+
ms.topic: overview
11+
ms.date: 03/17/2022
12+
ms.author: aahi
13+
ms.custom: language-service-orchestration
14+
---
15+
16+
# Evaluation metrics for orchestration workflow models
17+
18+
Model evaluation in orchestration workflow uses the following metrics:
19+
20+
|Metric |Description |Calculation |
21+
|---------|---------|---------|
22+
|Precision | The ratio of successful recognitions to all attempted recognitions. This shows how many times the model's entity recognition is truly a good recognition. | `Precision = #True_Positive / (#True_Positive + #False_Positive)` |
23+
|Recall | The ratio of successful recognitions to the actual number of entities present. | `Recall = #True_Positive / (#True_Positive + #False_Negatives)` |
24+
|F1 score | The combination of precision and recall. | `F1 Score = 2 * Precision * Recall / (Precision + Recall)` |
25+
26+
## Confusion matrix
27+
28+
A Confusion matrix is an N x N matrix used for model performance evaluation, where N is the number of intents.
29+
The matrix compares the actual tags with the tags predicted by the model.
30+
This gives a holistic view of how well the model is performing and what kinds of errors it is making.
31+
32+
You can use the Confusion matrix to identify intents that are too close to each other and often get mistaken (ambiguity). In this case consider merging these intents together. If that isn't possible, consider adding more tagged examples of both intents to help the model differentiate between them.
33+
34+
You can calculate the model-level evaluation metrics from the confusion matrix:
35+
36+
* The *true positive* of the model is the sum of *true Positives* for all intents.
37+
* The *false positive* of the model is the sum of *false positives* for all intents.
38+
* The *false Negative* of the model is the sum of *false negatives* for all intents.
39+
40+
## Next steps
41+
42+
[Train a model in Language Studio](../how-to/train-model.md)

articles/cognitive-services/language-service/orchestration-workflow/faq.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,22 @@ ms.custom: ignite-fall-2021, mode-other
1616
# Frequently asked questions for orchestration workflows
1717

1818
Use this article to quickly get the answers to common questions about orchestration workflows
19-
<!--
19+
2020
## How do I create a project?
2121

2222
See the [quickstart](./quickstart.md) to quickly create your first project, or the [how-to article](./how-to/create-project.md) for more details.
23-
-->
23+
2424
## How do I connect other service applications in orchestration workflow projects?
2525

2626
See [How to create projects and build schemas](./how-to/create-project.md) for information on connecting another project as an intent.
2727

2828
## Which LUIS applications can I connect to in orchestration workflow projects?
2929

30-
LUIS applications that use the Language resource as their authoring resource will be available for connection. You can only connect to LUIS applications that are owned by the same resource. This option will only be available for resources in West Europe, as it's the only common available region between LUIS and CLU. <!--See [region limits](./service-limits.md#region-limits) for more information. -->
30+
LUIS applications that use the Language resource as their authoring resource will be available for connection. You can only connect to LUIS applications that are owned by the same resource. This option will only be available for resources in West Europe, as it's the only common available region between LUIS and CLU.
3131

3232
## Training is taking a long time, is this expected?
3333

34-
For conversation projects, long training times are expected. Based on the number of examples you have your training times may vary from 5 minutes to 1 hour or more.
34+
For orchestration projects, long training times are expected. Based on the number of examples you have your training times may vary from 5 minutes to 1 hour or more.
3535

3636
## Can I add entities to orchestration workflow projects?
3737

@@ -64,4 +64,4 @@ Yes, all the APIs [are available](https://aka.ms/clu-apis).
6464

6565
## Next steps
6666

67-
[Conversational language understanding overview](overview.md)
67+
[Orchestration workflow overview](overview.md)

articles/cognitive-services/language-service/orchestration-workflow/how-to/deploy-query-model.md

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,31 @@ ms.devlang: csharp, python
1414
ms.custom: language-service-orchestration
1515
---
1616

17-
# Deploy and test an orchestration workflow model
17+
# Deploy and test model
1818

1919
After you have [trained a model](./train-model.md) on your dataset, you're ready to deploy it. After deploying your model, you'll be able to query it for predictions.
2020

21-
## Deploy model
21+
> [!Tip]
22+
> Before deploying a model, make sure to view the model details to make sure that the model is performing as expected.
23+
> You can only have ten deployment names.
2224
23-
Deploying a model is to host it and make it available for predictions through an endpoint. You can only have 1 deployed model per project, deploying another one will overwrite the previously deployed model.
25+
## Orchestration workflow model deployments
26+
27+
Deploying a model hosts and makes it available for predictions through an endpoint.
2428

2529
When a model is deployed, you will be able to test the model directly in the portal or by calling the API associated to it.
2630

27-
When you're deploying an orchestration workflow project, A small window will show up for you to confirm your deployment, and configure parameters for connected services.
31+
1. From the left side, click on **Deploy model**.
32+
33+
2. Click on **Add deployment** to submit a new deployment job.
34+
35+
In the window that appears, you can create a new deployment name by giving the deployment a name or override an existing deployment name. Then, you can add a trained model to this deployment name and press next.
2836

29-
If you're connecting one or more LUIS applications, specify the deployment name, and whether you're using *slot* or *version* type deployment.
30-
* The *slot* deployment type requires you to pick between a production and staging slot.
31-
* The *version* deployment type requires you to specify the version you have published.
37+
3. If you're connecting one or more LUIS applications or conversational language understanding projects, you have to specify the deployment name.
3238

33-
No configurations are required for custom question answering and conversational language understanding connections, or unlinked intents.
39+
No configurations are required for custom question answering or unlinked intents.
3440

35-
LUIS projects **must be published** to the slot configured during the orchestration workflow deployment, and custom question answering KBs must also be published to their production slots.
41+
LUIS projects **must be published** to the slot configured during the Orchestration deployment, and custom question answering KBs must also be published to their Production slots.
3642

3743
1. Click on **Add deployment** to submit a new deployment job.
3844

@@ -48,7 +54,6 @@ LUIS projects **must be published** to the slot configured during the orchestrat
4854

4955
:::image type="content" source="../media/deploy-connected-services.png" alt-text="A screenshot showing the deployment screen for orchestration workflow projects." lightbox="../media/deploy-connected-services.png":::
5056

51-
5257
## Send a request to your model
5358

5459
Once your model is deployed, you can begin using the deployed model for predictions. Outside of the test model page, you can begin calling your deployed model via API requests to your provided custom endpoint. This endpoint request obtains the intent and entity predictions defined within the model.
@@ -58,17 +63,16 @@ You can get the full URL for your endpoint by going to the **Deploy model** page
5863
:::image type="content" source="../media/prediction-url.png" alt-text="Screenshot showing the prediction request and URL" lightbox="../media/prediction-url.png":::
5964

6065
Add your key to the `Ocp-Apim-Subscription-Key` header value, and replace the query and language parameters.
61-
<!--
66+
6267
> [!TIP]
6368
> As you construct your requests, see the [quickstart](../quickstart.md?pivots=rest-api#query-model) and REST API [reference documentation](https://aka.ms/clu-apis) for more information.
64-
-->
6569
6670
### Use the client libraries (Azure SDK)
6771

6872
You can also use the client libraries provided by the Azure SDK to send requests to your model.
6973

7074
> [!NOTE]
71-
> The client library for conversational language understanding is only available for:
75+
> The client library for Orchestration workflow is only available for:
7276
> * .NET
7377
> * Python
7478
Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: How to train and evaluate models in orchestration workflow projects
33
titleSuffix: Azure Cognitive Services
4-
description: Use this article to train an orchestration workflow model and view its evaluation details to make improvements.
4+
description: Use this article to train an orchestration model and view its evaluation details to make improvements.
55
services: cognitive-services
66
author: aahill
77
manager: nitinme
@@ -15,41 +15,39 @@ ms.custom: language-service-orchestration
1515

1616
# Train and evaluate orchestration workflow models
1717

18-
After you have completed tagging your utterances, you can train your model. Training is the act of converting the current state of your project's training data to build a model that can be used for predictions. Every time you train, you have to name your training instance.
18+
After you have completed [tagging your utterances](./tag-utterances.md), you can train your model. Training is the act of converting the current state of your project's training data to build a model that can be used for predictions. Every time you train, you have to name your training instance.
1919

2020
You can create and train multiple models within the same project. However, if you re-train a specific model it overwrites the last state.
2121

22-
The training times can be anywhere from a few seconds, up to a couple of hours when you reach the maximum limit of utterances. Before training, you will have the option to enable evaluation, which lets you view how your model performs.
22+
The training times can be anywhere from a few seconds, up to a couple of hours when you reach high numbers of utterances.
2323

2424
## Train model
2525

2626
Select **Train model** on the left of the screen. Select **Start a training job** from the top menu.
2727

2828
Enter a new model name or select an existing model from the **Model Name** dropdown.
2929

30-
Select whether you want to evaluate your model by changing the **Run evaluation with training** toggle. If enabled, your tagged utterances will be spilt into 2 parts; 80% for training, 20% for testing. Afterwards, you'll be able to see the model's evaluation results.
31-
3230
:::image type="content" source="../media/train-model.png" alt-text="A screenshot showing the Train model page for Conversational Language Understanding projects." lightbox="../media/train-model.png":::
3331

34-
Click the **Train** button and wait for training to complete. You will see the training status of your model in the view model details page. Only successfully completed tasks will generate models.
32+
Click the **Train** button and wait for training to complete. You will see the training status of your model in the view model details page. Only successfully completed jobs will generate models.
3533

3634
## Evaluate model
3735

38-
After model training is completed, you can view your model details and see how well it performs against the test set if you enabled evaluation in the training step. Observing how well your model performed is called evaluation. The test set is composed of 20% of your utterances, and this split is done at random before training. The test set consists of data that was not introduced to the model during the training process. For the evaluation process to complete there must be at least 10 utterances in your training set.
36+
After model training is completed, you can view your model details and see how well it performs against the test set in the training step. Observing how well your model performed is called evaluation. The test set is composed of 20% of your utterances, and this split is done at random before training. The test set consists of data that was not introduced to the model during the training process. For the evaluation process to complete there must be at least 10 utterances in your training set.
3937

4038
In the **view model details** page, you'll be able to see all your models, with their current training status, and the date they were last trained.
4139

4240
:::image type="content" source="../media/model-page-1.png" alt-text="A screenshot showing the model details page for Conversational Language Understanding projects." lightbox="../media/model-page-1.png":::
4341

4442
* Click on the model name for more details. A model name is only clickable if you've enabled evaluation before hand.
45-
* In the **Overview** section you can find the macro precision, recall and F1 score for the collective intents or entities, based on which option you select.
46-
* Under the **Intents** and **Entities** tabs you can find the micro precision, recall and F1 score for each intent or entity separately.
43+
* In the **Overview** section you can find the macro precision, recall and F1 score for the collective intents.
44+
* Under the **Intents** tab you can find the micro precision, recall and F1 score for each intent separately.
4745

4846
> [!NOTE]
49-
> If you don't see any of the intents or entities you have in your model displayed here, it is because they weren't in any of the utterances that were used for the test set.
47+
> If you don't see any of the intents you have in your model displayed here, it is because they weren't in any of the utterances that were used for the test set.
5048
51-
You can view the confusion matrix for intents and entities by clicking on the **Test set confusion matrix** tab at the top fo the screen.
49+
You can view the [confusion matrix](../concepts/evaluation-metrics.md) for intents by clicking on the **Test set confusion matrix** tab at the top fo the screen.
5250

5351
## Next steps
54-
<!--* [Model evaluation metrics](../concepts/evaluation-metrics.md)-->
52+
* [Model evaluation metrics](../concepts/evaluation-metrics.md)
5553
* [Deploy and query the model](./deploy-query-model.md)

articles/cognitive-services/language-service/orchestration-workflow/includes/quickstarts/language-studio.md

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,10 @@ Once you have a Language resource associated with your account, create an orches
3030

3131
1. In [Language Studio](https://aka.ms/languageStudio), find the section labeled **Understand questions and conversational language** and select **Orchestration Workflow**.
3232

33-
:::image type="content" source="../../../conversational-language-understanding/media/select-custom-clu.png" alt-text="A screenshot showing the location of Custom Language Understanding in the Language Studio landing page." lightbox="../../../conversational-language-understanding/media/select-custom-clu.png":::
33+
:::image type="content" source="../../media/select-orchestration.png" alt-text="A screenshot showing the location of the orchestration workflow section in the Language Studio landing page." lightbox="../../media/select-orchestration.png":::
3434

3535

36-
2. This will bring you to the **Orchestration workflow project** page. Select **Create new project**.
37-
38-
:::image type="content" source="../../../conversational-language-understanding/media/projects-page.png" alt-text="A screenshot showing the conversation project page in Language Studio." lightbox="../../../conversational-language-understanding/media/projects-page.png":::
39-
40-
41-
You then need to provide the following details:
36+
2. This will bring you to the **Orchestration workflow project** page. Select **+ Create new project**. To create a project, you will need to provide the following details:
4237

4338
|Value | Description |
4439
|---------|---------|
@@ -53,20 +48,21 @@ Once you're done, select **Next** and review the details. Select **create projec
5348
1. Click on *+Add* button to add your intent.
5449
2. Give your intent a name and choose to connect the intent to an existing project.
5550
3. Click on *Add intent* button.
56-
4. Another option is to select *no* when creating an intent and don't connect it to an existing project.
51+
4. Enter **Greeting** as an intent. For this quickstart, select **No, I don't want to connect to a project**.
5752

58-
When you select the intent, you will see the [tag utterances](../../how-to/tag-utterances.md) page, where you can add examples for intents.
5953

54+
:::image type="content" source="../../media/quickstart-intent.png" alt-text="A screenshot showing the schema page in Language studio." lightbox="../../media/quickstart-intent.png":::
55+
56+
When you select the intent, you will see the [tag utterances](../../how-to/tag-utterances.md) page, where you can add examples for intents.
6057

61-
:::image type="content" source="../../../conversational-language-understanding/media/quickstart-intents.png" alt-text="A screenshot showing the schema page in Language studio." lightbox="../../../conversational-language-understanding/media/quickstart-intents.png":::
6258

6359
## Tag utterances
6460

6561
In the tag utterances page, let's add a few examples to the intents. Select the **Greeting** intent from the drop-down box that says **Select Intent**.
6662

67-
In the text box that says **Write your example utterance and press enter**, write the sentence "*Good evening*" and press enter to add it as an example utterance.
63+
In the text box that says **Write your example utterance and press enter**, write the sentence "*Good evening*" and press enter to add it as an example utterance.
6864

69-
Add the rest of these utterances to the **Greeting** intent to the Training set.
65+
Add the rest of these utterances to the **Greeting** intent to the Training set.
7066

7167
|Utterance|
7268
|--|
@@ -77,7 +73,7 @@ Add the rest of these utterances to the **Greeting** intent to the Training set.
7773

7874
When you're done, select **Save Changes** to save the utterances and labels to the project. The icon next to the button will turn green when the changes are saved. Next, go to the **Train Model** page.
7975

80-
:::image type="content" source="../../../conversational-language-understanding/media/quickstart-utterances.png" alt-text="A screenshot showing the intents tagging screen in Language Studio." lightbox="../../../conversational-language-understanding/media/quickstart-utterances.png":::
76+
:::image type="content" source="../../media/tagged-utterances.png" alt-text="A screenshot showing the intents tagging screen in Language Studio." lightbox="../../media/tagged-utterances.png":::
8177

8278
## Train your model and view its details
8379

@@ -95,4 +91,4 @@ Once you're done, select **Next** and review the details. For the connected proj
9591

9692
Select **Test model** on the left of the screen, and select the deployment name from the drop-down menu. Add your test, for example *Good morning* in the text field and click on **Run the test**.
9793

98-
You now see the top intent as **Greeting**.
94+
You now see the top intent is **Greeting**.

0 commit comments

Comments
 (0)