AI Engineering Principles & Practice · Post 004
Make the Tool Obvious
Clear purpose. Clear inputs. Useful results.
The principle
An AI system can only use a tool through the interface it receives. If the tool name is vague, the inputs are unclear, or the result is hard to interpret, the agent may choose the wrong tool or use it incorrectly.
A tool is part of the AI system’s design. Its description should make clear what it does, when it should be used, what information it needs, and what it returns. The system should also handle invalid inputs and errors in a way that makes the next step understandable.
For example, a tool named search gives little guidance. A tool described as “search the official course handbook for course rules and deadlines” gives a clearer signal about its purpose.
A practical example: searching a course handbook
Suppose you are building an assistant that answers questions from a course handbook. It has access to a search tool. A useful tool definition could clarify:
- Purpose: Search the official handbook for course information.
- When to use it: Use it when an answer depends on handbook content or a course-specific rule.
- Inputs: A clear search query, and the course identifier if there are multiple handbooks.
- Results: Relevant passages with section names or page references.
- No-result behavior: Return a clear “no relevant passage found” result so the assistant knows not to invent an answer.
This helps the agent distinguish a grounded answer from a guess and gives it information it can use in its response.
Designing a useful tool
When you design a tool for an AI system, consider these questions:
- Does the name make the tool’s purpose clear?
- Does the description explain when the tool should—and should not—be used?
- Are input names, formats, and required fields understandable?
- Does the tool return information in a predictable, useful format?
- Do errors explain what went wrong and how the system can recover?
Design the interface, then test it on realistic tasks. A test set can include ordinary requests, ambiguous requests, missing inputs, and cases where the tool should not be called. Review the results and revise the interface when the agent repeatedly misunderstands it.
Independent study exercise
Design a tool that lets an AI assistant search a course handbook. Write a short specification with:
- The tool’s name and purpose.
- When the assistant should use it.
- The input fields and their formats.
- The result fields the tool should return.
- What the tool should return when it finds no relevant information or receives invalid input.
Then try three realistic questions. Check whether the assistant chooses the tool appropriately, supplies usable inputs, and explains the result accurately. Add any recurring failure to your evaluation set.
Research basis
- Anthropic, “Writing Effective Tools for Agents — With Agents” (September 11, 2025). The article discusses clearly defined tools, tool descriptions, realistic evaluation tasks, and iterative improvement.
- OpenAI, “Function Calling”. The guide recommends clear function names and parameter descriptions, predictable and intuitive functions, and structured inputs that help prevent invalid calls.
This post is an independent study reference based on publicly available engineering material. It is not an official guide or endorsement from the cited organizations.
AIYING — Accomplishing with AI
AI Engineering Principles & Practice · 004


No comments:
Post a Comment