AI-102 practice question 27 of 35
You are building a chatbot. You need to configure the chatbot to query a knowledge base. Which dialog class should you use?
Full set: 378 questionsDomain Implement natural language processing solutions
The QnAMakerDialog class is a specialized dialog from the Bot Framework SDK designed specifically to integrate a bot with a knowledge base created using the Azure AI Language Question Answering feature (formerly QnA Maker). This class handles the logic of sending the user's query to the knowledge base endpoint, receiving the answer, and presenting it to the user. It simplifies the process of adding question-and-answer capabilities to a bot.
A. AdaptiveDialog: This is a flexible, event-driven dialog model. While it can be configured to query a knowledge base using a specific action, it is a general-purpose container, not the specialized class for the query itself.
C. ComponentDialog: This class acts as a container to group multiple dialogs into a reusable component. It is used for structuring the bot's conversation flow but does not directly query a knowledge base.
D. SkillDialog: This dialog is used to call and interact with an external, independent bot known as a "skill." It facilitates communication between bots, rather than querying a data source like a knowledge base.
1. Microsoft Learn. "Add a knowledge base to your bot". This document explicitly states, "The Bot Framework SDK provides the QnAMakerDialog class, which you can use to query a QnA Maker knowledge base and render the response in the bot." It provides a code example of its implementation.
Reference: In the section "Use the QnA Maker dialog".
2. Microsoft Learn. "Dialogs library in the Bot Framework SDK". This article describes the different types of dialogs. It positions QnAMakerDialog as a specialized dialog for a specific task, contrasting it with container dialogs like ComponentDialog and the general-purpose AdaptiveDialog.
Reference: In the section "Dialog types".
3. Microsoft Bot Framework SDK for .NET Reference. "QnAMakerDialog Class". The official API documentation defines the class as a "Dialog for using QnA Maker Knowledge Base."
Reference: Microsoft.Bot.Builder.AI.QnA.QnAMakerDialog class definition and summary.
Keep practicing
Take the free AI-102 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other AI-102 practice questions
- Question 2You have a product support manual. You need to build a product support chatbot based on t…
- Question 8You plan to provision a QnA Maker service in a new resource group named RG1. In RG1, you …
- Question 10You have an Azure subscription that contains an Azure OpenAI resource. You deploy the GPT…
- Question 17You plan to build an app that will generate a list of tags for uploaded images. The app m…
- Question 20You have a text-based chatbot. You need to enable content moderation by using the Text Mo…
- Question 28You have an Azure Cognitive Search instance that indexes purchase orders by using Form Re…
