You are building a chatbot for a travel agent. The bot will ask users for a destination and must repeat the question until a valid input is received, or the user closes the conversation.
A is the answer.
https://learn.microsoft.com/en-us/azure/bot-service/bot-builder-concept-dialog?view=azure-bot-service-4.0#dialog-types
The dialogs library provides a few types of dialogs to make your bot's conversations easier to manage.
- prompt dialogs
Ask the user for input and return the result. A prompt will repeat until it gets valid input or it's canceled. They're designed to work with waterfall dialogs.
Prompts are designed to ask users for specific pieces of information and can include validation logic to ensure the response meets certain criteria. In this case, you can use a TextPrompt to repeatedly ask for the destination until a valid input is provided or the user closes the conversation.
A is correct
According to Windows Copilot:
I understand your reasoning, but option A is not the best choice for this scenario. A prompt dialog can validate the user’s input, but it cannot handle complex conversational flows, such as interruptions, validations, and conditional logic. For example, if the user wants to change their destination, or ask for more information, or cancel the conversation, a prompt dialog cannot adapt to these situations. A prompt dialog can only ask the user for a single piece of information and return it to the parent dialog.
An adaptive dialog, on the other hand, can dynamically adjust to the user’s input and context. It can handle multiple inputs, interruptions, validations, and conditional logic. It can also use language generation templates to create natural and varied responses. An adaptive dialog can provide a better user experience and a more robust chatbot for a travel agent.
I hope this clarifies why option C is the correct answer.
In this scenario, where a chatbot needs to ask users for a destination and must repeat the question until a valid input is received, the most appropriate type of dialog to use is a "prompt" dialog. Here's why:
Prompt Dialog: The prompt dialog is specifically designed to obtain user input and can be configured to validate this input and reprompt the user if necessary. In the Microsoft Bot Framework, prompts are used to handle various types of user input such as text, numbers, dates, and confirmations. For your requirement, you can use a text prompt that keeps asking the user for a destination until a valid one is provided or the user exits the conversation.
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
zellck
Highly Voted 1 year, 7 months agozellck
1 year, 7 months agosyupwsh
Most Recent 1 day, 10 hours agoreigenchimpo
8 months agoreiwanotora
8 months, 2 weeks agoPCRamirez
1 year agoevangelist
1 year agordemontis
1 year, 3 months agoTin_Tin
1 year, 7 months ago973b658
1 year, 8 months ago