Structured output is model-generated content organized for a purpose, such as making a tool call or taking another action, rather than only producing a text response. An AI agent can use actions alongside or instead of text, then incorporate tool results into its response. Models can learn this behavior through fine-tuning, few-shot prompting, or reinforcement learning; the interaction setup, or scaffolding, also affects performance. section 8.11
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” |
Compare sample API inputs and outputs for question answering, search, calculation, calendars, and translation. section 8.11









