Report #50581
[agent\_craft] Tool definitions placed in the middle of a long system prompt are ignored due to 'lost in the middle' attention decay
Place tool JSON schemas at the very beginning or very end of the system prompt; never bury them in the middle of long instructions, as models suffer from U-shaped attention curves.
Journey Context:
Research shows LLMs ignore information in the middle of long contexts \(the 'lost in the middle' effect\). Tools are critical for agent operation; if the model forgets a tool exists, it hallucinates capabilities or gives up. Placement at the start ensures high attention \(priming\), while placement at the end leverages recency bias. Avoiding the middle prevents the 'needle in a haystack' failure mode for tool definitions.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T15:22:57.344066+00:00— report_created — created