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/Quickstarts/add-question-metadata-portal.md
+20-84Lines changed: 20 additions & 84 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,60 +1,48 @@
1
1
---
2
2
title: "Quickstart: Add questions and answer in QnA Maker portal"
3
-
titleSuffix: Azure Cognitive Services
4
3
description: This quickstart shows how to add question and answer sets with metadata so your users can find the right answer to their question.
5
4
services: cognitive-services
6
5
author: diberry
7
6
manager: nitinme
8
7
ms.service: cognitive-services
9
8
ms.subservice: qna-maker
10
9
ms.topic: quickstart
11
-
ms.date: 11/22/2019
10
+
ms.date: 02/08/2020
12
11
ms.author: diberry
13
12
---
14
13
15
14
# Quickstart: Add questions and answer with QnA Maker portal
16
15
17
-
Once a knowledge base is created, add question and answer sets with metadata so your users can find the right answer to their question.
18
-
19
-
The right answer is a single answer but there can be many ways a customer could ask the question that leads to that single answer.
20
-
21
-
For example, the questions in the following table are about Azure service limits, but each has to do with a different Azure service.
16
+
Once a knowledge base is created, add question and answer (QnA) sets with metadata to filter the answer. The questions in the following table are about Azure service limits, but each has to do with a different Azure service.
22
17
23
18
<aname="qna-table"></a>
24
19
25
-
26
20
|Set|Questions|Answer|Metadata|
27
21
|--|--|--|--|
28
22
|#1|`How large a knowledge base can I create?`<br><br>`What is the max size of a knowledge base?`<br><br>`How many GB of data can a knowledge base hold?`|`The size of the knowledge base depends on the SKU of Azure search you choose when creating the QnA Maker service. Read [here](https://docs.microsoft.com/azure/cognitive-services/qnamaker/tutorials/choosing-capacity-qnamaker-deployment) for more details.`|`service=qna_maker`<br>`link_in_answer=true`|
29
23
|#2|`How many knowledge bases can I have for my QnA Maker service?`<br><br>`I selected a Azure Cognitive Search tier that holds 15 knowledge bases, but I can only create 14 - what is going on?`<br><br>`What is the connection between the number of knowledge bases in my QnA Maker service and the Azure Cognitive Search service size?`|`Each knowledge base uses 1 index, and all the knowledge bases share a test index. You can have N-1 knowledge bases where N is the number of indexes your Azure Cognitive Search tier supports.`|`service=search`<br>`link_in_answer=false`|
30
24
31
-
Once metadata is added to a question-and-answer set, the client application can:
25
+
Once metadata is added to a QnA set, the client application can:
32
26
33
27
* Request answers that only match certain metadata.
34
28
* Receive all answers but post-process the answers depending on the metadata for each answer.
35
29
36
-
If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
37
30
38
31
## Prerequisites
39
32
40
-
* A QnA Maker service
41
-
* A Knowledge base created in that QnA Maker service
42
-
43
-
Both were created in the [first quickstart](../how-to/create-knowledge-base.md).
33
+
* Complete the [previous quickstart](./create-publish-knowledge-base.md)
44
34
45
35
## Sign in to the QnA Maker portal
46
36
47
37
1. Sign in to the [QnA Maker portal](https://www.qnamaker.ai).
48
38
49
-
1. Select your existing knowledge base. If you don't have a knowledge base, return to the [previous quickstart](../how-to/create-knowledge-base.md) and finish the steps to create your knowledge base.
39
+
1. Select your existing knowledge base from the [previous quickstart](../how-to/create-knowledge-base.md).
50
40
51
41
## Add additional alternatively-phrased questions
52
42
53
-
The current knowledge base, from the [previous quickstart](../how-to/create-knowledge-base.md), has the QnA Maker troubleshooting question and answer sets. These sets were created when the URL was added to the knowledge base during the creation process.
54
-
55
-
When this URL was imported, only one question with one answer was created.
43
+
The current knowledge base has the QnA Maker troubleshooting QnA sets. These sets were created when the URL was added to the knowledge base during the creation process.
56
44
57
-
In this procedure, add additional questions.
45
+
When this URL was imported, only one question with one answer was created. In this procedure, add additional questions.
58
46
59
47
1. From the **Edit** page, use the search textbox above the question and answer sets, to find the question `How large a knowledge base can I create?`
60
48
@@ -71,11 +59,13 @@ In this procedure, add additional questions.
71
59
72
60
`What GB size can a knowledge base be?`
73
61
74
-
The correct answer is returned in markdown format: `The size of the knowledge base depends on the SKU of Azure search you choose when creating the QnA Maker service. Read [here](https://docs.microsoft.com/azure/cognitive-services/qnamaker/tutorials/choosing-capacity-qnamaker-deployment) for more details.`
62
+
The correct answer is returned in markdown format:
63
+
64
+
`The size of the knowledge base depends on the SKU of Azure search you choose when creating the QnA Maker service. Read [here](https://docs.microsoft.com/azure/cognitive-services/qnamaker/tutorials/choosing-capacity-qnamaker-deployment) for more details.`
75
65
76
66
If you select **Inspect** under the returned answer, you can see more answers met the question but not with the same high level of confidence.
77
67
78
-
Do not add every possible combination of alternative phrasing. Turn on QnA Maker's [active learning](../how-to/improve-knowledge-base.md), this finds the alternative phrasings that will best help your knowledge base meet your users' needs.
68
+
Do not add every possible combination of alternative phrasing. When you turn on QnA Maker's [active learning](../how-to/improve-knowledge-base.md), this finds the alternative phrasings that will best help your knowledge base meet your users' needs.
79
69
80
70
1. Select **Test** again to close the test window.
81
71
@@ -87,11 +77,12 @@ Adding metadata to a question and answer set allows your client application to r
87
77
88
78
1. Select **View options**, then select **Show metadata**.
89
79
90
-
1. For the question and answer set you just added, select **Add metadata tags**, then add name of `service` and value of `search`,`service:search`.
80
+
1. For the QnA set you just added, select **Add metadata tags**, then add the name of `service` and the value of `search`. It looks like this:`service:search`.
91
81
92
-
1. Add another metadata tags with name of `link_in_answer` and value of `false`,`link_in_answer:false`.
82
+
1. Add another metadata tag with name of `link_in_answer` and value of `false`. It looks like this:`link_in_answer:false`.
93
83
94
84
1. Search for the first answer in the table, `How large a knowledge base can I create?`.
85
+
95
86
1. Add metadata pairs for the same two metadata tags:
96
87
97
88
`link_in_answer` : `true`<br>
@@ -102,71 +93,16 @@ Adding metadata to a question and answer set allows your client application to r
102
93
1. Select **Save and train** to retrain the knowledge base.
103
94
104
95
1. Select **Publish** in the top menu to go to the publish page.
105
-
1. Select the **Publish** button to publish the current knowledge base to a queryable endpoint.
106
-
1. After the knowledge base is published, select the **Curl** tab to see an example cURL command used to generate an answer from the knowledge base.
107
-
1. Copy the command to a note pad or other editable environment so you can edit the command. Edit for your own resource name, knowledge base ID and endpoint key:
96
+
1. Select the **Publish** button to publish the current knowledge base to the endpoint.
97
+
1. After the knowledge base is published, continue to the next quickstart to learn how to generate an answer from your knowledge base.
Notice the question is just a single word, `size`, which can return either question and answer set. The `strictFilters` array tells the response to reduce to just the `qna_maker` answers.
120
-
121
-
[!INCLUDE [Tip for debug property to JSON request](../includes/tip-debug-json.md)]
122
-
123
-
1. The response includes only the answer that meets the filter criteria.
124
-
125
-
The following cURL response has been formatted for readability:
126
-
127
-
```JSON
128
-
{
129
-
"answers": [
130
-
{
131
-
"questions": [
132
-
"How large a knowledge base can I create?",
133
-
"What is the max size of a knowledge base?",
134
-
"How many GB of data can a knowledge base hold?"
135
-
],
136
-
"answer": "The size of the knowledge base depends on the SKU of Azure search you choose when creating the QnA Maker service. Read [here](https://docs.microsoft.com/azure/cognitive-services/qnamaker/tutorials/choosing-capacity-qnamaker-deployment)for more details.",
If there is a question and answer set that didn't meet the search term but did meet the filter, it would not be returned. Instead, the general answer `No good match found in KB.` is returned.
161
-
162
-
Make sure to keep your metadata name and value pairs within the required limits.
99
+
## What did you accomplish?
163
100
164
-
## Clean up resources
101
+
You edited your knowledge base to support more questions and provided name/value pairs to support filtering during the search for the top answer or postprocessing, after the answer or answers are returned.
165
102
166
-
If you want to clean up and remove a Cognitive Services subscription, you can delete the resource or resource group. Deleting the resource group also deletes any other resources associated with it.
Copy file name to clipboardExpand all lines: articles/cognitive-services/QnAMaker/Quickstarts/batch-testing.md
+13-6Lines changed: 13 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ manager: nitinme
8
8
ms.service: cognitive-services
9
9
ms.subservice: qna-maker
10
10
ms.topic: quickstart
11
-
ms.date: 12/19/2019
11
+
ms.date: 02/08/2020
12
12
ms.author: diberry
13
13
---
14
14
@@ -19,7 +19,7 @@ Use the QnA Maker batch testing tool to test the knowledge bases in your QnA Mak
19
19
## Prerequisites
20
20
21
21
* Azure subscription - [create one for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F)
22
-
* Either [create a QnA Maker service](create-publish-knowledge-base.md#create-a-new-qna-maker-knowledge-base) or use an existing service, which uses the English language for the sample doc used in this quickstart.
22
+
* Either [create a QnA Maker service](create-publish-knowledge-base.md) or use an existing service, which uses the English language.
23
23
* Download the [multi-turn sample `.docx` file](https://github.com/Azure-Samples/cognitive-services-sample-data-files/blob/master/qna-maker/data-source-formats/multi-turn.docx)
24
24
* Download the [batch testing tool](https://aka.ms/qnamakerbatchtestingtool), extract the executable file from the `.zip` file.
25
25
@@ -36,9 +36,16 @@ Use the QnA Maker batch testing tool to test the knowledge bases in your QnA Mak
36
36
* Azure QnA Service Name
37
37
* Language - the English language
38
38
1. Enter the name `Multi-turn batch test quickstart` as the name of your knowledge base.
39
-
1. In **Step 4**, check **Enable multi-turn extraction from URLs, .pdf or .docx files**.
40
-
1. Enter the **Default answer text** of `Quickstart - can't find answer`. In a production knowledge base, this information should be more instructive to the user but for this quickstart, a simple response works.
41
-
1. Still in **Step 4**, select **+ Add file** then select the downloaded `.docx` file listing in the prerequisites.
39
+
40
+
1. In **Step 4**, configure the settings with the following table:
41
+
42
+
|Setting|Value|
43
+
|--|--|
44
+
|**Enable multi-turn extraction from URLs, .pdf or .docx files.**|Checked|
45
+
|**Default answer text**|`Batch test - default answer not found.`|
46
+
|**+ Add File**|Select the downloaded `.docx` file listing in the prerequisites.|
47
+
|**Chit-chat**|Select **Professional**|
48
+
42
49
1. In **Step 5**, select **Create your KB**.
43
50
44
51
When the creation process finishes, the portal displays the editable knowledge base.
@@ -155,7 +162,7 @@ There are two main scenarios for batch testing:
155
162
***Process chat log files** - Determine the top answer for a previously unseen question - the most common situation is when you need to process are log file of queries, such as a chat bot's user questions. Create a batch file test, with only the required columns. The test returns the top answer for each question. That doesn't mean it the top answer is the correct answer. Once you complete this test, move on to the validation test.
156
163
***Validation test** - Validate the expected answer. This test requires that all the questions and matching expected answers in the batch test have been validated. This may require some manual process.
157
164
158
-
The following procedure assumes the scenario is to process chat logs with
165
+
The following procedure assumes the scenario is to process chat logs with
159
166
160
167
1. Create a new batch test file to include optional data, `batch-test-data-2.tsv`. Add the 6 rows from the original batch test input file, then add the metadata, top, and QnA set ID for each row.
0 commit comments