Tool Use Prompting
Tool use prompting defines when and how the model should call external tools such as search, calculators, APIs, databases, or internal functions.
Advanced Architecture
When to use
Use it for agents, real-time data access, calculations, database lookups, and multi-tool workflows.
Prompt example
Task: Apply Tool Use Prompting to the user's request. Context: describe the input, constraints, target audience, and desired format. Instruction: be explicit, keep the output structured, and state any assumptions.
Output example
Structured answer based on the requested technique. Key result: the model follows the stated task and format. Notes: validate the output before using it in production.
Best practices
- Document tool names, parameters, and allowed use cases.
- Define when not to call tools.
- Provide examples of valid tool calls.
- Design fallback behavior for tool failures.
Common pitfalls
- Unclear tool descriptions cause wrong calls.
- Models may overuse tools.
- Tool output can exceed the context window.
- Parallel calls can introduce ordering issues.