Courseiva

AI-102 Implement generative AI solutions Practice Question

You are building a generative AI application with Azure OpenAI Service that summarizes long legal contracts. Legal reviewers report that the summaries omit obligations buried in the middle of very long documents, even though the documents fit within the model's maximum context window. You need to improve recall of those mid-document clauses while minimizing added latency. What should you do first?

⚠ Common exam trap

The trap here is assuming that fitting within the context window means the model reliably uses every part of the input.

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

✓

Split the contract into overlapping chunks, summarize each chunk, then summarize the combined chunk summaries.

Long inputs suffer from uneven attention, so obligations in the middle can be missed even when they fit the context window. Chunking with overlap and summarizing hierarchically places every clause in a short, high-attention context and preserves clauses that cross boundaries. Raising temperature, enlarging the window, or adding instructions does not change how attention is distributed, so those approaches leave the recall gap unresolved.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Add a system message instructing the model to read the entire document carefully before summarizing.

    Why it's wrong here

    System messages shape tone, format, and behavior, but they cannot override the underlying attention distribution across a long token sequence. Instructing the model to be thorough does not mechanically improve recall of mid-document content. It may even create a false sense of reliability. A structural change such as chunking with overlap is required to make every clause land in a high-attention position.

  • ✗

    Increase the model's temperature setting so the model explores more of the document content.

    Why it's wrong here

    Temperature controls randomness in token sampling, not how thoroughly the model attends to the input. Raising it makes summaries more variable and can introduce hallucinated obligations, which is dangerous in legal review. It does not address the positional recall weakness where content in the middle of a long context receives less effective attention. This scenario needs a retrieval or chunking strategy, not a sampling change.

  • ✓

    Split the contract into overlapping chunks, summarize each chunk, then summarize the combined chunk summaries.

    Why this is correct

    Chunking with overlap, followed by a map-reduce style summarization, ensures every clause is processed in a short context where attention is strongest. Overlap prevents obligations that straddle chunk boundaries from being lost. This directly improves mid-document recall and keeps each model call small, so latency stays reasonable compared with sending the entire contract repeatedly. It is the standard mitigation for weak recall in long inputs.

  • ✗

    Switch the deployment to a model with a larger maximum context window and resend the full contract.

    Why it's wrong here

    A larger context window allows more tokens, but the documents already fit within the current window, so capacity is not the constraint. Long-context models still exhibit uneven attention, and simply enlarging the window does not guarantee that middle clauses are captured. It also increases per-call cost and latency. The problem is attention quality across the existing input, which chunking addresses more directly.

Visual reference

Client Recursive Resolver Root DNS (13 root servers) TLD DNS (.com, .org, …) Authoritative example.com query IP addr answer

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 →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Microsoft exam blueprint

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.