json-schema
2 free lessons tagged json-schema across AI. Each one is a short sequence of focused steps with narration and a five-question quiz at the end — take them in any order, no signup required.
From Schema to Mask: The Automaton Index
The naive mask costs 64 million validity checks per response. The trick that made constrained decoding practical is to notice that the answer depends only on the automaton's current state, so it can be computed once per state and looked up thereafter. This lesson builds that idea: regex to DFA, why the state is a sufficient summary, how JSON Schema compiles down, and what the index costs.
Tool Use Patterns: Schema Design, Structured Output, and Validation Loops
A deep dive into designing tool schemas that LLMs actually call correctly — covering parameter naming, description quality, structured output via response schemas, output parsing, and error message design that drives self-correction.

