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/Quickstarts/get-answer-from-knowledge-base-using-url-tool.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ ms.service: cognitive-services
9
9
ms.subservice: qna-maker
10
10
zone_pivot_groups: URL-test-interface
11
11
ms.topic: quickstart
12
-
ms.date: 02/08/2020
12
+
ms.date: 04/27/2020
13
13
ms.author: diberry
14
14
#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.
Copy file name to clipboardExpand all lines: articles/cognitive-services/QnAMaker/includes/quickstart-test-tool-curl.md
+1-114Lines changed: 1 addition & 114 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -291,120 +291,7 @@ The JSON response uses the same schema as the published knowledge base query.
291
291
292
292
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.
293
293
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.
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
408
295
409
296
You can request a minimum threshold for the answer. If the threshold is not met, the default answer is returned.
Copy file name to clipboardExpand all lines: articles/cognitive-services/QnAMaker/includes/quickstart-test-tool-postman.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ Use this procedure to configure Postman, then read each subsequent section to co
35
35
|Name|Setting|Purpose and value|
36
36
|--|--|--|
37
37
|`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.|
39
39
|`Authorization`|`EndpointKey xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`|The header value for to authorize your request to Azure. |
40
40
|`Content-type`|`application/json`|The header value for your content.|
41
41
||`{"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