Share via

Multiple answers not visible using QNA api

Raja sekhar V 96 Reputation points
2021-06-02T11:17:54.137+00:00

This question is regarding QnA maker.
When I post a question in chatbot and inspect the answer, I can see the best answer as well as other answers(Observed 3 answeres). But when I request for the same using api
listSearchResults = client.knowledgebase.generate_answer(kb_id, QueryDTO(question = question))

I received only one answer, for my applications I need multiple answers (closest ones too).
How do I get it using api?

Foundry Tools
Foundry Tools

Formerly known as Azure AI Services or Azure Cognitive Services is a unified collection of prebuilt AI capabilities within the Microsoft Foundry platform


Answer accepted by question author

Raja sekhar V 96 Reputation points
2021-06-03T06:44:40.553+00:00

listSearchResults = client.knowledgebase.generate_answer(kb_id, QueryDTO(question = question,top=3))

Need to add top parameter.

Was this answer helpful?

0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.