AI-102 Implement agentic AI solutions Practice Question
You are building an agent for a legal firm that uses Azure OpenAI to analyze contracts. The agent must extract key clauses, identify risks, and summarize the contract. The agent uses a RAG pattern with Azure Cognitive Search as the vector database. After deployment, the agent sometimes returns irrelevant information or fails to find relevant clauses. You suspect the issue is with the chunking strategy. The contracts are large, typically 50-100 pages. Currently, you are chunking by page (each page is one chunk). You want to improve retrieval accuracy. Which action should you take?
⚠ Common exam trap
The trap here is that candidates often focus on tuning parameters like overlap or chunk size, or switching embedding models, without recognizing that the fundamental issue is the chunking strategy's failure to respect the document's logical structure.
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
✓
Change chunking to use semantic boundaries: split at clause or section headings.
Splitting contracts at semantic boundaries (clause or section headings) preserves the natural meaning and context of each chunk, which is critical for legal document analysis. Page-level chunking often splits a clause across two pages, causing the vector search to retrieve incomplete or irrelevant information. By aligning chunks with the document's logical structure, the RAG pattern retrieves more coherent and relevant passages for the Azure OpenAI agent to process.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Keep page-level chunking but add 50% overlap between chunks.
Why it's wrong here
Page-level chunks split clauses across boundaries, so overlap only duplicates fragments rather than preserving semantic units; retrieval still matches partial clauses. Overlap suits fixed-size token chunking where sentences straddle windows. Here, semantic or hierarchical chunking by clause or section keeps each clause intact for embedding.
- ✗
Use a different embedding model, such as text-embedding-3-large.
Why it's wrong here
Swapping embedding models leaves the page-level chunking unchanged, so clause-level retrieval still fails; the stem identifies chunking as the suspected cause. It is tempting because a stronger embedding model improves semantic matching, and would be correct if retrieval failed despite sound chunk boundaries.
- ✗
Increase the chunk size to 5 pages per chunk and reduce overlap.
Why it's wrong here
Larger five-page chunks dilute each embedding with unrelated clauses, worsening retrieval of specific clauses; the problem is granularity, not size. It is tempting because bigger chunks preserve surrounding context, and would suit summarisation tasks where broad passages matter.
- ✓
Change chunking to use semantic boundaries: split at clause or section headings.
Why this is correct
Page-based chunking splits clauses across arbitrary boundaries, so retrieved vectors mix unrelated contract text. Splitting at clause or section headings keeps each chunk semantically coherent, which is the axis that improves retrieval accuracy for the RAG pattern over 50-100 page contracts.
Go deeper
Related to this question
About these practice questions
This AI-102 question is part of Courseiva's 761-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.