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/Tutorials/create-publish-query-in-portal.md
+42-41Lines changed: 42 additions & 41 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
-
title: Create, publish, answer in QnA Maker
2
+
title: Create, publish, and answer in QnA Maker
3
3
titleSuffix: Azure Cognitive Services
4
-
description: Create a new knowledge base with questions and answers from a public web-based FAQ. Save, train, and publish the knowledge base. Once the knowledge base is published, send a question and receive an answer with a CURL command. Then create a bot and test the bot with the same question.
4
+
description: Create a new knowledge base with questions and answers from a public web-based FAQ. Save, train, and publish the knowledge base. After the knowledge base is published, send a question and receive an answer with a Curl command. Then create a bot, and test the bot with the same question.
5
5
services: cognitive-services
6
6
author: diberry
7
7
manager: nitinme
@@ -14,19 +14,20 @@ ms.author: diberry
14
14
#Customer intent: As an model designer, new to the QnA Maker service, I want to understand all the process requirements to create a knowledge base and generate an answer from that knowledge base.
15
15
---
16
16
17
-
# Tutorial: From QnA Maker portal, create a knowledge base
17
+
# Tutorial: From the QnA Maker portal, create a knowledge base
18
18
19
-
Create a new knowledge base with questions and answers from a public web-based FAQ. Save, train, and publish the knowledge base. Once the knowledge base is published, send a question and receive an answer with a Curl command. Then create a bot and test the bot with the same question.
19
+
Create a new knowledge base with questions and answers from a public web-based FAQ. Save, train, and publish the knowledge base. After the knowledge base is published, send a question and receive an answer with a Curl command. Then create a bot, and test the bot with the same question.
20
20
21
21
In this tutorial, you learn how to:
22
22
23
23
> [!div class="checklist"]
24
-
> * Create a knowledge base in the QnA Maker portal
25
-
> * Review, save, and train the knowledge base
26
-
> * Publish the knowledge base
27
-
> * Use Curl to query the knowledge base
28
-
> * Create a bot
29
-
>
24
+
> * Create a knowledge base in the QnA Maker portal.
25
+
> * Review, save, and train the knowledge base.
26
+
> * Publish the knowledge base.
27
+
> * Use Curl to query the knowledge base.
28
+
> * Create a bot.
29
+
30
+
30
31
> [!NOTE]
31
32
> The programmatic version of this tutorial is available with a complete solution from the [**Azure-Samples/cognitive-services-qnamaker-csharp** GitHub repository](https://github.com/Azure-Samples/cognitive-services-qnamaker-csharp/tree/master/documentation-samples/tutorials/create-publish-answer-knowledge-base).
32
33
@@ -40,75 +41,75 @@ This tutorial requires an existing [QnA Maker service](../How-To/set-up-qnamaker
40
41
41
42
1. Select **Create a knowledge base** from the top menu.
42
43
43
-

44
+

44
45
45
-
1. Skip the first step because you will use your existing QnA Maker service.
46
+
1. Skip the first step, because you will use your existing QnA Maker service.
46
47
47
-
1.In the next step, select your existing settings:
48
+
1.Select your existing settings:
48
49
49
50
|Setting|Purpose|
50
51
|--|--|
51
-
|Microsoft Azure Directory Id|Your _Microsoft Azure Directory ID_ is associated with the account you use to sign into the Azure portal and the QnA Maker portal. |
52
-
|Azure Subscription name|Your billing account you created the QnA Maker resource in.|
52
+
|Microsoft Azure Directory ID|This ID is associated with the account you use to sign into the Azure portal and the QnA Maker portal. |
53
+
|Azure Subscription name|The billing account in which you created the QnA Maker resource.|

56
+

56
57
57
-
1.In the next step, Enter your knowledge base name, `My Tutorial kb`.
58
+
1. Enter your knowledge base name, `My Tutorial kb`.
58
59
59
-

60
+

60
61
61
-
1.In the next step, populate your kb with the following settings:
62
+
1.Populate your knowledge base with the following settings:
62
63
63
64
|Setting name|Setting value|Purpose|
64
65
|--|--|--|
65
66
|URL|`https://docs.microsoft.com/azure/cognitive-services/qnamaker/faqs`|The contents of the FAQ at that URL are formatted with a question followed by an answer. QnA Maker can interpret this format to extract questions and the associated answers.|
66
67
|File |_not used in this tutorial_|This uploads files for questions and answers. |
67
68
|Chit-chat personality|Friendly|This gives a friendly and casual [personality](../Concepts/best-practices.md#chit-chat) to common questions and answers. You can edit these questions and answers later. |
68
69
69
-

70
+

70
71
71
72
1. Select **Create your KB** to finish the creation process.
72
73
73
-

74
+

74
75
75
-
## Review KB, save, and train
76
+
## Review, save, and train the knowledge base
76
77
77
78
1. Review the questions and answers. The first page is questions and answers from the URL.
78
79
79
-

80
+

80
81
81
82
1. Select the last page of questions and answers from the bottom of the table. The page shows questions and answers from the Chit-chat personality.
82
83
83
-
1. From the toolbar above the list of questions and answers, select the **View options** icon, then select **Show metadata**. This shows the metadata tags for each question and answer. The Chit-chat questions have the **editorial: chit-chat** metadata already set. This metadata is returned to the client application along with the selected answer. The client application, such as a chat bot, can use this filtered metadata to determine additional processing or interactions with the user.
84
+
1. From the toolbar above the list of questions and answers, select the **View options** icon, and then select **Show metadata**. This shows the metadata tags for each question and answer. The Chit-chat questions have the **editorial: chit-chat** metadata already set. This metadata is returned to the client application, along with the selected answer. The client application, such as a chat bot, can use this filtered metadata to determine additional processing or interactions with the user.

106
107
107
-
1. Copy the text of the **Curl** tab and execute in a Curl-enabled terminal or command-line. The authorization header's value includes the text `Endpoint` with a trailing space then the key.
108
+
1. Copy the text of the **Curl** tab, and run it in a Curl-enabled terminal or command-line. The authorization header's value includes the text `Endpoint`, with a trailing space and then the key.
108
109
109
110
1. Replace `<Your question>` with `How large can my KB be?`. This is close to the question, `How large a knowledge base can I create?`, but not exactly the same. QnA Maker applies natural language processing to determine that the two questions are the same.
110
111
111
-
1.Execute the Curl command and receive the JSON response including the score and answer.
112
+
1.Run the Curl command and receive the JSON response, including the score and answer.
112
113
113
114
```TXT
114
115
% Total % Received % Xferd Average Speed Time Time Time Current
@@ -136,7 +137,7 @@ Do not close this **Publish** page, you will use it to create a bot later in the
136
137
137
138
1. In the Curl-enabled terminal, replace `How large can my KB be?` with a bot conversation-ending statement from the user, such as `Thank you`.
138
139
139
-
1. Execute the Curl command and receive the JSON response including the score and answer.
140
+
1. Run the Curl command and receive the JSON response, including the score and answer.
140
141
141
142
```TXT
142
143
% Total % Received % Xferd Average Speed Time Time Time Current
@@ -170,15 +171,15 @@ Do not close this **Publish** page, you will use it to create a bot later in the
170
171
171
172
```
172
173
173
-
Because the question of `Thank you` exactly matched a Chit-chat question, QnA Maker is completely confident with the score of 100. QnA Maker also returned all the related questions as well as the metadata property containing the Chit-chat metadata tag information.
174
+
Because the question of `Thank you` exactly matched a Chit-chat question, QnA Maker is completely confident with the score of 100. QnA Maker also returned all the related questions, as well as the metadata property containing the Chit-chat metadata tag information.
174
175
175
176
## Use Curl to query for the default answer
176
177
177
-
Any question that QnA Maker is not confident in an answer receives the default answer. This answer is configured in the Azure portal.
178
+
Any question that QnA Maker is not confident about receives the default answer. This answer is configured in the Azure portal.
178
179
179
180
1. In the Curl-enabled terminal, replace `Thank you` with `x`.
180
181
181
-
1. Execute the Curl command and receive the JSON response including the score and answer.
182
+
1. Execute the Curl command and receive the JSON response, including the score and answer.
182
183
183
184
```TXT
184
185
% Total % Received % Xferd Average Speed Time Time Time Current
@@ -196,7 +197,7 @@ Any question that QnA Maker is not confident in an answer receives the default a
196
197
}
197
198
```
198
199
199
-
QnA Maker returned a score of `0`, which means no confidence but it also returned the default answer.
200
+
QnA Maker returned a score of `0`, which means no confidence. It also returned the default answer.
200
201
201
202
## Create a knowledge base bot
202
203
@@ -206,11 +207,11 @@ For more information, see [Create a chat bot with this knowledge base](create-qn
206
207
207
208
When you are done with the knowledge base bot, remove the resource group, `my-tutorial-rg`, to remove all the Azure resources created in the bot process.
208
209
209
-
When you are done with the knowledge base, in the QnA Maker portal, select **My knowledge bases**, then select the knowledge base, **My Tutorial kb**, then select the delete icon at the far right in that row.
210
+
When you are done with the knowledge base, in the QnA Maker portal, select **My knowledge bases**. Then select the knowledge base, **My Tutorial kb**, and select the delete icon at the far right in that row.
210
211
211
212
## Next steps
212
213
213
-
For more information, see [Data sources supported](../Concepts/data-sources-supported.md) for more information about support file formats.
214
+
See [Data sources supported](../Concepts/data-sources-supported.md) for more information about support file formats.
214
215
215
216
Learn more about Chit-chat [personalities](../Concepts/best-practices.md#chit-chat).
0 commit comments