AI-102 Implement agentic AI solutions Practice Question
A company is building an agent that uses Azure OpenAI Service to answer customer queries by querying a SQL database. The agent must be able to handle complex multi-turn conversations and maintain context. Which approach should the team use to implement the agent?
⚠ Common exam trap
Microsoft often tests the distinction between stateless prompt engineering (options A, B, C) and stateful agent frameworks (option D), where candidates mistakenly believe that simply including history in a prompt (option A) is sufficient for multi-turn context, ignoring token limits and the lack of structured state management.
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
✓
Use a conversational agent framework like AutoGen with a tool that executes SQL queries, and maintain conversation state.
AutoGen is a conversational agent framework designed for multi-turn, stateful interactions. It can maintain conversation context across turns and integrate a tool to execute SQL queries, which directly meets the requirement for complex multi-turn conversations with context retention. The other options either lack state management or rely on stateless prompt engineering, which is insufficient for maintaining context in a multi-turn agent.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Use a single prompt that includes the entire conversation history and the latest user question, then generate SQL.
Why it's wrong here
Conversation history grows quickly and may exceed token limits.
- ✗
Use a chain-of-thought prompt to generate SQL queries directly from user input, without maintaining conversation history.
Why it's wrong here
Without memory, the agent cannot handle multi-turn conversations.
- ✗
Use embeddings-based retrieval to find relevant past interactions and include them in the prompt.
Why it's wrong here
Retrieval is useful for knowledge but not for structured query generation with context.
- ✓
Use a conversational agent framework like AutoGen with a tool that executes SQL queries, and maintain conversation state.
Why this is correct
AutoGen provides multi-turn conversation management and tool integration.
Go deeper
Related to this question
About these practice questions
This AI-102 question is part of Courseiva's 945-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
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.