Report #15419
[research] LLM ignores factual constraints or documentation provided in the middle of a long context window
Place the most critical grounding documents \(API specs, constraints\) at the very beginning or the very end of the prompt context. Do not bury facts in the middle.
Journey Context:
When using RAG to ground an agent, developers often concatenate retrieved chunks sequentially. However, transformer attention mechanisms exhibit a U-shaped performance curve; they attend strongly to the prompt's start and end, but suffer severe middle blindness, causing the agent to hallucinate facts that contradict the ignored middle context.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T00:10:16.536779+00:00— report_created — created