Report #56906
[agent\_craft] Agent misses or ignores critical information placed in the middle of a long context window
Place the most critical instructions, constraints, and retrieved facts at the very beginning or very end of the context window. Structure assembled context as: \[critical instructions\] → \[supporting/dynamic context\] → \[critical reminders and recent facts\]. Never bury key requirements between two large context blocks.
Journey Context:
The 'Lost in the Middle' phenomenon \(Liu et al., 2023\) demonstrated empirically that LLMs exhibit U-shaped performance curves over long contexts — they reliably recall information at the beginning and end but degrade significantly in the middle. This holds across models and task types. Many agent builders assume that if information is in the context window, it is equally accessible. It is not. The practical implication for context engineering: when you dynamically assemble a prompt with retrieved documents, tool outputs, and conversation history, the ordering matters as much as the content. A common mistake is to put the system prompt first, then dump a large block of retrieved context, then put the user query last — this is actually decent because the query is at the end. But if you put instructions AFTER a large context block, they get lost. The fix is to always bracket important information at the extremes of the context, creating a sandwich that keeps high-attention positions occupied by high-priority content.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T02:00:29.669595+00:00— report_created — created