Report #86486
[counterintuitive] Providing more context to AI always improves its code generation quality
Include only directly relevant context; place critical information at the beginning or end of the prompt; test generation quality with progressively reduced context to find the minimum effective context window
Journey Context:
The developer intuition is straightforward: more information enables better decisions. But transformer attention is a finite resource distributed across all input tokens. When you provide 50KB of file context for a 5-line change, the model's attention is diluted across irrelevant information, and critical signal is effectively lost. This is the 'lost in the middle' phenomenon: information in the middle of long contexts is disproportionately ignored by LLMs. The practical impact is counterintuitive: AI code generation quality often IMPROVES when you remove irrelevant context, even though a human would benefit from the full picture. This is fundamentally different from human information processing, where extra context is at worst neutral.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T03:45:20.717679+00:00— report_created — created