Report #41190
[agent\_craft] Agent forgets instructions given at the beginning of a long context window
Place critical instructions and few-shot examples at the beginning and end of the context window, using a sandwich pattern. Put retrieved context in the middle.
Journey Context:
LLMs suffer from the lost in the middle phenomenon where they attend less to information in the middle of long contexts. Putting the task/instructions at the top and bottom ensures they are attended to, while retrieved context \(which is only conditionally relevant\) goes in the middle where attention dips.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T23:36:38.038336+00:00— report_created — created