Anthropic adds support for external tools to Claude 3. This allows the model to automatically access documents or perform more complex calculations. According to Anthropic, Claude 3 can reliably select the right tool for a task from hundreds of options.
Customers can give Claude access to internal knowledge databases, real-time data, and complex calculations via structured APIs. In addition, Claude can orchestrate sub-agents to handle granular requests. This allows the AI model to be augmented with custom functionality to handle a wider range of tasks.
Tools must be provided by API users, as Claude itself does not have any built-in tool functionality. Each tool consists of a name, a detailed description, and an input schema in JSON format.
Anthropic recommends providing as much detail and context about the tools in the descriptions as possible, so that Claude can learn how to use them correctly. The description is even more important than the usage examples. Each tool should be described with at least three to four sentences that answer questions like
- What the tool does
- When to use it (and when not to)
- What each parameter means and how it affects the behavior of the tool
- Important caveats or limitations, such as what information the tool will not return if the tool name is unclear
If Claude recognizes a suitable tool, the API returns a response with the reason "tool_use". Based on the tool name and input, the function can be executed on the client side and the result returned to Claude.
Depending on the task, Claude displays a "chain of thought" with step-by-step considerations of how to use which tools. This provides insight into its decision-making process and helps with debugging. For more complex models like Sonnet, the chain of thought can be stimulated by special prompts.
According to Anthropic, the top model Opus is best able to combine multiple complex tools and handle missing parameters. It asks for more information if needed.
The smaller Haiku model tries to invoke tools even without explicit arguments. Overall, Claude can reliably select the right tool from hundreds of options, Anthropic says.
With well-designed tools, the range of applications for Claude can be enormously expanded, according to Anthropic. The API documentation contains numerous examples of how Claude can be used as a customer service assistant, to extract structured data, or to control subagents.