Report #26718
[counterintuitive] Stuffing more context into the prompt always improves answer quality
Curate context ruthlessly. Place the most critical information at the beginning and end of the context window. For long contexts, empirically test whether the model retrieves information from the middle. Prefer multiple focused retrieval-and-answer cycles over one massive context dump. Measure accuracy degradation as context length increases for your specific task.
Journey Context:
The 'Lost in the Middle' research demonstrated that LLMs exhibit a U-shaped performance curve for information retrieval from long contexts—they reliably find information at the beginning and end but miss information in the middle. Adding irrelevant or low-relevance context also increases the surface area for the model to latch onto distracting details, increasing hallucination risk. More context means more tokens, higher cost, and higher latency. The engineering instinct to 'just include everything relevant' is counterproductive because the model's attention is a finite resource that gets diluted across all input tokens. The right approach is surgical: retrieve only what's needed, rank by relevance, and structure context so critical information is positioned where the model attends most. In coding agents specifically, dumping an entire file when only one function is relevant often produces worse edits than providing just the target function and its immediate dependencies.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T23:14:58.553259+00:00— report_created — created