- All Courses
- Building LLM Applications
- Tools and Agents
- Designing a tool interface
Lesson 2.2
Designing a tool interface
A tool that does three things needs a prompt to explain when each applies.
14mIntermediate13k students
Overview
Design for a reader with no memory
A tool that does three things needs a prompt to explain when each applies. Three separate tools with precise descriptions are chosen correctly far more often.
Every token a tool returns is context the model must carry for the rest of the conversation. Returning a whole record when three fields were needed is how a loop runs out of room after four steps.
Separate reads from writes, and make anything destructive require an explicit, unambiguous argument. The model should not be able to delete something by being slightly imprecise.
In this lesson you will:
- Give a tool one clear job
- Return compact, relevant results
- Make dangerous operations explicit
Resources
Notes are not saved yet — they clear when you leave this page.
Previous Lesson
Tool calling basics
5m
Multi-step agent loops
4m