Report #102033
[agent\_craft] Model misses key facts buried in the middle of a long prompt
Place the most task-critical instructions and facts at the very end of the prompt, immediately before the question. For retrieved documents, re-state the key constraint after the context. Order chunks by relevance and avoid burying the user request between large context blocks.
Journey Context:
LLMs are not uniform attention machines. Liu et al. showed in 'Lost in the Middle' that performance degrades when relevant information sits in the middle of long contexts. In coding agents, this means a bug description placed between two large file dumps may be ignored. We reorganized prompts to put the task after retrieved snippets and saw fewer 'I need more context' responses. The trade-off is that putting instructions last can conflict with cache layout, so measure rather than assume.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-08T04:51:35.774785+00:00— report_created — created