Scaffolding is the orchestration layer that lets a language model act as an agent. It connects the model to procedures, tools, prompts, and execution mechanisms, shaping how the agent takes actions and responds to results. section 8.11
A simple scaffold may use few-shot prompting: system instructions demonstrate tool calls, so the model needs no additional training. More complex, multistep tasks may use reinforcement learning with human, artificial-intelligence, or automatically computed feedback. section 8.11
Sequential web research
A web-augmented agent might answer which Daniel Craig film under 150 minutes, available on Netflix US, has the highest IMDb rating. Its scaffold can provide search, planning, navigation, backtracking, and memory tools for sequential investigation. section 8.16
Scaffolding also complicates evaluation. Two agents may use different implementations while receiving the same task, and checking only the final answer can miss how they reached it. Search-heavy agents may rely on incomplete results, hallucinate, or fail to answer. section 8.16
Table 8.1 Sample API tool calls and output formats [49]
| API name |
Example input |
Example output |
| Question answering |
“Where was the Knights of Columbus founded?” |
“New Haven, Connecticut” |
| Wikipedia search |
“Fishing Reel Types” |
“Spin fishing > Spin fishing is distinguished between fly fishing and bait cast fishing by the type of rod and reel used. There are two types of reels used when spin fishing, the open-faced reel and the closed-faced reel.” |
| Calculator |
“27 + 4 * 2” |
“35” |
| Calendar |
(none) |
Today is Monday, June 30, 2025. |
| Machine translation |
“sûreté nucléaire” |
“nuclear safety” |
Sample tool interfaces show how scaffolding turns capabilities such as question answering, search, calculation, calendars, and translation into callable actions with defined inputs and outputs. section 8.11
