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 questions

Domain Implement natural language processing solutions

Answer options
A: AdaptiveDialog
B: QnAMakerDialog Correct answer
C: ComponentDialog
D: SkillDialog
Correct Answer:
B. QnAMakerDialog
Explanation

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.

Why Incorrect

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.

References

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.

Scroll to Top