Skip to content

Commit 6fe571f

Browse files
committed
edit pass: four-qna-maker-articles
1 parent a4488a1 commit 6fe571f

File tree

1 file changed

+44
-48
lines changed

1 file changed

+44
-48
lines changed

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

Lines changed: 44 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2-
title: Improve knowledge base - QnA Maker
2+
title: Improve your 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. 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.
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.
55
author: diberry
66
manager: nitinme
77
services: cognitive-services
@@ -14,89 +14,83 @@ ms.author: diberry
1414

1515
# Use active learning to improve your knowledge base
1616

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.
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.
1818

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.
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.
2020

2121
## What is active learning?
2222

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

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.
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.
2727

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

3030
## How active learning works
3131

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.
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.
3333

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.
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.
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.
37-
38-
Once questions are suggested in the QnA Maker portal, 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. You need to review and accept or reject those suggestions.
3937

4038
## Upgrade your version to use active learning
4139

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).
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.
4741

4842
## Score proximity between knowledge base questions
4943

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%.
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.
5145

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.
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.
5347

5448
## Turn on active learning
5549

5650
Active learning is off by default. Turn it on to see suggested questions.
5751

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.
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 impact active learning.
5953

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.
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.
6155

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)
56+
![Screenshot of QnA Maker portal Service Settings](../media/improve-knowledge-base/Endpoint-Keys.png)
6357

6458

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

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)
61+
[![Screenshot of QnA Maker portal Service Settings](../media/improve-knowledge-base/turn-active-learning-on-at-service-setting.png#lightbox)
6862

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.
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.
7064

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

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

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)
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)
7670

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

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)
73+
[![Screenshot of Filter by suggestions toggle](../media/improve-knowledge-base/filter-by-suggestions.png)](../media/improve-knowledge-base/filter-by-suggestions.png#lightbox)
8074

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.
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.
8276

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)
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)
8478

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

8781
1. Select **Save and Train** to save the changes to the knowledge base.
8882

8983
1. Select **Publish** to allow the changes to be available from the GenerateAnswer API.
9084

9185
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.
9286

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

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

9791
### Use the top property in the GenerateAnswer request
9892

99-
When submitting a question to QnA Maker for an answer, part of the JSON body allows for returning more than one top answer:
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:
10094

10195
```json
10296
{
@@ -106,7 +100,7 @@ When submitting a question to QnA Maker for an answer, part of the JSON body all
106100
}
107101
```
108102

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

111105
```json
112106
{
@@ -147,15 +141,15 @@ When the client application (such as a chat bot) receives the response, the top
147141

148142
### Client application follow-up when questions have similar scores
149143

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

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.
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.
153147

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

156150
## Train API
157151

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

160154
```http
161155
POST https://<QnA-Maker-resource-name>.azurewebsites.net/qnamaker/knowledgebases/<knowledge-base-ID>/train
@@ -167,19 +161,19 @@ Content-Type: application/json
167161
|HTTP request property|Name|Type|Purpose|
168162
|--|--|--|--|
169163
|URL route parameter|Knowledge base ID|string|The GUID for your knowledge base.|
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`|
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`.|
172166
|Header|Authorization|string|Your endpoint key (EndpointKey xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).|
173-
|Post Body|JSON object|JSON|The training feedback|
167+
|Post body|JSON object|JSON|The training feedback.|
174168

175169
The JSON body has several settings:
176170

177171
|JSON body property|Type|Purpose|
178172
|--|--|--|--|
179173
|`feedbackRecords`|array|List of feedback.|
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). |
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). |
183177

184178
An example JSON body looks like:
185179

@@ -195,13 +189,13 @@ An example JSON body looks like:
195189
}
196190
```
197191

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

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

202196
## Active learning is saved in the exported knowledge base
203197

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.
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.
205199

206200
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:
207201

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

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

0 commit comments

Comments
 (0)