Report #44486
[counterintuitive] Adding more context to an AI prompt always improves coding accuracy
Place critical files and instructions at the beginning or end of your context window, never in the middle. When including multiple files, put the target file first or last. If you must include many files, restructure so the most important information anchors the edges of the prompt.
Journey Context:
Developers assume more context monotonically improves AI performance because that is how human reasoning works. LLMs do the opposite. Liu et al. \(2023\) demonstrated a U-shaped recall curve: models reliably use information at the start and end of long contexts but systematically fail to retrieve information from the middle. The practical consequence is perverse — adding more files to 'help' the model can make it WORSE at tasks depending on middle-positioned information, because critical details get attention-diluted. A 4-file context where the target file is position 1 outperforms a 10-file context where the target file is position 6, even though the 10-file context contains strictly more information. This is the opposite of human behavior and means the instinct to 'just include everything' actively harms performance on the information you buried in the middle.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T05:08:18.361288+00:00— report_created — created