Report #5876
[research] LLM ignores retrieved context placed in the middle of the prompt and hallucinates answers
Place the most relevant retrieved documents at the very beginning or very end of the context window; do not rely on uniform attention across long contexts.
Journey Context:
Agents often concatenate retrieved chunks sequentially. However, transformer attention patterns exhibit a strong position bias \(U-shaped curve\). If the gold evidence is buried in the middle of a 10k\+ token context, the model will likely ignore it and hallucinate based on parametric memory. Reordering chunks to put the highest-similarity match at the edges significantly reduces hallucination.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T22:35:34.127871+00:00— report_created — created