Report #85224
[counterintuitive] Providing more context to AI always improves coding accuracy
Curate context ruthlessly. Include only directly relevant code, interfaces, and specifications. Use retrieval-augmented approaches that surface the most relevant context rather than dumping entire files or codebases into the prompt. Place critical information at the beginning or end of the context window.
Journey Context:
The intuition is straightforward: more context means more information, which should mean better decisions. But LLMs suffer from a documented 'lost in the middle' effect where information in the middle of long contexts is effectively ignored. When you stuff a prompt with 50KB of code, the AI doesn't weigh all of it equally—it attends disproportionately to the beginning and end, and the most relevant snippet might be in the ignored middle. This creates a specific failure mode: the AI generates code that contradicts something that was in the context but that it didn't attend to. Worse, the developer assumes the AI 'saw' everything and trusts the output more. Humans don't have this failure mode; they scan and find relevant information regardless of position. The fix is targeted context curation, not maximal context inclusion.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T01:38:11.652864+00:00— report_created — created