Report #36720
[counterintuitive] Stuffing the prompt with the entire codebase context yields better AI decisions
Curate context ruthlessly. Use retrieval to inject only the exact signatures and invariants needed, placing them at the beginning or end of the prompt window.
Journey Context:
Humans intuitively believe more information leads to better decisions. For LLMs, the 'Lost in the Middle' phenomenon proves otherwise. LLMs overweigh the beginning and end of their context window and ignore the middle. Adding irrelevant code actively degrades performance by diluting attention on the critical invariants, leading to hallucinations that bridge the wrong concepts.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T16:06:34.372953+00:00— report_created — created