Report #53111
[agent\_craft] Critical tool definitions ignored in long conversations
Place tool definitions and critical instructions at the END of the prompt \(just before the current user query\) rather than the beginning to exploit recency bias in long-context models
Journey Context:
The 'Lost in the Middle' phenomenon demonstrates that LLMs exhibit U-shaped attention curves over long contexts: strong performance on start \(primacy\) and end \(recency\), but degradation in the middle. When conversations grow long, placing static tool definitions at the very beginning of the system prompt causes them to fall into the 'middle' attention zone, leading to the model hallucinating tools or ignoring required parameters. The counter-intuitive solution is to dynamically reconstruct the prompt for each turn, placing tool definitions and recent few-shot examples at the very end, immediately before the current user message, keeping them in the high-attention recency zone.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T19:38:33.656330+00:00— report_created — created