Skip to content

Commit e9c81c5

Browse files
committed
removing file
1 parent fb9b156 commit e9c81c5

File tree

1 file changed

+48
-44
lines changed

1 file changed

+48
-44
lines changed

articles/cognitive-services/QnAMaker/How-To/improve-knowledge-base.md

Lines changed: 48 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2-
title: Improve your knowledge base - QnA Maker
2+
title: Improve knowledge base - QnA Maker
33
titleSuffix: Azure Cognitive Services
4-
description: Active learning allows you to improve the quality of your knowledge base by suggesting alternative questions, based on user submissions, to your question and answer pair. You review those suggestions, either adding them to existing questions or rejecting them.
4+
description: Active learning allows you to improve the quality of your knowledge base by suggesting alternative questions, based on user-submissions, to your question and answer pair. You review those suggestions, either adding them to existing questions or rejecting them. Your knowledge base doesn't change automatically. You must accept the suggestions for any change to take effect. These suggestions add questions but don't change or remove existing questions.
55
author: diberry
66
manager: nitinme
77
services: cognitive-services
@@ -14,83 +14,89 @@ ms.author: diberry
1414

1515
# Use active learning to improve your knowledge base
1616

17-
QnA Maker features *active learning*. This capability allows you to improve the quality of your knowledge base by suggesting alternative questions, based on user submissions, to your question and answer pair. You review those suggestions, either adding them to existing questions or rejecting them.
17+
Active learning allows you to improve the quality of your knowledge base by suggesting alternative questions, based on user-submissions, to your question and answer pair. You review those suggestions, either adding them to existing questions or rejecting them.
1818

19-
Your knowledge base doesn't change automatically. You must accept the suggestions for any change to take effect. These suggestions add questions, but don't change or remove existing questions.
19+
Your knowledge base doesn't change automatically. You must accept the suggestions in order for any change to take effect. These suggestions add questions but don't change or remove existing questions.
2020

2121
## What is active learning?
2222

2323
QnA Maker learns new question variations with implicit and explicit feedback.
2424

25-
* **Implicit feedback.** When a user question has multiple answers with scores that are very close, the QnA Maker ranker considers this as feedback.
26-
* **Explicit feedback.** When the knowledge base returns multiple answers with little variation in scores, the client application asks the user which question is the correct question. The user's explicit feedback is sent to QnA Maker with the Train API.
25+
* Implicit feedback – The ranker understands when a user question has multiple answers with scores that are very close and considers this as feedback.
26+
* Explicit feedbackWhen multiple answers with little variation in scores are returned from the knowledge base, the client application asks the user which question is the correct question. The user's explicit feedback is sent to QnA Maker with the Train API.
2727

2828
Either method provides the ranker with similar queries that are clustered.
2929

3030
## How active learning works
3131

32-
For any specified query, active learning is triggered based on the scores of top few answers returned by QnA Maker. If the score differences lie within a small range, then the query is considered a possible _suggestion_ for each of the possible answers.
32+
Active learning is triggered based on the scores of top few answers returned by QnA Maker for any given query. If the score differences lie within a small range, then the query is considered a possible _suggestion_ for each of the possible answers.
3333

34-
QnA Maker clusters all the suggestions together by similarity. It displays top suggestions for alternate questions, based on the frequency of the particular queries by end users. Active learning gives the best possible suggestions in cases where the endpoints are getting a reasonable quantity and variety of usage queries.
34+
All the suggestions are clustered together by similarity and top suggestions for alternate questions are displayed based on the frequency of the particular queries by end users. Active learning gives the best possible suggestions in cases where the endpoints are getting a reasonable quantity and variety of usage queries.
3535

36-
When 5 or more similar queries are clustered, every 30 minutes, QnA Maker suggests the user-based questions to the knowledge base designer to accept or reject. You need to review and accept or reject those suggestions.
36+
When 5 or more similar queries are clustered, every 30 minutes, QnA Maker suggests the user-based questions to the knowledge base designer to accept or reject.
37+
38+
Once questions are suggested in the QnA Maker portal, you need to review and accept or reject those suggestions.
3739

3840
## Upgrade your version to use active learning
3941

40-
QnA Maker supports active learning in runtime version 4.4.0 and later. If your knowledge base was created on an earlier version, [upgrade your runtime](troubleshooting-runtime.md#how-to-get-latest-qnamaker-runtime-updates) to use this feature.
42+
Active Learning is supported in runtime version 4.4.0 and above. If your knowledge base was created on an earlier version, [upgrade your runtime](troubleshooting-runtime.md#how-to-get-latest-qnamaker-runtime-updates) to use this feature.
43+
44+
## Best practices
45+
46+
For best practices when using active learning, see [Best practices](../Concepts/best-practices.md#active-learning).
4147

4248
## Score proximity between knowledge base questions
4349

44-
When a question's score is highly confident, such as 80 percent, the range of scores that are considered for active learning are wide, approximately within 10 percent. As the confidence score decreases, such as 40 percent, the range of scores decreases as well, approximately within 4 percent.
50+
When a question's score is highly confident, such as 80%, the range of scores that are considered for active learning are wide, approximately within 10%. As the confidence score decreases, such as 40%, the range of scores decreases as well, approximately within 4%.
4551

46-
The algorithm to determine proximity is not a simple calculation. The ranges in the preceding examples are not meant to be fixed, but you can use them as a guide to understand the impact of the algorithm.
52+
The algorithm to determine proximity is not a simple calculation. The ranges in the preceding examples are not meant to be fixed but should be used as a guide to understand the impact of the algorithm only.
4753

4854
## Turn on active learning
4955

5056
Active learning is off by default. Turn it on to see suggested questions.
5157

52-
1. Select **Publish** to publish the knowledge base. Active learning queries are collected from the GenerateAnswer API prediction endpoint only. The queries to the Test pane in the QnA Maker portal don't affect active learning.
58+
1. Select **Publish** to publish the knowledge base. Active learning queries are collected from the GenerateAnswer API prediction endpoint only. The queries to the Test pane in the QnA Maker portal do not impact active learning.
5359

54-
1. To turn active learning on, select your **Name**, and go to [**Service Settings**](https://www.qnamaker.ai/UserSettings) in the QnA Maker portal, in the top right corner.
60+
1. To turn active learning on, click on your **Name**, go to [**Service Settings**](https://www.qnamaker.ai/UserSettings) in the QnA Maker portal, in the top right corner.
5561

56-
![Screenshot of QnA Maker portal Service Settings](../media/improve-knowledge-base/Endpoint-Keys.png)
62+
![Turn on active learning's suggested question alternatives from the Service settings page. Select your user name in the top right menu, then select Service Settings.](../media/improve-knowledge-base/Endpoint-Keys.png)
5763

5864

59-
1. Find the QnA Maker service, and then toggle to **Active Learning**.
65+
1. Find the QnA Maker service then toggle **Active Learning**.
6066

61-
[![Screenshot of QnA Maker portal Service Settings](../media/improve-knowledge-base/turn-active-learning-on-at-service-setting.png)](../media/improve-knowledge-base/turn-active-learning-on-at-service-setting.png#lightbox)
67+
[![On the Service settings page, toggle on Active Learning feature. If you are not able to toggle the feature, you may need to upgrade your service.](../media/improve-knowledge-base/turn-active-learning-on-at-service-setting.png)](../media/improve-knowledge-base/turn-active-learning-on-at-service-setting.png#lightbox)
6268

63-
When active learning is enabled, the knowledge base suggests new questions at regular intervals based on user-submitted questions. You can disable active learning by toggling the setting again.
69+
Once **Active Learning** is enabled, the knowledge suggests new questions at regular intervals based on user-submitted questions. You can disable **Active Learning** by toggling the setting again.
6470

65-
## Add an active learning suggestion to the knowledge base
71+
## Add active learning suggestion to knowledge base
6672

67-
1. To see the suggested questions, on the **Edit** knowledge base page, select **View Options**. Then select **Show active learning suggestions**.
73+
1. In order to see the suggested questions, on the **Edit** knowledge base page, select **View Options**, then select **Show active learning suggestions**.
6874

69-
[![Screenshot of Edit section of the portal](../media/improve-knowledge-base/show-suggestions-button.png)](../media/improve-knowledge-base/show-suggestions-button.png#lightbox)
75+
[![On the Edit section of the portal, select Show Suggestions in order to see the active learning's new question alternatives.](../media/improve-knowledge-base/show-suggestions-button.png)](../media/improve-knowledge-base/show-suggestions-button.png#lightbox)
7076

71-
1. Filter the knowledge base with question and answer pairs to show only suggestions, by selecting **Filter by Suggestions**.
77+
1. Filter the knowledge base with question and answer pairs to show only suggestions by selecting **Filter by Suggestions**.
7278

73-
[![Screenshot of Filter by suggestions toggle](../media/improve-knowledge-base/filter-by-suggestions.png)](../media/improve-knowledge-base/filter-by-suggestions.png#lightbox)
79+
[![Use the Filter by suggestions toggle to view only the active learning's suggested question alternatives.](../media/improve-knowledge-base/filter-by-suggestions.png)](../media/improve-knowledge-base/filter-by-suggestions.png#lightbox)
7480

75-
1. Each question section with suggestions shows the new questions with either a check mark, `` , to accept the question, or an `x` to reject the suggestions. Select the check mark to add the question.
81+
1. Each question section with suggestions shows the new questions with a check mark, `` , to accept the question or an `x` to reject the suggestions. Select the check mark to add the question.
7682

77-
[![Screenshot of selecting or rejecting active learning's suggested question alternatives](../media/improve-knowledge-base/accept-active-learning-suggestions.png)](../media/improve-knowledge-base/accept-active-learning-suggestions.png#lightbox)
83+
[![Select or reject active learning's suggested question alternatives by selecting the green check mark or red delete mark.](../media/improve-knowledge-base/accept-active-learning-suggestions.png)](../media/improve-knowledge-base/accept-active-learning-suggestions.png#lightbox)
7884

79-
You can add or delete all suggestions by selecting **Add all** or **Reject all**.
85+
You can add or delete _all suggestions_ by selecting **Add all** or **Reject all**.
8086

8187
1. Select **Save and Train** to save the changes to the knowledge base.
8288

8389
1. Select **Publish** to allow the changes to be available from the GenerateAnswer API.
8490

8591
When 5 or more similar queries are clustered, every 30 minutes, QnA Maker suggests the user-based questions to the knowledge base designer to accept or reject.
8692

87-
## Ask for clarification
93+
## Determine best choice when several questions have similar scores
8894

89-
When a question is too close in score to other questions, you can ask QnA Maker for clarification.
95+
When a question is too close in score to other questions, the client-application developer can choose to ask for clarification.
9096

9197
### Use the top property in the GenerateAnswer request
9298

93-
When submitting a question to QnA Maker for an answer, you can use the top property of the JSON body, to return more than one top answer:
99+
When submitting a question to QnA Maker for an answer, part of the JSON body allows for returning more than one top answer:
94100

95101
```json
96102
{
@@ -100,7 +106,7 @@ When submitting a question to QnA Maker for an answer, you can use the top prope
100106
}
101107
```
102108

103-
In the preceding example, the client application (such as a chat bot) receives a response that includes the top 3 questions:
109+
When the client application (such as a chat bot) receives the response, the top 3 questions are returned:
104110

105111
```json
106112
{
@@ -141,15 +147,15 @@ In the preceding example, the client application (such as a chat bot) receives a
141147

142148
### Client application follow-up when questions have similar scores
143149

144-
The client application displays all the questions, with an option for the user to select the question that most represents their intention.
150+
The client application displays all the questions with an option for the user to select the question that most represents their intention.
145151

146-
When the user selects one of the existing questions, the client application sends the user's choice as feedback by using QnA Maker's Train API. This feedback completes the active learning feedback loop.
152+
Once the user selects one of the existing questions, the client application sends the user's choice as feedback using QnA Maker's Train API. This feedback completes the active learning feedback loop.
147153

148154
Use the [Azure Bot sample](https://aka.ms/activelearningsamplebot) to see active learning in an end-to-end scenario.
149155

150156
## Train API
151157

152-
The Train API POST request sends active learning feedback to QnA Maker. The API signature is:
158+
Active learning feedback is sent to QnA Maker with the Train API POST request. The API signature is:
153159

154160
```http
155161
POST https://<QnA-Maker-resource-name>.azurewebsites.net/qnamaker/knowledgebases/<knowledge-base-ID>/train
@@ -161,19 +167,19 @@ Content-Type: application/json
161167
|HTTP request property|Name|Type|Purpose|
162168
|--|--|--|--|
163169
|URL route parameter|Knowledge base ID|string|The GUID for your knowledge base.|
164-
|Host subdomain|QnAMaker resource name|string|The hostname for your QnA Maker in your Azure subscription. This is available on the **Settings** page after you publish the knowledge base. |
165-
|Header|Content-Type|string|The media type of the body sent to the API. The default value is: `application/json`.|
170+
|Host subdomain|QnAMaker resource name|string|The hostname for your QnA Maker in your Azure subscription. This is available on the Settings page after you publish the knowledge base. |
171+
|Header|Content-Type|string|The media type of the body sent to the API. Default value is: `application/json`|
166172
|Header|Authorization|string|Your endpoint key (EndpointKey xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).|
167-
|Post body|JSON object|JSON|The training feedback.|
173+
|Post Body|JSON object|JSON|The training feedback|
168174

169175
The JSON body has several settings:
170176

171177
|JSON body property|Type|Purpose|
172178
|--|--|--|--|
173179
|`feedbackRecords`|array|List of feedback.|
174-
|`userId`|string|The user ID of the person accepting the suggested questions. The user ID format is up to you. For example, an email address can be a valid user ID in your architecture. This property is optional.|
175-
|`userQuestion`|string|Exact text of the question. This property is required.|
176-
|`qnaID`|number|The ID of the question, found in the [GenerateAnswer response](metadata-generateanswer-usage.md#generateanswer-response-properties). |
180+
|`userId`|string|The user ID of the person accepting the suggested questions. The user ID format is up to you. For example, an email address can be a valid user ID in your architecture. Optional.|
181+
|`userQuestion`|string|Exact text of the question. Required.|
182+
|`qnaID`|number|ID of question, found in the [GenerateAnswer response](metadata-generateanswer-usage.md#generateanswer-response-properties). |
177183

178184
An example JSON body looks like:
179185

@@ -189,13 +195,13 @@ An example JSON body looks like:
189195
}
190196
```
191197

192-
A successful response returns a status of 204, and no JSON response body.
198+
A successful response returns a status of 204 and no JSON response body.
193199

194200
<a name="active-learning-is-saved-in-the-exported-apps-tsv-file"></a>
195201

196202
## Active learning is saved in the exported knowledge base
197203

198-
When your app has active learning enabled, and you export the app, the `SuggestedQuestions` column in the .tsv file retains the active learning data.
204+
When your app has active learning enabled, and you export the app, the `SuggestedQuestions` column in the tsv file retains the active learning data.
199205

200206
The `SuggestedQuestions` column is a JSON object of information of implicit, `autosuggested`, and explicit, `usersuggested` feedback. An example of this JSON object for a single user-submitted question of `help` is:
201207

@@ -219,8 +225,6 @@ The `SuggestedQuestions` column is a JSON object of information of implicit, `au
219225
When you reimport this app, the active learning continues to collect information and recommend suggestions for your knowledge base.
220226

221227
## Next steps
222-
223-
For best practices when using active learning, see [Best practices](../Concepts/best-practices.md#active-learning).
224-
228+
225229
> [!div class="nextstepaction"]
226230
> [Use metadata with GenerateAnswer API](metadata-generateanswer-usage.md)

0 commit comments

Comments
 (0)