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/ai-services/language-service/conversational-language-understanding/concepts/best-practices.md
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,22 +18,22 @@ Use the following guidelines to create the best possible projects in conversatio
18
18
19
19
## Choose a consistent schema
20
20
21
-
Schema is the definition of your intents and entities. There are different approaches you could take when defining what you should create as an intent versus an entity. Ask yourself these questions:
21
+
Schema is the definition of your intents and entities. There are different approaches you could take when you define what you should create as an intent versus an entity. Ask yourself these questions:
22
22
23
23
- What actions or queries am I trying to capture from my user?
24
24
- What pieces of information are relevant in each action?
25
25
26
26
You can typically think of actions and queries as _intents_, while the information required to fulfill those queries are _entities_.
27
27
28
-
For example, assume that you want your customers to cancel subscriptions for various products that you offer through your chatbot. You can create a _Cancel_ intent with various examples like _"Cancel the Contoso service"_ or _"Stop charging me for the Fabrikam subscription."_ The user's intent here is to _cancel_, and the _Contoso service_ or _Fabrikam subscription_ are the subscriptions they want to cancel.
28
+
For example, assume that you want your customers to cancel subscriptions for various products that you offer through your chatbot. You can create a _cancel_ intent with various examples like _"Cancel the Contoso service"_ or _"Stop charging me for the Fabrikam subscription."_ The user's intent here is to _cancel_, and the _Contoso service_ or _Fabrikam subscription_ are the subscriptions they want to cancel.
29
29
30
30
To proceed, you create an entity for _subscriptions_. Then you can model your entire project to capture actions as intents and use entities to fill in those actions. This approach allows you to cancel anything you define as an entity, such as other products. You can then have intents for signing up, renewing, and upgrading that all make use of the _subscriptions_ and other entities.
31
31
32
32
The preceding schema design makes it easy for you to extend existing capabilities (canceling, upgrading, or signing up) to new targets by creating a new entity.
33
33
34
34
Another approach is to model the _information_ as intents and the _actions_ as entities. Let's take the same example of allowing your customers to cancel subscriptions through your chatbot.
35
35
36
-
You can create an intent for each subscription available, such as _Contoso_, with utterances like _"Cancel Contoso"_, _"Stop charging me for Contoso services,"_ and _"Cancel the Contoso subscription."_ You then create an entity to capture the _cancel_ action. You can define different entities for each action or consolidate actions as one entity with a list component to differentiate between actions with different keys.
36
+
You can create an intent for each subscription available, such as _Contoso_, with utterances like _"Cancel Contoso"_, _"Stop charging me for Contoso services"_, and _"Cancel the Contoso subscription."_ You then create an entity to capture the _cancel_ action. You can define different entities for each action or consolidate actions as one entity with a list component to differentiate between actions with different keys.
37
37
38
38
This schema design makes it easy for you to extend new actions to existing targets by adding new action entities or entity components.
39
39
@@ -47,17 +47,17 @@ You also want to avoid mixing different schema designs. Don't build half of your
47
47
48
48
## Use standard training before advanced training
49
49
50
-
[Standard training](../how-to/train-model.md#training-modes) is free and faster than advanced training, which makes it useful to help you quickly understand the effect of changing your training set or schema while you build the model. After you're satisfied with the schema, consider using advanced training to get the best AIQ out of your model.
50
+
[Standard training](../how-to/train-model.md#training-modes) is free and faster than advanced training. It can help you quickly understand the effect of changing your training set or schema while you build the model. After you're satisfied with the schema, consider using advanced training to get the best AIQ out of your model.
51
51
52
52
## Use the evaluation feature
53
53
54
-
When you build an app, it's often helpful to catch errors early. It's usually a good practice to add a test set when building the app, as training and evaluation results are useful in identifying errors or issues in your schema.
54
+
When you build an app, it's often helpful to catch errors early. It's usually a good practice to add a test set when you build the app. Training and evaluation results are useful in identifying errors or issues in your schema.
55
55
56
56
## Machine-learning components and composition
57
57
58
58
For more information, see [Component types](./entity-components.md#component-types).
59
59
60
-
## Use the "none" score threshold
60
+
## Use the None score threshold
61
61
62
62
If you see too many false positives, such as out-of-context utterances being marked as valid intents, see [Confidence threshold](./none-intent.md) for information on how it affects inference.
63
63
@@ -77,7 +77,7 @@ If you require the learned component, make sure that *ticket quantity* is only r
77
77
78
78
## Address model inconsistencies
79
79
80
-
If your model is overly sensitive to small grammatical changes, like casing or diacritics, you can systematically manipulate your dataset directly in the Language Studio. To use these features, select the **Settings** tab on the left pane and locate the **Advanced project settings** section.
80
+
If your model is overly sensitive to small grammatical changes, like casing or diacritics, you can systematically manipulate your dataset directly in Language Studio. To use these features, select the **Settings** tab on the left pane and locate the **Advanced project settings** section.
81
81
82
82
:::image type="content" source="../media/advanced-project-settings.png" alt-text="A screenshot that shows an example of Advanced project settings." lightbox="../media/advanced-project-settings.png":::
83
83
@@ -146,7 +146,7 @@ After the request is sent, you can track the progress of the training job in Lan
146
146
147
147
### Normalization in model version 2023-04-15
148
148
149
-
Model version 2023-04-15, conversational language understanding provides normalization in the inference layer that doesn't affect training.
149
+
With model version 2023-04-15, conversational language understanding provides normalization in the inference layer that doesn't affect training.
150
150
151
151
The normalization layer normalizes the classification confidence scores to a confined range. The range selected currently is from `[-a,a]` where "a" is the square root of the number of intents. As a result, the normalization depends on the number of intents in the app. If the number of intents is low, the normalization layer has a small range to work with. With a large number of intents, the normalization is more effective.
152
152
@@ -160,11 +160,11 @@ To better understand how individual components are performing, you can disable t
160
160
161
161
## Evaluate a model by using multiple test sets
162
162
163
-
Data in a conversational language understanding project can have two data sets: a testing set and a training set. If you want to use multiple test sets to evaluate your model, you can:
163
+
Data in a conversational language understanding project can have two datasets: a testing set and a training set. If you want to use multiple test sets to evaluate your model, you can:
164
164
165
165
* Give your test sets different names (for example, "test1" and "test2").
166
166
* Export your project to get a JSON file with its parameters and configuration.
167
-
* Use the JSON to import a new project, and rename your second desired test set to "test."
167
+
* Use the JSON to import a new project. Rename your second desired test set to "test."
168
168
* Train the model to run the evaluation by using your second test set.
169
169
170
170
## Custom parameters for target apps and child apps
@@ -214,7 +214,7 @@ First, identify the:
214
214
* Source language resource.
215
215
* Target language resource, which is where you want to copy it to.
216
216
217
-
Call the API to authorize the copy action, and get `accessTokens` for the actual copy operation later.
217
+
Call the API to authorize the copy action and get `accessTokens` for the actual copy operation later.
description: Learn about which how to make use of multilingual projects in conversational language understanding
4
+
description: Learn about how to make use of multilingual projects in conversational language understanding.
5
5
#services: cognitive-services
6
6
author: jboback
7
7
manager: nitinme
@@ -13,34 +13,34 @@ ms.author: jboback
13
13
14
14
# Multilingual projects
15
15
16
-
Conversational language understanding makes it easy for you to extend your project to several languages at once. When you enable multiple languages in projects, you'll be able to add languagespecific utterances and synonyms to your project, and get multilingual predictions for your intents and entities.
16
+
Conversational language understanding makes it easy for you to extend your project to several languages at once. When you enable multiple languages in projects, you can add language-specific utterances and synonyms to your project. You can get multilingual predictions for your intents and entities.
17
17
18
18
## Multilingual intent and learned entity components
19
19
20
-
When you enable multiple languages in a project, you can train the project primarily in one language and immediately get predictions in others.
20
+
When you enable multiple languages in a project, you can train the project primarily in one language and immediately get predictions in other languages.
21
21
22
-
For example, you can train your project entirely with English utterances, and query it in: French, German, Mandarin, Japanese, Korean, and others. Conversational language understanding makes it easy for you to scale your projects to multiple languages by using multilingual technology to train your models.
22
+
For example, you can train your project entirely with English utterances and query it in French, German, Mandarin, Japanese, Korean, and others. Conversational language understanding makes it easy for you to scale your projects to multiple languages by using multilingual technology to train your models.
23
23
24
-
Whenever you identify that a particular language is not performing as well as other languages, you can add utterances for that language in your project. In the [tag utterances](../how-to/tag-utterances.md) page in Language Studio, you can select the language of the utterance you're adding. When you introduce examples for that language to the model, it is introduced to more of the syntax of that language, and learns to predict it better.
24
+
Whenever you identify that a particular language isn't performing as well as other languages, you can add utterances for that language in your project. In the [tag utterances](../how-to/tag-utterances.md) page in Language Studio, you can select the language of the utterance you're adding. When you introduce examples for that language to the model, it's introduced to more of the syntax of that language and learns to predict it better.
25
25
26
-
You aren't expected to add the same amount of utterances for every language. You should build the majority of your project in one language, and only add a few utterances in languages you observe aren't performing well. If you create a project that is primarily in English, and start testing it in French, German, and Spanish, you might observe that German doesn't perform as well as the other two languages. In that case, consider adding 5% of your original English examples in German, train a new model and test in German again. You should see better results for German queries. The more utterances you add, the more likely the results are going to get better.
26
+
You aren't expected to add the same amount of utterances for every language. You should build most of your project in one language and only add a few utterances in languages you observe aren't performing well. If you create a project that's primarily in English and start testing it in French, German, and Spanish, you might observe that German doesn't perform as well as the other two languages. In that case, consider adding 5% of your original English examples in German, train a new model, and test in German again. You should see better results for German queries. The more utterances you add, the more likely the results are going to get better.
27
27
28
-
When you add data in another language, you shouldn't expect it to negatively affect other languages.
28
+
When you add data in another language, you shouldn't expect it to negatively affect other languages.
29
29
30
30
## List and prebuilt components in multiple languages
31
31
32
-
Projects with multiple languages enabled will allow you to specify synonyms **per language** for every list key. Depending on the language you query your project with, you will only get matches for the list component with synonyms of that language. When you query your project, you can specify the language in the request body:
32
+
Projects with multiple languages enabled allow you to specify synonyms *per language* for every list key. Depending on the language you query your project with, you only get matches for the list component with synonyms of that language. When you query your project, you can specify the language in the request body:
33
33
34
34
```json
35
35
"query": "{query}"
36
36
"language": "{language code}"
37
37
```
38
38
39
-
If you do not provide a language, it will fall back to the default language of your project. See the [language support](../language-support.md) article for a list of different language codes.
39
+
If you don't provide a language, it falls back to the default language of your project. For a list of different language codes, see [Language support](../language-support.md).
40
40
41
-
Prebuilt components are similar, where you should expect to get predictions for prebuilt components that are available in specific languages. The request's language again determines which components are attempting to be predicted. See the [prebuilt components](../prebuilt-component-reference.md) reference article for the language support of each prebuilt component.
41
+
Prebuilt components are similar, where you should expect to get predictions for prebuilt components that are available in specific languages. The request's language again determines which components are attempting to be predicted. For information on the language support of each prebuilt component, see the [Supported prebuilt entity components](../prebuilt-component-reference.md).
0 commit comments