Skip to content

Commit 0da8fd3

Browse files
committed
edits
1 parent 26552a2 commit 0da8fd3

File tree

3 files changed

+3
-116
lines changed

3 files changed

+3
-116
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ms.service: cognitive-services
99
ms.subservice: qna-maker
1010
zone_pivot_groups: URL-test-interface
1111
ms.topic: quickstart
12-
ms.date: 02/08/2020
12+
ms.date: 04/27/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
---

articles/cognitive-services/QnAMaker/includes/quickstart-test-tool-curl.md

Lines changed: 1 addition & 114 deletions
Original file line numberDiff line numberDiff line change
@@ -291,120 +291,7 @@ The JSON response uses the same schema as the published knowledge base query.
291291

292292
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.
293293

294-
## Use cURL with threshold and default answer
295-
296-
You can request a minimum threshold for the answer. If the threshold is not met, the default answer is returned.
297-
298-
1. Use the following cURL command, replacing with your own resource name, knowledge base ID, and endpoint key, to ask for an answer to `size` with a threshold of 80% or better. The knowledge base should not find that answer because the question's score is 71%, and instead return the default answer you provided when you created the knowledge base.
299-
300-
```bash
301-
curl -X POST https://replace-with-your-resource-name.azurewebsites.net/qnamaker/knowledgebases/replace-with-your-knowledge-base-id/generateAnswer -H "Authorization: EndpointKey replace-with-your-endpoint-key" -H "Content-type: application/json" -d "{'question':'size', 'scoreThreshold':80.00}"
302-
```
303-
304-
1. Run the cURL command and receive the JSON response, including the score and answer.
305-
306-
```json
307-
{
308-
"answers": [
309-
{
310-
"questions": [],
311-
"answer": "No good match found in KB.",
312-
"score": 0.0,
313-
"id": -1,
314-
"source": null,
315-
"metadata": []
316-
}
317-
],
318-
"debugInfo": null,
319-
"activeLearningEnabled": true
320-
}
321-
```
322-
323-
QnA Maker returned a score of `0`, which means no confidence. It also returned the default answer.
324-
325-
```json
326-
{
327-
"answers": [
328-
{
329-
"questions": [
330-
"I thank you",
331-
"Oh, thank you",
332-
"My sincere thanks",
333-
"My humblest thanks to you",
334-
"Marvelous, thanks",
335-
"Marvelous, thank you kindly",
336-
"Marvelous, thank you",
337-
"Many thanks to you",
338-
"Many thanks",
339-
"Kthx",
340-
"I'm grateful, thanks",
341-
"Ahh, thanks",
342-
"I'm grateful for that, thank you",
343-
"Perfecto, thanks",
344-
"I appreciate you",
345-
"I appreciate that",
346-
"I appreciate it",
347-
"I am very thankful for that",
348-
"How kind, thank you",
349-
"Great, thanks",
350-
"Great, thank you",
351-
"Gracias",
352-
"Gotcha, thanks",
353-
"Gotcha, thank you",
354-
"Awesome thanks!",
355-
"I'm grateful for that, thank you kindly",
356-
"thank you pal",
357-
"Wonderful, thank you!",
358-
"Wonderful, thank you very much",
359-
"Why thank you",
360-
"Thx",
361-
"Thnx",
362-
"That's very kind",
363-
"That's great, thanks",
364-
"That is lovely, thanks",
365-
"That is awesome, thanks!",
366-
"Thanks bot",
367-
"Thanks a lot",
368-
"Okay, thanks!",
369-
"Thank you so much",
370-
"Perfect, thanks",
371-
"Thank you my friend",
372-
"Thank you kindly",
373-
"Thank you for that",
374-
"Thank you bot",
375-
"Thank you",
376-
"Right on, thanks very much",
377-
"Right on, thanks a lot",
378-
"Radical, thanks",
379-
"Rad, thanks",
380-
"Rad thank you",
381-
"Wonderful, thanks!",
382-
"Thanks"
383-
],
384-
"answer": "You're welcome.",
385-
"score": 100.0,
386-
"id": 75,
387-
"source": "qna_chitchat_Professional.tsv",
388-
"metadata": [
389-
{
390-
"name": "editorial",
391-
"value": "chitchat"
392-
}
393-
],
394-
"context": {
395-
"isContextOnly": false,
396-
"prompts": []
397-
}
398-
}
399-
],
400-
"debugInfo": null,
401-
"activeLearningEnabled": true
402-
}
403-
```
404-
405-
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.
406-
407-
## Use cURL with threshold and default answer
294+
## Use threshold and default answer
408295

409296
You can request a minimum threshold for the answer. If the threshold is not met, the default answer is returned.
410297

articles/cognitive-services/QnAMaker/includes/quickstart-test-tool-postman.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Use this procedure to configure Postman, then read each subsequent section to co
3535
|Name|Setting|Purpose and value|
3636
|--|--|--|
3737
|`POST`| `/knowledgebases/replace-with-your-knowledge-base-id/generateAnswer`|This is the HTTP method and route for the URL.|
38-
|`Host`|`https://diberry-qna-s0-s.azurewebsites.net/qnamaker`|This is the host of the URL. Concatenate the Host and Post values to get the complete generateAnswer URL.|
38+
|`Host`|`https://YOUR-RESOURCE_NAME.azurewebsites.net/qnamaker`|This is the host of the URL. Concatenate the Host and Post values to get the complete generateAnswer URL.|
3939
|`Authorization`|`EndpointKey xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`|The header value for to authorize your request to Azure. |
4040
|`Content-type`|`application/json`|The header value for your content.|
4141
||`{"question":"<Your question>"}`|The body of the POST request as a JSON object. This value will change in each following section depending on what the query is meant to do.|

0 commit comments

Comments
 (0)