Report #66067
[agent\_craft] Agent hallucinates tool parameters or forgets available tools when tool schemas are placed far from the generation token
Inject tool schemas and immediate instructions as close to the end of the prompt \(right before the assistant's turn\) as possible, rather than burying them in the system prompt.
Journey Context:
Due to transformer attention patterns \(recency bias\), if tool schemas are thousands of tokens away in the system prompt, the model is more likely to hallucinate parameters or forget the tool exists. Placing them dynamically right before the generation point ensures high attention weights on the exact parameter names and types required.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T17:22:25.133684+00:00— report_created — created