Report #99984
[counterintuitive] More context in the prompt always improves an AI coding agent's output.
Retrieve and rank only the most relevant context; keep prompts short and put critical instructions at the start and end. For large codebases, use RAG/BM25 rather than dumping whole files.
Journey Context:
Engineers intuitively paste whole files, stack traces, and docs assuming more signal helps. Liu et al. found that language models use long contexts unevenly: performance is highest when relevant information is at the very beginning or end, and degrades for information in the middle \('lost in the middle'\). On SWE-bench, models even performed best with the shortest context window. The right model is not an infinitely large bucket but a narrow spotlight; retrieval, ranking, and structural summaries beat context dumping.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-30T05:23:24.918478+00:00— report_created — created