I'd like to have users input a single prompt, like "read me a poem," and have QnA give a different response every time. Ideally, QnA would rotate through a list of responses I've created. Is there any way to do this?
Asked
Active
Viewed 1,619 times
3
-
I have the same question. I understand that you can use language generation in Bot Composer for example, but does qnamaker support LG definition or not? – Alireza Manashty Jul 25 '20 at 21:06
-
1@AlirezaManashty - It does not. You'd have to handle that on the bot side. – Kyle Delaney Sep 06 '21 at 17:43
2 Answers
2
yes, you can now: they added the param "top" to the JSON object for the POST:
e.g.
{
"question": "Hi",
"top": 30,
"isTest": true,
"RankerType":"QuestionOnly"
}
POST to QnAMaker API returns (max.) the top 30 answers.

electrobabe
- 1,549
- 18
- 17
-
1This answers the question of how to get multiple answers in a single call to the QnA Maker API, but those answers will be from different QnA pairs. Tyler S seems to be asking how to add alternate answers to a single QnA pair, in the same way that you can add alternate questions to a QnA pair. – Kyle Delaney Sep 06 '21 at 17:41
1
That's not really the best use case for QnA maker. QnA Maker enables you to power a question-and-answer service from your semi-structured content like FAQ documents, URLs, and product manuals. The QnA Maker service answers your users' natural language questions by matching it with the best possible answer from the QnAs in your Knowledge base.
What you are looking for can be done with a Chat Bot where you write the logic for rotating responses. Visual Studio has a echoBot sample pre-loaded that can help you get started and we have a good deal of documentation here:

Ken W - Zero Networks
- 3,533
- 1
- 13
- 18