Skip to content

Commit 71df2d1

Browse files
authored
Merge pull request #101013 from diberry/diberry/0113-qs-sdk-1-page
[Cogsvcs] QnA Maker - Quickstart SDK
2 parents 4ddad2b + 3144da7 commit 71df2d1

File tree

9 files changed

+165
-139
lines changed

9 files changed

+165
-139
lines changed

.openpublishing.redirection.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -595,6 +595,22 @@
595595
"redirect_url": "/azure/machine-learning",
596596
"redirect_document_id": false
597597
},
598+
599+
{
600+
"source_path": "articles/cognitive-services/QnAMaker/Quickstarts/create-publish-kb-nodejs-sdk.md",
601+
"redirect_url": "/azure/cognitive-services//QnAMaker/Quickstarts/quickstart-sdk",
602+
"redirect_document_id": false
603+
},
604+
{
605+
"source_path": "articles/cognitive-services/QnAMaker/Quickstarts/create-publish-kb-csharp-sdk.md",
606+
"redirect_url": "/azure/cognitive-services//QnAMaker/Quickstarts/quickstart-sdk",
607+
"redirect_document_id": false
608+
},
609+
{
610+
"source_path": "articles/cognitive-services/QnAMaker/Quickstarts/python-sdk.md",
611+
"redirect_url": "/azure/cognitive-services//QnAMaker/Quickstarts/quickstart-sdk",
612+
"redirect_document_id": false
613+
},
598614
{
599615
"source_path": "articles/cognitive-services/QnAMaker/Quickstarts/create-knowledge-rest-api-nodejs.md",
600616
"redirect_url": "/azure/cognitive-services//QnAMaker/Quickstarts/publish-kb-nodejs",

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ You use the [GenerateAnswer API](https://docs.microsoft.com/rest/api/cognitivese
3636

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

39-
## Publish to get GenerateAnswer endpoint
39+
## Publish to get GenerateAnswer endpoint
4040

4141
After you publish your knowledge base, either from the [QnA Maker portal](https://www.qnamaker.ai), or by using the [API](https://docs.microsoft.com/rest/api/cognitiveservices/qnamaker/knowledgebase/publish), you can get the details of your GenerateAnswer endpoint.
4242

@@ -54,15 +54,15 @@ You can also get your endpoint details from the **Settings** tab of your knowled
5454

5555
## GenerateAnswer request configuration
5656

57-
You call GenerateAnswer with an HTTP POST request. For sample code that shows how to call GenerateAnswer, see the [quickstarts](../quickstarts/create-publish-kb-csharp-sdk.md#generate-an-answer-from-the-knowledge-base).
57+
You call GenerateAnswer with an HTTP POST request. For sample code that shows how to call GenerateAnswer, see the [quickstarts](../quickstarts/quickstart-sdk.md#generate-an-answer-from-the-knowledge-base).
5858

5959
The POST request uses:
6060

6161
* Required [URI parameters](https://docs.microsoft.com/rest/api/cognitiveservices/qnamakerruntime/runtime/train#uri-parameters)
6262
* Required [header property](https://docs.microsoft.com/azure/cognitive-services/qnamaker/quickstarts/get-answer-from-knowledge-base-nodejs#add-a-post-request-to-send-question-and-get-an-answer), `Authorization`, for security
63-
* Required [body properties](https://docs.microsoft.com/rest/api/cognitiveservices/qnamakerruntime/runtime/train#feedbackrecorddto).
63+
* Required [body properties](https://docs.microsoft.com/rest/api/cognitiveservices/qnamakerruntime/runtime/train#feedbackrecorddto).
6464

65-
The GenerateAnswer URL has the following format:
65+
The GenerateAnswer URL has the following format:
6666

6767
```
6868
https://{QnA-Maker-endpoint}/knowledgebases/{knowledge-base-ID}/generateAnswer
@@ -90,7 +90,7 @@ An example JSON body looks like:
9090

9191
Learn more about [rankerType](../concepts/best-practices.md#choosing-ranker-type).
9292

93-
The previous JSON requested only answers that are at 30% or above the threshold score.
93+
The previous JSON requested only answers that are at 30% or above the threshold score.
9494

9595
<a name="generateanswer-response"></a>
9696

@@ -120,7 +120,7 @@ The [response](https://docs.microsoft.com/rest/api/cognitiveservices/qnamakerrun
120120
}
121121
```
122122

123-
The previous JSON responded with an answer with a score of 38.5%.
123+
The previous JSON responded with an answer with a score of 38.5%.
124124

125125
## Use QnA Maker with a bot in C#
126126

@@ -139,7 +139,7 @@ qnaOptions.ScoreThreshold = 0.3F;
139139
var response = await _services.QnAServices[QnAMakerKey].GetAnswersAsync(turnContext, qnaOptions);
140140
```
141141

142-
The previous JSON requested only answers that are at 30% or above the threshold score.
142+
The previous JSON requested only answers that are at 30% or above the threshold score.
143143

144144
The Support bot has [an example](https://github.com/microsoft/BotBuilder-Samples/blob/master/experimental/qnamaker-support/csharp_dotnetcore/Service/SupportBotService.cs#L418) with this code.
145145

@@ -159,7 +159,7 @@ var qnaMakerOptions = {
159159
var qnaResults = await this.qnaMaker.getAnswers(stepContext.context, qnaMakerOptions);
160160
```
161161

162-
The previous JSON requested only answers that are at 30% or above the threshold score.
162+
The previous JSON requested only answers that are at 30% or above the threshold score.
163163

164164
The Support bot has [an example](https://github.com/microsoft/BotBuilder-Samples/blob/master/experimental/qnamaker-activelearning/javascript_nodejs/Helpers/dialogHelper.js#L36) with this code.
165165

@@ -195,7 +195,7 @@ Because results are required only for the restaurant "Paradise", you can set a f
195195

196196
## Use question and answer results to keep conversation context
197197

198-
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.
198+
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.
199199

200200
```json
201201
{
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
title: "Quickstart: Use SDK to create and manage knowledge base - QnA Maker"
3+
description: This quickstart shows you how to create and manage your knowledge base using the client SDK.
4+
ms.topic: quickstart
5+
ms.date: 01/13/2020
6+
zone_pivot_groups: programming-languages-set-six
7+
---
8+
9+
# Quickstart: Create and manage knowledge base
10+
11+
Get started with the QnA Maker client library. Follow these steps to install the package and try out the example code for basic tasks. QnA Maker enables you to power a question-and-answer service from your semi-structured content like FAQ documents, URLs, and product manuals.
12+
13+
::: zone pivot="programming-language-csharp"
14+
[!INCLUDE [Get intent with C# and REST](../includes/quickstart-sdk-csharp.md)]
15+
::: zone-end
16+
17+
::: zone pivot="programming-language-python"
18+
[!INCLUDE [Get intent with Python and REST](../includes/quickstart-sdk-python.md)]
19+
::: zone-end
20+
21+
::: zone pivot="programming-language-nodejs"
22+
[!INCLUDE [Get intent with Node.js and REST](../includes/quickstart-sdk-nodejs.md)]
23+
::: zone-end
24+
25+
## Next steps
26+
27+
> [!div class="nextstepaction"]
28+
>[Tutorial: Create and answer a KB](../tutorials/create-publish-query-in-portal.md)
29+
30+
* [What is the QnA Maker API?](../Overview/overview.md)
31+
* [Edit a knowledge base](../how-to/edit-knowledge-base.md)
32+
* [Get usage analytics](../how-to/get-analytics-knowledge-base.md)

articles/cognitive-services/QnAMaker/Quickstarts/create-publish-kb-csharp-sdk.md renamed to articles/cognitive-services/QnAMaker/includes/quickstart-sdk-csharp.md

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,9 @@
11
---
22
title: "Quickstart: QnA Maker client library for .NET"
3-
titleSuffix: Azure Cognitive Services
43
description: This quickstart shows how to get started with the QnA Maker client library for .NET. Follow these steps to install the package and try out the example code for basic tasks. QnA Maker enables you to power a question-and-answer service from your semi-structured content like FAQ documents, URLs, and product manuals.
5-
services: cognitive-services
6-
author: diberry
7-
manager: nitinme
8-
ms.service: cognitive-services
9-
ms.subservice: qna-maker
104
ms.topic: quickstart
11-
ms.date: 12/16/2019
12-
ms.author: diberry
5+
ms.date: 01/13/2020
136
---
14-
15-
# Quickstart: QnA Maker client library for .NET
16-
17-
Get started with the QnA Maker client library for .NET. Follow these steps to install the package and try out the example code for basic tasks. QnA Maker enables you to power a question-and-answer service from your semi-structured content like FAQ documents, URLs, and product manuals.
18-
197
Use the QnA Maker client library for .NET to:
208

219
* Create a knowledge base
@@ -112,7 +100,7 @@ Next, create an [ApiKeyServiceClientCredentials](https://docs.microsoft.com/dotn
112100

113101
|Environment variable|variable|Example|
114102
|--|--|--|
115-
|`QNAMAKER_SUBSCRIPTION_KEY`|`subscription_key`|The key is a 32 character string and is available in the Azure portal, on the QnA Maker resource, on the Quick start page. This is not the same as the prediction endpoint key.|
103+
|`QNAMAKER_SUBSCRIPTION_KEY`|`subscription_key`|The key is a 32 character string and is available in the Azure portal, on the QnA Maker resource, on the Quickstart page. This is not the same as the prediction endpoint key.|
116104
|`QNAMAKER_HOST`|`Endpoint`| Your authoring endpoint, in the format of `https://YOUR-RESOURCE-NAME.cognitiveservices.azure.com`, includes your **resource name**. This is not the same URL used to query the prediction endpoint.|
117105
||||
118106

@@ -203,13 +191,4 @@ The [source code for this quickstart](https://github.com/Azure-Samples/cognitive
203191
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.
204192

205193
* [Portal](../../cognitive-services-apis-create-account.md#clean-up-resources)
206-
* [Azure CLI](../../cognitive-services-apis-create-account-cli.md#clean-up-resources)
207-
208-
## Next steps
209-
210-
> [!div class="nextstepaction"]
211-
>[Tutorial: Create and answer a KB](../tutorials/create-publish-query-in-portal.md)
212-
213-
* [What is the QnA Maker API?](../Overview/overview.md)
214-
* [Edit a knowledge base](../how-to/edit-knowledge-base.md)
215-
* [Get usage analytics](../how-to/get-analytics-knowledge-base.md)
194+
* [Azure CLI](../../cognitive-services-apis-create-account-cli.md#clean-up-resources)

0 commit comments

Comments
 (0)