Report #80737
[research] Context window mid-sequence factual decay
Place critical instructions, constraints, and grounding documents at the very beginning or very end of the prompt context. Use structured formatting \(e.g., XML tags\) to make mid-context facts more salient.
Journey Context:
Research on long-context LLMs shows a 'lost in the middle' phenomenon where models successfully recall information at the start and end of the context but fail to retrieve or adhere to facts in the middle. For coding agents, if a specific API schema is buried in the middle of a long file, the agent will hallucinate standard schemas instead.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T18:07:01.700559+00:00— report_created — created