The Agent Loop
Structured output
Lesson 3 of 3
Force the model to return data your code can trust by treating a tool call as the output schema.
What you'll learn
- See why "just parse the JSON from the text" is fragile
- Use a tool definition as an output schema
- Validate the result before trusting it
Members only
A free account unlocks this lesson and every other one.
Runnable challenges, knowledge checks, and progress that syncs across your devices. No card needed.
Not sure yet? Try the free lesson first: The agent loop