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

Previous Lesson
Next Lesson
Designing a tool interface — Building LLM Applications — Vertex