Skip to content

Commit 41989d2

Browse files
authored
Merge pull request #78217 from Ja-Dunn/four-qna-maker-articles
edit pass: four-qna-maker-articles
2 parents 2f44b91 + e9c81c5 commit 41989d2

File tree

4 files changed

+94
-92
lines changed

4 files changed

+94
-92
lines changed

articles/cognitive-services/QnAMaker/Concepts/best-practices.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ QnA Maker allows users to [collaborate](../How-to/collaborate-knowledge-base.md)
108108

109109
## Active learning
110110

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

113113
## Next steps
114114

articles/cognitive-services/QnAMaker/How-To/metadata-generateanswer-usage.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Metadata with GenerateAnswer API - QnA Maker
33
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.
55
services: cognitive-services
66
author: tulasim88
77
manager: nitinme
@@ -12,41 +12,41 @@ ms.date: 05/30/2019
1212
ms.author: tulasim
1313
---
1414

15-
# Get a knowledge answer with the GenerateAnswer API and metadata
15+
# Get an answer with the GenerateAnswer API and metadata
1616

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

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

2121
<a name="qna-entity"></a>
2222

23-
## Storing questions and answers with a QnA Entity
23+
## Store questions and answers with a QnA entity
2424

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

27-
![QnA Entity](../media/qnamaker-how-to-metadata-usage/qna-entity.png)
27+
![Illustration of a QnA entity](../media/qnamaker-how-to-metadata-usage/qna-entity.png)
2828

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

3131
<a name="generateanswer-api"></a>
3232

3333
## Get answer predictions with the GenerateAnswer API
3434

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

3737
<a name="generateanswer-endpoint"></a>
3838

3939
## Publish to get GenerateAnswer endpoint
4040

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

4343
To get your endpoint details:
4444
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.
46-
![my knowledge bases](../media/qnamaker-how-to-metadata-usage/my-knowledge-bases.png)
45+
1. In **My knowledge bases**, select **View Code** for your knowledge base.
46+
![Screenshot of My knowledge bases](../media/qnamaker-how-to-metadata-usage/my-knowledge-bases.png)
4747
1. Get your GenerateAnswer endpoint details.
4848

49-
![endpoint details](../media/qnamaker-how-to-metadata-usage/view-code.png)
49+
![Screenshot of endpoint details](../media/qnamaker-how-to-metadata-usage/view-code.png)
5050

5151
You can also get your endpoint details from the **Settings** tab of your knowledge base.
5252

@@ -65,10 +65,10 @@ https://{QnA-Maker-endpoint}/knowledgebases/{knowledge-base-ID}/generateAnswer
6565
|HTTP request property|Name|Type|Purpose|
6666
|--|--|--|--|
6767
|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. |
6969
|Header|Content-Type|string|The media type of the body sent to the API. Default value is: ``|
7070
|Header|Authorization|string|Your endpoint key (EndpointKey xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).|
71-
|Post Body|JSON object|JSON|The question with settings|
71+
|Post Body|JSON object|JSON|The question with settings.|
7272

7373

7474
The JSON body has several settings:
@@ -79,7 +79,7 @@ The JSON body has several settings:
7979
|`top`|optional|integer|The number of ranked results to include in the output. The default value is 1.|
8080
|`userId`|optional|string|A unique ID to identify the user. This ID will be recorded in the chat logs.|
8181
|`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.|
8383
|`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. |
8484
|`RankerType`|optional|string|If specified as `QuestionOnly`, tells QnA Maker to search questions only. If not specified, QnA Maker searches questions and answers.
8585

@@ -142,19 +142,19 @@ A successful response returns a status of 200 and a JSON response.
142142

143143
<a name="metadata-example"></a>
144144

145-
## Using metadata allows you to filter answers by custom metadata tags
145+
## Use metadata to filter answers by custom metadata tags
146146

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

149-
![add metadata](../media/qnamaker-how-to-metadata-usage/add-metadata.png)
149+
![Screenshot of adding metadata](../media/qnamaker-how-to-metadata-usage/add-metadata.png)
150150

151151
<a name="filter-results-with-strictfilters-for-metadata-tags"></a>
152152

153153
## Filter results with strictFilters for metadata tags
154154

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."
156156

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

159159
```json
160160
{
@@ -172,7 +172,7 @@ Since results are required only for the restaurant "Paradise", you can set a fil
172172

173173
## Use question and answer results to keep conversation context
174174

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

177177
```json
178178
{
@@ -217,7 +217,7 @@ You can search through the published kb, using `isTest=false`, or in the test kb
217217

218218
## Next steps
219219

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

222222
> [!div class="nextstepaction"]
223223
> [Create a knowledge base](./create-knowledge-base.md)

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

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "Create, train, publish knowledge base - QnA Maker"
2+
title: "Create, train, and publish knowledge base - QnA Maker"
33
titleSuffix: Azure Cognitive Services
44
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.
55
author: diberry
@@ -14,7 +14,7 @@ ms.author: diberry
1414

1515
# Create, train, and publish your QnA Maker knowledge base
1616

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

1919
## Prerequisite
2020

@@ -23,36 +23,36 @@ You can create a QnA Maker knowledge base (KB) from your own content, such as FA
2323
2424
## Create a QnA Maker knowledge base
2525

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

2828
1. On the QnA Maker portal, select **Create a knowledge base**.
2929

30-
![Create new knowledge base](../media/qna-maker-create-kb.png)
30+
![Screenshot of QnA Maker portal](../media/qna-maker-create-kb.png)
3131

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

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

36-
![Select a QnA service knowledge base](../media/qnamaker-quickstart-kb/qnaservice-selection.png)
36+
![Screenshot of selecting a QnA Maker service knowledge base](../media/qnamaker-quickstart-kb/qnaservice-selection.png)
3737

3838
1. In step 3, name your knowledge base **My Sample QnA KB**.
3939

4040
1. To add content to your knowledge base, select three types of data sources. In step 4, under **Populate your KB**, add the
4141
[BitLocker Recovery FAQ](https://docs.microsoft.com/windows/security/information-protection/bitlocker/bitlocker-overview-and-requirements-faq) URL in the **URL** box.
4242

43-
![Select a QnA service knowledge base](../media/qnamaker-quickstart-kb/add-datasources.png)
43+
![Screenshot of adding data sources](../media/qnamaker-quickstart-kb/add-datasources.png)
4444

4545
1. In step 5, select **Create your KB**.
4646

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

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

5151
## Edit the knowledge base
5252

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.**
5454

55-
![Add a QnA pair](../media/qnamaker-quickstart-kb/add-qna-pair.png)
55+
![Screenshot of QnA Maker portal](../media/qnamaker-quickstart-kb/add-qna-pair.png)
5656

5757
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.
5858

@@ -62,41 +62,42 @@ You can create a QnA Maker knowledge base (KB) from your own content, such as FA
6262

6363
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.
6464

65-
![Test Panel](../media/qnamaker-quickstart-kb/inspect.png)
65+
![Screenshot of test panel](../media/qnamaker-quickstart-kb/inspect.png)
6666

6767
1. Select **Test** again to close the **Test** pop-up.
6868

6969
## Publish the knowledge base
7070

7171
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.
7272

73-
![Publish prod test index](../media/qnamaker-how-to-publish-kb/publish-prod-test.png)
73+
![Screenshot of moving the contents of your knowledge base](../media/qnamaker-how-to-publish-kb/publish-prod-test.png)
7474

7575
1. In the QnA Maker portal, in the menu next to **Edit**, select **Publish**. Then to confirm, select **Publish** on the page.
7676

7777
1. The QnA Maker service is now successfully published. You can use the endpoint in your application or bot code.
7878

79-
![Publish](../media/qnamaker-quickstart-kb/publish-sucess.png)
79+
![Screenshot of successful publishing](../media/qnamaker-quickstart-kb/publish-sucess.png)
8080

8181
## Create a bot
8282

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

8585
* You can create several bots quickly, all pointing to the same knowledge base for different regions or pricing plans for the individual bots.
8686
* 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
8887

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

91-
![In the QnA Maker portal, go to the Publish page, and publish your knowledge base. Select Create Bot.](../media/qnamaker-create-publish-knowledge-base/create-bot-from-published-knowledge-base-page.png)
90+
1. In the QnA Maker portal, on the **Publish** page, select **Create bot**. This button appears only after you've published the knowledge base.
9291

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+
![Screenshot of creating a bot](../media/qnamaker-create-publish-knowledge-base/create-bot-from-published-knowledge-base-page.png)
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).
9495

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:
9697
* QnA Auth Key
97-
* App service plan/Location
98+
* App service plan and location
9899
* 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.
100101

101102

102103
## Next steps

0 commit comments

Comments
 (0)