Context EngineeringContext assembly and efficiencyStaff
Why can adding more retrieved evidence to a larger context window reduce answer quality?
By Amit Kumar4 min readWorked answer includedReviewed 26 Sept 2026
The question
Interview question
A documentation assistant moves to a larger context window and includes many more retrieved passages. Answer quality falls even though the relevant passage appears in every prompt. Explain possible mechanisms, design experiments that separate them from a simultaneous model change, and propose a selection policy when complex questions still benefit from longer context.
Draft your approach first
Take a few minutes before you read the answer. Name the constraint that matters most, the failure you are designing for and how you would know it worked.
Reveal the worked answerWorked answer
A larger available window gives the application more room, but the model still has to choose which evidence governs its answer. Adding passages can introduce competing rules, move decisive evidence or cut away a qualification during assembly. Check which of those inputs changed, and whether the rollout also changed the model, before attributing the regression to window size.
There are several plausible failure paths. The right passage may be buried among near duplicates and contradictory versions. It may lose a qualifying paragraph because chunks were packed differently. A prompt that previously placed the rule near the question may now place it in the middle of a long input. The model may see a newer looking but less authoritative source and use that instead. Tool definitions, prior conversation, and reserved output tokens may also consume part of the budget, so the supposedly larger evidence set can still be trimmed in a different place.
Consider a hypothetical log-retention question for a particular customer plan. The old prompt includes the applicable policy’s 30-day limit and its plan heading. The expanded prompt also includes a general 90-day marketing page and an obsolete policy copy. An answer of 90 days could come from treating the general page as authoritative. Alternatively, packing may have kept “30 days” but dropped the heading that establishes which plan it governs. Both failures occur with the relevant number still present, yet rearranging its position would not repair the missing applicability evidence.
I would inspect paired traces from old and new paths before proposing “put the good chunk last.” For the same question, corpus snapshot, authorization, model, and decoding setup where possible, record the exact assembled prompt and source versions. Compare the selected evidence, position of the required span, contradictory passages, and final claims. If the model changed with the context window, run the old and new context compositions on each model separately. Otherwise we cannot tell a context effect from a model effect.
Then run a small controlled grid:
| Change one thing | What it tells us |
|---|---|
| Same evidence, different position | Whether this model and task are sensitive to where the passage appears |
| Same position, add irrelevant passages | Whether distractors or sheer length reduce use of the evidence |
| Add a contradictory old version | Whether source authority and version labels are strong enough |
| Full passage versus clipped chunk | Whether the missing qualification, not position, caused the error |
“The relevant passage is always present” does not settle the issue. The answer may need two passages, or the cited passage may not include the exception. Presence also does not mean the model attended to and applied the right sentence. The Lost in the Middle study found position effects in its tested models and tasks. I would use it as a hypothesis, not as proof that every current model has the same failure curve.
If the experiment shows contradiction is the main issue, I would fix selection and authority metadata rather than rearrange token order. If position matters on the current model, keep the decisive evidence near the question and make the source boundary clear, while still including other necessary evidence. If clipped context is the problem, retrieve neighboring spans or a structured clause. None of these suggests that “shorter is always better.” A genuinely complex question can require more context.
The interviewer says the full context wins on rare questions that need three documents, though it loses on simple ones. I would not pick one global budget. Classify the evidence need from the question and retrieval results, or let a controlled second retrieval step fetch missing support. Compare the cost and wrong-answer rate of that policy against always-large and always-small baselines. A classifier error that drops a required third document can be worse than the original long prompt problem, so include that failure slice in the release gate.
I would call the rollout successful only when the measured answer and support quality improves in the relevant slices, not when token utilization or maximum window size rises. The extra capacity is useful when the system knows what to put in it.
Related questions
Keep practising context engineering
Follow another question in this area, or search the complete library.
Get my essays on AI engineering and distributed systems by email. Subscribe to ArchCrux