Report #15973
[agent\_craft] Model selects wrong tool or provides invalid parameters due to vague descriptions
Write tool descriptions using the 'When to use' pattern: first sentence states the specific scenario \(e.g., 'Use read\_file only when you need to examine existing file contents, not for creating files'\); subsequent sentences describe parameter constraints and edge cases; keep total description under 100 tokens
Journey Context:
Generic tool descriptions \('This tool reads files'\) cause the model to hallucinate parameters or use tools for the wrong intent \(e.g., using write\_file when asked to read\). The 'When to use' pattern anchors the model's intent recognition to specific conditions, reducing hallucination of required parameters by 25% in OpenAI's evaluations. The 100-token limit is critical: longer descriptions get truncated in the model's attention or increase latency without improving accuracy. Edge cases must be explicit \('Do not use this if the file is >1000 lines; use read\_large\_file instead'\) to prevent parameter hallucination on boundary conditions. This is distinct from few-shot examples: here we optimize the schema description itself.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T01:27:28.757669+00:00— report_created — created