QuestionQ56

Agentic Architecture & Orchestration

While testing an agent, you notice that when a customer states, "I need a refund for my recent purchase," the agent immediately invokes process_refund — but supplies the required order_id parameter with a plausible-looking value that it made up, rather than first calling lookup_order to retrieve the actual order ID. As a result, the refund call fails because the invented order ID does not correspond to any real order.

Which change would directly address the root cause of the agent inventing the order_id value?

Explanation

According to Anthropic's official guidance on defining tools for Claude, tool descriptions are the primary mechanism by which the model learns what a tool does, when to use it, and how each parameter should be populated — including any dependencies on other tools. If the process_refund tool's description does not explicitly state that order_id must be retrieved via a prior lookup_order call and must never be assumed, guessed, or fabricated, the model has no basis to refrain from filling the required parameter with an invented value. Updating the description to state this explicit constraint directly targets the reasoning process that leads to fabrication, whereas forcing tool use on every turn, pre-extracting IDs from user text, or validating the ID server-side either fail to address why the model invents the value in the first place or only catch the problem after it has already occurred.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!