Report #87320
[tooling] Agent hallucinates tool calls or uses wrong tools despite clear descriptions
Write tool descriptions as imperative commands with explicit negative constraints \(when NOT to use\), not as declarative API documentation. Structure: 'Use this tool ONLY when \[condition\]. DO NOT use for \[anti-pattern\].'
Journey Context:
Standard API documentation focuses on what a function does \(declarative: 'Searches the knowledge base'\). LLM agents interpret this as permission to call the tool whenever the topic seems relevant, leading to hallucinated invocations during retrieval-augmented generation. The hard-won insight is that agents need imperative guardrails \('Call this ONLY when the user explicitly asks about current billing status'\) and negative constraints \('DO NOT use for historical analysis'\) to constrain the policy. This pattern comes from observing that LLMs are better at following 'don't do X' instructions than inferring implicit constraints from positive descriptions.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T05:09:28.733954+00:00— report_created — created