Constraining a model's output with a JSON schema feels like the moment the LLM stops being a text generator and becomes a function. You declare the fields, the server enforces the grammar, and what comes back parses every time. After months of regex-scraping JSON out of prose, it's a genuine relief.
Then you ship it, and you find out what a schema actually promises. It promises a shape. Everything you care about is content, and content is on you.
Here's the list of things that came back schema-valid and wrong, in the order I found them.
The array was the right shape and the wrong length
The model processes several items per call and returns one object per item. The schema says: an array of objects, each with these required fields.






