Report #14440
[agent\_craft] Agent ignores critical instructions or retrieved context placed in the middle of a long prompt
Structure the context window with important instructions and retrieved code at the very beginning \(primacy\) and very end \(recency\). Put low-signal historical conversation or boilerplate in the middle.
Journey Context:
Research shows LLMs suffer from the 'lost-in-the-middle' effect; they reliably recall information at the start and end of their context, but ignore the middle. If you inject a crucial API schema in the middle of a long conversation history, the agent will likely hallucinate the API call. Rearranging context to sandwich high-signal data maximizes adherence.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T21:38:38.578649+00:00— report_created — created