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/cognitive-services/QnAMaker/Concepts/best-practices.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -108,7 +108,7 @@ QnA Maker allows users to [collaborate](../How-to/collaborate-knowledge-base.md)
108
108
109
109
## Active learning
110
110
111
-
[Active learning](../How-to/improve-knowledge-base.md) does the best job of suggesting alternative questions when it has a wide range of quality and quantity of user-based queries. It is important to allow client-applications' user queries to participate in the active learning feedback loop without censorship. Once questions are suggested in the QnA Maker portal, you can **[filter by suggestions](../How-To/improve-knowledge-base.md#add-active-learning-suggestion-to-knowledge-base)** then review and accept or reject those suggestions.
111
+
[Active learning](../How-to/improve-knowledge-base.md) does the best job of suggesting alternative questions when it has a wide range of quality and quantity of user-based queries. It is important to allow client-applications' user queries to participate in the active learning feedback loop without censorship. Once questions are suggested in the QnA Maker portal, you can **[filter by suggestions](../How-To/improve-knowledge-base.md)** then review and accept or reject those suggestions.
Copy file name to clipboardExpand all lines: articles/cognitive-services/QnAMaker/How-To/metadata-generateanswer-usage.md
+23-23Lines changed: 23 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Metadata with GenerateAnswer API - QnA Maker
3
3
titleSuffix: Azure Cognitive Services
4
-
description: QnA Maker lets you add metadata, in the form of key/value pairs, to your question/answer sets. This information can be used to filter results to user queries and to store additional information that can be used in follow-up conversations.
4
+
description: QnA Maker lets you add metadata, in the form of key/value pairs, to your question/answer sets. You can filter results to user queries, and store additional information that can be used in follow-up conversations.
5
5
services: cognitive-services
6
6
author: tulasim88
7
7
manager: nitinme
@@ -12,41 +12,41 @@ ms.date: 05/30/2019
12
12
ms.author: tulasim
13
13
---
14
14
15
-
# Get a knowledge answer with the GenerateAnswer API and metadata
15
+
# Get an answer with the GenerateAnswer API and metadata
16
16
17
-
To get the predicted answer to a user's question, use the GenerateAnswer API. When you publish a knowledge base, this information to use this API is shown on the publish page. You can also configure the API to filter answers based on metadata tags and test the knowledge base from the endpoint with the test query string parameter.
17
+
To get the predicted answer to a user's question, use the GenerateAnswer API. When you publish a knowledge base, you can see information about how to use this API on the **Publish** page. You can also configure the API to filter answers based on metadata tags, and test the knowledge base from the endpoint with the test query string parameter.
18
18
19
-
QnA Maker lets you add metadata, in the form of key and value pairs, to your question/answer sets. This information can be used to filter results to user queries and to store additional information that can be used in follow-up conversations. For more information, see [Knowledge base](../Concepts/knowledge-base.md).
19
+
QnA Maker lets you add metadata, in the form of key and value pairs, to your sets of questions and answers. You can then use this information to filter results to user queries, and to store additional information that can be used in follow-up conversations. For more information, see [Knowledge base](../Concepts/knowledge-base.md).
20
20
21
21
<aname="qna-entity"></a>
22
22
23
-
## Storing questions and answers with a QnA Entity
23
+
## Store questions and answers with a QnA entity
24
24
25
-
First it's important to understand how QnA Maker stores the question/answer data. The following illustration shows a QnA entity:
25
+
It's important to understand how QnA Maker stores the question and answer data. The following illustration shows a QnA entity:

28
28
29
-
Each QnA entity has a unique and persistent ID. The ID can be used to make updates to a particular QnA entity.
29
+
Each QnA entity has a unique and persistent ID. You can use the ID to make updates to a particular QnA entity.
30
30
31
31
<aname="generateanswer-api"></a>
32
32
33
33
## Get answer predictions with the GenerateAnswer API
34
34
35
-
You use the GenerateAnswer API in your Bot or application to query your knowledge base with a user question to get the best match from the question/answer sets.
35
+
You use the GenerateAnswer API in your bot or application to query your knowledge base with a user question, to get the best match from the question and answer sets.
36
36
37
37
<aname="generateanswer-endpoint"></a>
38
38
39
39
## Publish to get GenerateAnswer endpoint
40
40
41
-
Once you publish your knowledge base, either from the [QnA Maker portal](https://www.qnamaker.ai), or using the [API](https://go.microsoft.com/fwlink/?linkid=2092179), you can get the details of your GenerateAnswer endpoint.
41
+
After you publish your knowledge base, either from the [QnA Maker portal](https://www.qnamaker.ai), or by using the [API](https://go.microsoft.com/fwlink/?linkid=2092179), you can get the details of your GenerateAnswer endpoint.
42
42
43
43
To get your endpoint details:
44
44
1. Sign in to [https://www.qnamaker.ai](https://www.qnamaker.ai).
45
-
1. In **My knowledge bases**, click on**View Code** for your knowledge base.
|URL route parameter|Knowledge base ID|string|The GUID for your knowledge base.|
68
-
|URL route parameter|QnAMaker endpoint host|string|The hostname of the endpoint deployed in your Azure subscription. This is available on the Settings page after you publish the knowledge base. |
68
+
|URL route parameter|QnAMaker endpoint host|string|The hostname of the endpoint deployed in your Azure subscription. This is available on the **Settings** page after you publish the knowledge base. |
69
69
|Header|Content-Type|string|The media type of the body sent to the API. Default value is: ``|
|Post Body|JSON object|JSON|The question with settings|
71
+
|Post Body|JSON object|JSON|The question with settings.|
72
72
73
73
74
74
The JSON body has several settings:
@@ -79,7 +79,7 @@ The JSON body has several settings:
79
79
|`top`|optional|integer|The number of ranked results to include in the output. The default value is 1.|
80
80
|`userId`|optional|string|A unique ID to identify the user. This ID will be recorded in the chat logs.|
81
81
|`scoreThreshold`|optional|integer|Only answers with confidence score above this threshold will be returned. The default value is 0.|
82
-
|`isTest`|optional|boolean|If set to true, returns results from `testkb` Search index instead of published index.|
82
+
|`isTest`|optional|Boolean|If set to true, returns results from `testkb` Search index instead of published index.|
83
83
|`strictFilters`|optional|string|If specified, tells QnA Maker to return only answers that have the specified metadata. Use `none` to indicate response should have no metadata filters. |
84
84
|`RankerType`|optional|string|If specified as `QuestionOnly`, tells QnA Maker to search questions only. If not specified, QnA Maker searches questions and answers.
85
85
@@ -142,19 +142,19 @@ A successful response returns a status of 200 and a JSON response.
142
142
143
143
<aname="metadata-example"></a>
144
144
145
-
## Using metadata allows you to filter answers by custom metadata tags
145
+
## Use metadata to filter answers by custom metadata tags
146
146
147
-
Adding metadata allows you to filter the answers by these metadata tags. Add the metadata column from the **View Options** menu. Add metadata to your knowledge base by clicking on the metadata **+** icon to add a metadata pair. This pair consists of one key and one value.
147
+
Adding metadata allows you to filter the answers by these metadata tags. Add the metadata column from the **View Options** menu. Add metadata to your knowledge base by selecting the metadata **+** icon to add a metadata pair. This pair consists of one key and one value.
## Filter results with strictFilters for metadata tags
154
154
155
-
Consider the user question "When does this hotel close?" where the intent is implied for the restaurant "Paradise."
155
+
Consider the user question "When does this hotel close?", where the intent is implied for the restaurant "Paradise."
156
156
157
-
Since results are required only for the restaurant "Paradise", you can set a filter in the GenerateAnswer call on the metadata "Restaurant Name", as follows.
157
+
Because results are required only for the restaurant "Paradise", you can set a filter in the GenerateAnswer call on the metadata "Restaurant Name". The following example shows this:
158
158
159
159
```json
160
160
{
@@ -172,7 +172,7 @@ Since results are required only for the restaurant "Paradise", you can set a fil
172
172
173
173
## Use question and answer results to keep conversation context
174
174
175
-
The response to the GenerateAnswer contains the corresponding metadata information of the matched question/answer set. This information can be used in your client application to store the context of the previous conversation for use in later conversations.
175
+
The response to the GenerateAnswer contains the corresponding metadata information of the matched question and answer set. You can use this information in your client application to store the context of the previous conversation for use in later conversations.
176
176
177
177
```json
178
178
{
@@ -217,7 +217,7 @@ You can search through the published kb, using `isTest=false`, or in the test kb
217
217
218
218
## Next steps
219
219
220
-
The publish page also provides information to generate an answer with [Postman](../Quickstarts/get-answer-from-kb-using-postman.md) and [cURL](../Quickstarts/get-answer-from-kb-using-curl.md).
220
+
The **Publish** page also provides information to generate an answer with [Postman](../Quickstarts/get-answer-from-kb-using-postman.md) and [cURL](../Quickstarts/get-answer-from-kb-using-curl.md).
221
221
222
222
> [!div class="nextstepaction"]
223
223
> [Create a knowledge base](./create-knowledge-base.md)
Copy file name to clipboardExpand all lines: articles/cognitive-services/QnAMaker/Quickstarts/create-publish-knowledge-base.md
+23-22Lines changed: 23 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: "Create, train, publish knowledge base - QnA Maker"
2
+
title: "Create, train, and publish knowledge base - QnA Maker"
3
3
titleSuffix: Azure Cognitive Services
4
4
description: You can create a QnA Maker knowledge base (KB) from your own content, such as FAQs or product manuals. The QnA Maker knowledge base in this example is created from a simple FAQ webpage to answer questions on BitLocker key recovery.
5
5
author: diberry
@@ -14,7 +14,7 @@ ms.author: diberry
14
14
15
15
# Create, train, and publish your QnA Maker knowledge base
16
16
17
-
You can create a QnA Maker knowledge base (KB) from your own content, such as FAQs or product manuals. The QnA Maker knowledge base in this example is created from a simple FAQ webpage to answer questions on BitLocker key recovery.
17
+
You can create a QnA Maker knowledge base (KB) from your own content, such as FAQs or product manuals. This article includes an example of creating a QnA Maker knowledge base from a simple FAQ webpage, to answer questions on BitLocker key recovery.
18
18
19
19
## Prerequisite
20
20
@@ -23,36 +23,36 @@ You can create a QnA Maker knowledge base (KB) from your own content, such as FA
23
23
24
24
## Create a QnA Maker knowledge base
25
25
26
-
1. Sign in to [QnAMaker.ai](https://QnAMaker.ai) portal with your Azure credentials.
26
+
1. Sign in to the [QnAMaker.ai](https://QnAMaker.ai) portal with your Azure credentials.
27
27
28
28
1. On the QnA Maker portal, select **Create a knowledge base**.
29
29
30
-

30
+

31
31
32
32
1. On the **Create** page, in step 1, select **Create a QnA service**. You are directed to the [Azure portal](https://ms.portal.azure.com/#create/Microsoft.CognitiveServicesQnAMaker) to set up a QnA Maker service in your subscription. If the Azure portal times out, select **Try again** on the site. After you connect, your Azure dashboard appears.
33
33
34
-
1. After you successfully create a new QnA Maker service in Azure, return to qnamaker.ai/create. Select your QnA service from the drop-down lists in step 2. If you created a new QnA service, be sure to refresh the page.
34
+
1. After you successfully create a new QnA Maker service in Azure, return to qnamaker.ai/create. Select your QnA Maker service from the drop-down lists in step 2. If you created a new QnA Maker service, be sure to refresh the page.
35
35
36
-

36
+

37
37
38
38
1. In step 3, name your knowledge base **My Sample QnA KB**.
39
39
40
40
1. To add content to your knowledge base, select three types of data sources. In step 4, under **Populate your KB**, add the
41
41
[BitLocker Recovery FAQ](https://docs.microsoft.com/windows/security/information-protection/bitlocker/bitlocker-overview-and-requirements-faq) URL in the **URL** box.
42
42
43
-

43
+

44
44
45
45
1. In step 5, select **Create your KB**.
46
46
47
-
1. While the knowledge base is being created, a pop-up window appears. The extraction process takes a few minutes to read the HTML page and identify questions and answers.
47
+
1. While QnA Maker creates the knowledge base, a pop-up window appears. The extraction process takes a few minutes to read the HTML page and identify questions and answers.
48
48
49
-
1. After the knowledge base is successfully created, the **Knowledge base** page opens. You can edit the contents of the knowledge base on this page.
49
+
1. After QnA Maker successfully creates the knowledge base, the **Knowledge base** page opens. You can edit the contents of the knowledge base on this page.
50
50
51
51
## Edit the knowledge base
52
52
53
-
1. In the QnA Maker portal, on the **Edit** section, **Add QnA pair** to add a new row to the knowledge base. Under **Question**, enter **Hi.** Under **Answer**, enter **Hello. Ask me BitLocker questions.**
53
+
1. In the QnA Maker portal, on the **Edit** section, select **Add QnA pair** to add a new row to the knowledge base. Under **Question**, enter **Hi.** Under **Answer**, enter **Hello. Ask me BitLocker questions.**
54
54
55
-

55
+

56
56
57
57
1. In the upper right, select **Save and train** to save your edits and train the QnA Maker model. Edits aren't kept unless they're saved.
58
58
@@ -62,41 +62,42 @@ You can create a QnA Maker knowledge base (KB) from your own content, such as FA
62
62
63
63
1. Select **Inspect** to examine the response in more detail. The test window is used to test your changes to the knowledge base before they're published.

66
66
67
67
1. Select **Test** again to close the **Test** pop-up.
68
68
69
69
## Publish the knowledge base
70
70
71
71
When you publish a knowledge base, the question and answer contents of your knowledge base moves from the test index to a production index in Azure search.
72
72
73
-

73
+

74
74
75
75
1. In the QnA Maker portal, in the menu next to **Edit**, select **Publish**. Then to confirm, select **Publish** on the page.
76
76
77
77
1. The QnA Maker service is now successfully published. You can use the endpoint in your application or bot code.

80
80
81
81
## Create a bot
82
82
83
-
Creating a bot is always available after publishing, from the **Publish** page.
83
+
After publishing, you can create a bot from the **Publish** page:
84
84
85
85
* You can create several bots quickly, all pointing to the same knowledge base for different regions or pricing plans for the individual bots.
86
86
* If you want only one bot for the knowledge base, use the **View all your bots on the Azure portal** link to view a list of your current bots.
87
-
* When you make changes to the knowledge base and republish, you do not need to take further action with the bot. It is already configured to work with the knowledge base and will work with all future changes to the knowledge base. Every time you publish a knowledge base - all the bots connected to it are automatically updated
88
87
89
-
1. In the QnA Maker portal, on the **Publish** page, select **Create bot**. This button appears only after the knowledge base is published.
88
+
When you make changes to the knowledge base and republish, you don't need to take further action with the bot. It's already configured to work with the knowledge base, and works with all future changes to the knowledge base. Every time you publish a knowledge base, all the bots connected to it are automatically updated.
90
89
91
-

90
+
1.In the QnA Maker portal, on the **Publish** page, select **Create bot**. This button appears only after you've published the knowledgebase.
92
91
93
-
1. A new browser tab opens for the Azure portal, with the Azure Bot Service's creation page. Configure the Azure bot service. For more information on these configuration settings, see [Create a QnA Bot with Azure Bot Service v4](../tutorials/create-qna-bot.md) tutorial.
92
+

93
+
94
+
1. A new browser tab opens for the Azure portal, with the Azure Bot Service's creation page. Configure the Azure bot service. For more information on these configuration settings, see [Create a QnA Bot with Azure Bot Service v4](../tutorials/create-qna-bot.md).
94
95
95
-
*Do not change the following settings in the Azure portal when creating the bot. They are pre-populated for your existing knowledge base:
96
+
*Don't change the following settings in the Azure portal when creating the bot. They are pre-populated for your existing knowledge base:
96
97
* QnA Auth Key
97
-
* App service plan/Location
98
+
* App service plan and location
98
99
* Azure Storage
99
-
* The bot and QnA Maker can share the web app service _plan_ but can't share the web app. This means the **app name** must be different from the app name you used when you created the QnA Maker service.
100
+
* The bot and QnA Maker can share the web app service plan, but can't share the web app. This means the **app name** must be different from the app name you used when you created the QnA Maker service.
0 commit comments