Report #44836
[agent\_craft] Tool definitions placed before instructions cause hallucinated tool calls
Place tool XML definitions AFTER the main task instructions but before any user context or few-shot examples, using clear wrapper tags
Journey Context:
Early patterns put tools first for schema clarity, but empirical testing shows models fixate on available tools before understanding the task context, leading to 'hammer looking for nail' behavior where the model invents reasons to use tools. Anthropic specifically moved to 'tools after instructions' based on internal evals showing 15-20% reduction in incorrect tool selection versus schema-first ordering.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T05:43:24.516463+00:00— report_created — created