Skip to content

Commit 1ef323b

Browse files
committed
[Cogsvcs] Qna - Portal Quickstarts
1 parent 2d73aa8 commit 1ef323b

12 files changed

+874
-448
lines changed

.openpublishing.redirection.json

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -970,6 +970,11 @@
970970
"redirect_url": "/azure/cognitive-services/LUIS/luis-how-to-azure-subscription",
971971
"redirect_document_id": false
972972
},
973+
{
974+
"source_path": "articles/cognitive-services/QnAMaker/Tutorials/create-publish-answer.md",
975+
"redirect_url": "/azure/cognitive-services/QnAMaker/quickstarts/create-new-kb-csharp",
976+
"redirect_document_id": false
977+
},
973978
{
974979
"source_path": "articles/cognitive-services/QnAMaker/Concepts/data-sources-supported.md",
975980
"redirect_url": "/azure/cognitive-services/QnAMaker/concepts/knowledge-base",
@@ -45085,10 +45090,10 @@
4508545090
"redirect_url": "/azure/iot-central/core/howto-use-action-groups/",
4508645091
"redirect_document_id": true
4508745092
},
45088-
{
45089-
"source_path": "articles/storage/blobs/data-lake-storage-use-power-bi.md",
45090-
"redirect_url": "https://docs.microsoft.com/power-query/connectors/datalakestorage",
45091-
"redirect_document_id": false
45093+
{
45094+
"source_path": "articles/storage/blobs/data-lake-storage-use-power-bi.md",
45095+
"redirect_url": "https://docs.microsoft.com/power-query/connectors/datalakestorage",
45096+
"redirect_document_id": false
4509245097
},
4509345098
{
4509445099
"source_path": "articles/iot-central/preview/howto-use-app-templates.md",

articles/cognitive-services/QnAMaker/Quickstarts/add-question-metadata-portal.md

Lines changed: 20 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,48 @@
11
---
22
title: "Quickstart: Add questions and answer in QnA Maker portal"
3-
titleSuffix: Azure Cognitive Services
43
description: This quickstart shows how to add question and answer sets with metadata so your users can find the right answer to their question.
54
services: cognitive-services
65
author: diberry
76
manager: nitinme
87
ms.service: cognitive-services
98
ms.subservice: qna-maker
109
ms.topic: quickstart
11-
ms.date: 11/22/2019
10+
ms.date: 02/08/2020
1211
ms.author: diberry
1312
---
1413

1514
# Quickstart: Add questions and answer with QnA Maker portal
1615

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

2318
<a name="qna-table"></a>
2419

25-
2620
|Set|Questions|Answer|Metadata|
2721
|--|--|--|--|
2822
|#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`|
2923
|#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`|
3024

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:
3226

3327
* Request answers that only match certain metadata.
3428
* Receive all answers but post-process the answers depending on the metadata for each answer.
3529

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

3831
## Prerequisites
3932

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](./quickstarts/create-publish-knowledge-base.md)
4434

4535
## Sign in to the QnA Maker portal
4636

4737
1. Sign in to the [QnA Maker portal](https://www.qnamaker.ai).
4838

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

5141
## Add additional alternatively-phrased questions
5242

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

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

5947
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?`
6048

@@ -71,11 +59,13 @@ In this procedure, add additional questions.
7159

7260
`What GB size can a knowledge base be?`
7361

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.`
7565

7666
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.
7767

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

8070
1. Select **Test** again to close the test window.
8171

@@ -87,11 +77,12 @@ Adding metadata to a question and answer set allows your client application to r
8777

8878
1. Select **View options**, then select **Show metadata**.
8979

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`.
9181

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`.
9383

9484
1. Search for the first answer in the table, `How large a knowledge base can I create?`.
85+
9586
1. Add metadata pairs for the same two metadata tags:
9687

9788
`link_in_answer` : `true`<br>
@@ -102,71 +93,16 @@ Adding metadata to a question and answer set allows your client application to r
10293
1. Select **Save and train** to retrain the knowledge base.
10394

10495
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.
10898

109-
|Replace|
110-
|--|
111-
|`your-resource-name`|
112-
|`your-knowledge-base-id`|
113-
|`your-endpoint-key`|
114-
115-
```curl
116-
curl -X POST https://your-resource-name.azurewebsites.net/qnamaker/knowledgebases/your-knowledge-base-id/generateAnswer -H "Authorization: EndpointKey your-endpoint-key" -H "Content-type: application/json" -d "{'top':30, 'question':'size','strictFilters': [{'name':'service','value':'qna_maker'}]}"
117-
```
118-
119-
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.",
137-
"score": 68.76,
138-
"id": 3,
139-
"source": "https://docs.microsoft.com/azure/cognitive-services/qnamaker/troubleshooting",
140-
"metadata": [
141-
{
142-
"name": "link_in_answer",
143-
"value": "true"
144-
},
145-
{
146-
"name": "service",
147-
"value": "qna_maker"
148-
}
149-
],
150-
"context": {
151-
"isContextOnly": false,
152-
"prompts": []
153-
}
154-
}
155-
],
156-
"debugInfo": null
157-
}
158-
```
159-
160-
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?
163100

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

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.
103+
## Clean up resources
167104

168-
* [Portal](../../cognitive-services-apis-create-account.md#clean-up-resources)
169-
* [Azure CLI](../../cognitive-services-apis-create-account-cli.md#clean-up-resources)
105+
If you are not continuing to the next quickstart, delete the QnA Maker and Bot framework resources in the Azure portal.
170106

171107
## Next steps
172108

articles/cognitive-services/QnAMaker/Quickstarts/create-publish-knowledge-base.md

Lines changed: 29 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,50 @@
11
---
22
title: "Quickstart: Create, train, and publish knowledge base - QnA Maker"
3-
titleSuffix: Azure Cognitive Services
4-
description: This quickstart shows how to 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-
author: diberry
6-
manager: nitinme
7-
services: cognitive-services
8-
ms.service: cognitive-services
9-
ms.subservice: qna-maker
3+
description: 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 QnA Maker.
104
ms.topic: quickstart
11-
ms.date: 01/29/2020
12-
ms.author: diberry
5+
ms.date: 02/08/2020
136
---
147

158
# Quickstart: Create, train, and publish your QnA Maker knowledge base
169

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.
10+
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 QnA Maker.
1811

19-
Include a chit-chat personality to make your knowledge more engaging with your users.
20-
21-
[!INCLUDE [Custom subdomains notice](../../../../includes/cognitive-services-custom-subdomains-note.md)]
22-
23-
## Prerequisite
12+
## Prerequisites
2413

2514
> [!div class="checklist"]
2615
> * If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
16+
> * A QnA Maker [resource](https://ms.portal.azure.com/#create/Microsoft.CognitiveServicesQnAMaker) created in the Azure portal. Remember your Azure Active Directory ID, Subscription, QnA resource name you selected when you created the resource.
2717
28-
## Create a new QnA Maker knowledge base
18+
## Create your first QnA Maker knowledge base
2919

3020
1. Sign in to the [QnAMaker.ai](https://QnAMaker.ai) portal with your Azure credentials.
3121

32-
1. On the QnA Maker portal, select **Create a knowledge base**.
22+
1. In the QnA Maker portal, select **Create a knowledge base**.
3323

34-
1. On the **Create** page, 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.
24+
1. On the **Create** page, skip **Step 1** if you already have your QnA Maker resource.
3525

36-
1. In the Azure portal, create the resource. Remember your Azure Active Directory ID, Subscription, QnA resource name you selected when creating the resource.
37-
1. Return to the QnA Maker portal, refresh the web page in the portal, to continue creating your knowledge base. Select an existing tenant, subscription, and the new resource. Select the language. This will be the language used for all knowledge bases in this QnA Maker service.
26+
If you haven't created the resource yet, 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. Remember your Azure Active Directory ID, Subscription, QnA resource name you selected when you created the resource.
3827

39-
![Screenshot of selecting a QnA Maker service knowledge base](../media/qnamaker-quickstart-kb/qnaservice-selection.png)
28+
When you are done creating the resource in the Azure portal, return to the QnA Maker portal, refresh the browser page, and continue to **Step 2**.
4029

41-
1. Name your knowledge base **My Sample QnA KB**.
30+
1. In **Step 3**, select your Active directory, subscription, service (resource), and the language for all knowledge bases created in the service.
4231

43-
1. Add a sample word document as a URL:
32+
![Screenshot of selecting a QnA Maker service knowledge base](../media/qnamaker-quickstart-kb/qnaservice-selection.png)
4433

45-
`https://docs.microsoft.com/azure/cognitive-services/qnamaker/troubleshooting`
34+
1. In **Step 3**, name your knowledge base **My Sample QnA KB**.
4635

47-
1. Select `+ Add URL`.
36+
1. In **Step 4**, configure the settings with the following table:
4837

49-
1. Add **_professional_ Chit-chat** to your KB.
38+
|Setting|Value|
39+
|--|--|
40+
|**Enable multi-turn extraction from URLs, .pdf or .docx files.**|Checked|
41+
|**Default answer text**| `Quickstart - default answer not found.`|
42+
|**+ Add URL**|`https://docs.microsoft.com/azure/cognitive-services/qnamaker/troubleshooting`|
43+
|**Chit-chat**|Select **Professional**|
5044

51-
1. Select **Create your KB**.
45+
1. In **Step 5**, Select **Create your KB**.
5246

53-
The extraction process takes a few minutes to read the document and identify questions and answers.
47+
The extraction process takes a few moments to read the document and identify questions and answers.
5448

5549
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.
5650

@@ -73,7 +67,7 @@ Include a chit-chat personality to make your knowledge more engaging with your u
7367

7468
## Save and train
7569

76-
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.
70+
In the upper right, select **Save and train** to save your edits and train QnA Maker . Edits aren't kept unless they're saved.
7771

7872
## Test the knowledge base
7973

@@ -140,19 +134,21 @@ You created a new knowledge base, added a public URL to the knowledge base, adde
140134

141135
After publishing the knowledge base, you created a bot, and tested the bot.
142136

143-
This was all accomplished in a few minutes without having to write any code and clean the content.
137+
This was all accomplished in a few minutes without having to write any code or clean the content.
144138

145139
## Clean up resources
146140

147-
Clean up the QnA Maker and Bot framework resources in the Azure portal.
141+
If you are not continuing to the next quickstart, delete the QnA Maker and Bot framework resources in the Azure portal.
148142

149143
## Next steps
150144

145+
> [!div class="nextstepaction"]
146+
> [Add questions with metadata](add-question-metadata-portal.md)
147+
151148
For more information:
152149

153150
* [Markdown format in answers](../reference-markdown-format.md)
154151
* QnA Maker [data sources](../concepts/knowledge-base.md).
155152
* [Bot resource configuration settings](../tutorials/create-qna-bot.md).
156153

157-
> [!div class="nextstepaction"]
158-
> [Add questions with metadata](add-question-metadata-portal.md)
154+

articles/cognitive-services/QnAMaker/Quickstarts/get-answer-from-knowledge-base-using-url-tool.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,14 @@ ms.service: cognitive-services
99
ms.subservice: qna-maker
1010
zone_pivot_groups: URL-test-interface
1111
ms.topic: quickstart
12-
ms.date: 11/21/2019
12+
ms.date: 02/08/2020
1313
ms.author: diberry
1414
#Customer intent: As an knowledge base manager new to the QnA Maker service, I want to get an answer from a published knowledge base using a URL tool such as Postman or cURL.
1515
---
1616

1717
# Quickstart: Get an answer from knowledge base
1818

19+
1920
::: zone pivot="url-test-tool-curl"
2021

2122
[!INCLUDE [Get answer using cURL](../includes/quickstart-test-tool-curl.md)]
@@ -28,6 +29,7 @@ ms.author: diberry
2829

2930
::: zone-end
3031

32+
3133
## Next steps
3234

3335
> [!div class="nextstepaction"]

articles/cognitive-services/QnAMaker/Quickstarts/publish-kb-csharp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Once your knowledge base is published, you can query it from the endpoint with a
6969

7070
## Next steps
7171

72-
After the knowledge base is published, you need the [endpoint URL to generate an answer](../Tutorials/create-publish-answer.md#generating-an-answer).
72+
After the knowledge base is published, you need the [endpoint URL to generate an answer](./get-answer-from-knowledge-base-csharp.md).
7373

7474
> [!div class="nextstepaction"]
7575
> [QnA Maker (V4) REST API Reference](https://go.microsoft.com/fwlink/?linkid=2092179)

articles/cognitive-services/QnAMaker/Quickstarts/publish-kb-go.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ Enter the following command at a command-line to run the program. It will send t
9393

9494
## Next steps
9595

96-
After the knowledge base is published, you need the [endpoint URL to generate an answer](../Tutorials/create-publish-answer.md#generating-an-answer).
96+
After the knowledge base is published, you need the [endpoint URL to generate an answer](./get-answer-from-knowledge-base-go.md).
9797

9898
> [!div class="nextstepaction"]
9999
> [QnA Maker (V4) REST API Reference](https://go.microsoft.com/fwlink/?linkid=2092179)

0 commit comments

Comments
 (0)