passdrill
AI & LLM Engineering · AI Agents & Tool Use · Card 005/012 easy

A team building a travel-booking agent wants it to be able to search flights and book a specific flight, but not to do anything else (such as issuing refunds or changing account settings). They implement this by giving the model only two tool definitions -- `search_flights` and `book_flight` -- each with a description and a schema describing its expected arguments, and no others. What does this achieve?

  1. It guarantees the model will never attempt to request an action outside the two defined tools, since a model literally cannot generate text describing an unlisted operation
  2. It scopes what the agent can be asked to do at the request-generation level: the model can only choose among the specific named, schema-defined tools it has been given, so issuing a refund or changing settings was never exposed as an option for it to request in the first place
  3. It removes the need for the calling application to check whether an incoming tool request actually matches one of the two defined tools before executing it
  4. It has no effect on what the agent can request, since a model can request any operation whether or not that operation was described to it
Next card → Shuffle