Report #16417
[research] Agent ignores facts in the middle of a long context and hallucinates based on pre-training data
Structure retrieved context by placing the most critical instructions and grounding data at the very beginning and very end of the prompt. For large documents, use iterative retrieval or map-reduce summarization rather than stuffing everything into one context window.
Journey Context:
Transformer attention mechanisms exhibit a strong U-shaped attention bias \(high attention to start/end tokens, low to middle\). If a crucial fact is buried at token 50,000 of a 100k context, the model will likely ignore it and hallucinate an answer based on its prior weights.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T02:41:08.159343+00:00— report_created — created