liveBook · Manning

Tool chaining

As explained in Introduction to Generative AI, Second Edition

A chained tool call is a sequence in which the result of one tool invocation informs a subsequent invocation.

Tool chaining is a sequence in which one tool invocation produces information that guides the next. It extends an agent beyond choosing one tool and answering immediately, allowing repeated interaction with results. This supports multistep tasks but creates a growing need to track intermediate results within the model’s context. section 8.12

Restaurant sales and reviews

To answer which Google rating belongs to the highest-grossing restaurant location, an agent reads the spreadsheet, analyzes sales figures, identifies the location, and then searches the web for its current rating. section 8.12

Figure 8.7 The general agent architecture allowing for multiple actions per response
A diagram of a diagram

AI-generated content may be incorrect.

The architecture diagram helps visualize how an agent can return to the language model after each tool call and continue acting. section 8.12

How Introduction to Generative AI, Second Edition covers it

How deep it goes
Explains the mechanism and a worked scenario, then flags intermediate-result tracking without detailing its implementation.
Examples
Uses spreadsheet reading, sales analysis, and web search to find a location’s current review rating.
What you can do after
Apply it via an agent architecture to answer questions requiring successive file, analysis, and web-search actions.
How it connects
Links AI agents, tool calls, language models, and model context.

Also explained in

Compare how 3 books explain tool chaining →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Introduction to Generative AI, Second Edition. The section links point to the parts of the book it draws on.