Share via

Loop through a question Microsoft

NShini 51 Reputation points
2021-08-04T12:39:43.55+00:00

Hello, I am new to Microsoft services. and already built my QnAMaker by feeding it an excel file which contains questions and answers. After publishing the QnA Maker, I downloaded the code and tested it on a Bot Framework Emulator. The file contains product names as the answer and the product description as question. When the user gives a description of the product and if it matches one of the description in the file, the product name will be generated as answer.
The bot ask the user to give some details about the product and afterwards it looks for some keywords which trigger an answer from the QnA. But if the bot could not find any answer, I want it to ask the user again (at least 3 times) and if nothing after three times, it should just say 'sorry...'.

Could anyone please guide me how can I do the looping part. Should it be done in the code?

Community Center | Discuss the Q&A site | Get started on Q&A
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

0 comments No comments

1 answer

Sort by: Most helpful
  1. GiftA-MSFT 11,181 Reputation points Moderator
    2021-08-04T21:50:47.797+00:00

    Hi, thanks for reaching out. You should be able to create create multi-turn dialogue using follow up prompts. Multi-turn structure can be inferred only from URLs, PDF files, or DOCX files, here is a sample multi-turn document. You can add new question and answer pairs as follow-up prompts as shown in this document. Also, feel free to check out QnA Maker samples in BotBuilder-Samples repo. Hope it helps!

    Was this answer helpful?

    0 comments No comments

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.