Structured Output And Tool Calling

Reference-grade guide to getting reliable structured output and tool/function calls out of LLMs — JSON mode vs constrained/grammar-guided decoding, response_format json_schema and tool-schema coercion, Zod/Pydantic validation at the boundary, the validate→repair→escalate→fallback loop, tool-argument validation, idempotency for safe retries, fallback chains, and evals. Use when an LLM must return parseable JSON, fill typed tool arguments, or drive deterministic downstream code.

jpoindexter Updated 2 repo stars

File contents

jpoindexter/design-and-ai-skills commit e21e22e158

Frequently asked questions

npx get-skill add jpoindexter/structured-output-and-tool-calling