Loading lesson page...
AI From Scratch/Lesson 04/~75 minutes
Structured Output — JSON Schema, Pydantic, Zod, Constrained Decoding
"Ask the model nicely to return JSON" fails 5 to 15 percent of the time, even on frontier models. Structured outputs close that gap with constrained decoding: the model is literally prevented from emitting a token that would violate the sc...
Build