#structured-outputs
7 articles
Text-to-SQL and Structured Data Retrieval
How to build production text-to-SQL systems: schema injection, SQL generation, execution sandboxing, error-retry loops, and NL-to-Cypher for graph databases.
Structured Data Extraction with LLMs
How to turn unstructured documents into typed, validated records using Pydantic AI and instructor — the entity extraction patterns that actually hold in production.
Structured Outputs and Constrained Decoding: Guaranteeing Parseable JSON
How strict mode and grammar-constrained decoding actually guarantee parseable JSON — token masking, FSMs, xGrammar, and the validation layer you still need.
The tool-use round trip: agentic loops, stop reasons, and parallel calls
How the model-to-application protocol works: stop reasons, parallel tool_use blocks, context rot, and loop budgeting that keeps production agents alive.
Designing Tool Schemas That Models Actually Understand
How to write tool names, descriptions, and parameter schemas that prevent wrong tool selection, hallucinated arguments, and silent agent failures in production.
JSON Mode vs Structured Outputs vs Tool Calling: What Actually Differs
Three APIs that all return JSON but with very different guarantees. Understand when each breaks, what they cost, and which to reach for in production.
Tool and function calling: the LLM's hands
How LLMs invoke external tools via structured JSON — the protocol, the round-trip mechanics, schema design basics, and the failure modes that bite in production.