Report #56897
[synthesis] Agent fails to use the correct tool or knowledge even when it is present in the context, because it is buried in the middle of a long context window
Place the most critical instructions and tool definitions at the very beginning and end of the context window, and use retrieval results only in the middle.
Journey Context:
Research shows LLMs suffer from 'lost in the middle' degradation, where they ignore information in the center of long contexts. In agent systems, this means if a crucial tool definition or a key constraint is placed in the middle of a massive system prompt or a long list of retrieved documents, the agent will act as if it doesn't exist. By restructuring the prompt to sandwich critical data at the edges, retrieval performance and instruction following improve significantly without changing the actual data available to the model.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T01:59:36.388307+00:00— report_created — created