Applied AI·Structured outputs and tool calling
at each step, delete every next-token option that would break the format, then sample from what remains.
Constrained decoding
Enforcing structure during generation by masking invalid tokens at every step, so the model literally cannot produce output that violates the schema or grammar. This is how strict structured output modes achieve near-100 percent conformance.