You will be able to
- Name the parts of a tool definition (name, description, JSON-schema parameters) and explain why its wording acts as a prompt.
- Trace the tool-call loop: the model emits a call, the application runs it, the result returns into the context, and the model continues.
- Check a model's tool call as untrusted input before running it: known tool, schema-valid arguments, then app policy such as user confirmation for write actions.
- Explain constrained sampling as masking disallowed tokens and renormalising, and compute its effect on real next-token probabilities.
- Describe how a grammar or JSON Schema changes the allowed set at every step, and what strict tool use does and does not guarantee.
- List the costs and limits of constrained outputs: per-format grammars, added latency, truncation, valid-but-wrong content, and overriding the model's preferences.
Topics
Your review
Sign in to keep your quick-check answers. The ones you miss come back for review after 1, 3 and 7 days, until they stick.
Sign in freeSources
AI Engineering · Chip Huyen, 2025
Chip Huyen. O'Reilly. Used: Ch. 2 "Understanding Foundation Models", section "Structured Outputs" ("Prompting", "Post-processing", "Constrained sampling", "Finetuning"); Ch. 6 "RAG and Agents", "Agents": "Tools" ("Write actions"), "Planning" > "Function calling"; "Agent Failure Modes and Evaluation" > "Planning failures".
Hands-On Large Language Models · Jay Alammar & Maarten Grootendorst, 2024
Jay Alammar & Maarten Grootendorst. O'Reilly. Used: Ch. 6 "Prompt Engineering", section "Output Verification" > "Grammar: Constrained Sampling".
Tool use with Claude · Anthropic
Anthropic. Claude Platform documentation. Used: Fetched 2026-10-21: client tools vs server tools, stop_reason "tool_use", tool_result round trip, tool definitions billed as input tokens. Open source
Define tools · Anthropic
Anthropic. Claude Platform documentation. Used: Fetched 2026-10-21: name / description / input_schema fields, the constructed tool-use system prompt, "Best practices for tool definitions" and the good/poor get_stock_price descriptions. Open source
Strict tool use · Anthropic
Anthropic. Claude Platform documentation. Used: Fetched 2026-10-21: strict: true and grammar-constrained sampling, the passengers example, guarantees. Open source