Courseiva
Implement an agentic solutionmediumMultiple ChoiceObjective-mapped

AI-102 Implement an agentic solution Practice Question

A developer is building a custom agent using the Microsoft Bot Framework SDK. The agent must be able to handle multiple turns and maintain context across the conversation. The agent uses dialogs to guide the user through a multi-step process. Which component is responsible for managing the dialog stack and persisting state between turns?

⚠ Common exam trap

Candidates often confuse state management middleware (StateMiddleware) with the component that actually manages the dialog stack, but StateMiddleware only provides state storage access, while DialogSet directly controls the stack and dialog lifecycle.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

The DialogSet object that contains dialogs and manages the stack.

The DialogSet object is the correct component because it is specifically designed to manage the dialog stack and persist state between turns in the Bot Framework SDK. It maintains the stack of active dialogs, handles dialog lifecycle events, and integrates with state management to ensure context is preserved across multiple turns. The other options either handle activity routing, define bot structure, or provide middleware for state, but do not directly manage the dialog stack.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • The ActivityHandler class that processes incoming activities.

    Why it's wrong here

    ActivityHandler routes activities but does not manage dialogs.

  • The IBot interface implementation.

    Why it's wrong here

    IBot defines the overall bot logic but not dialog stack management.

  • The StateMiddleware component.

    Why it's wrong here

    StateMiddleware manages state accessors but not the dialog stack.

  • The DialogSet object that contains dialogs and manages the stack.

    Why this is correct

    DialogSet manages the dialog stack and uses state to persist the stack between turns.

About these practice questions

One of 945 original AI-102 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This AI-102 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AI-102 exam.