Validation and repair
Generating freely, then validating the output against a schema and retrying with the error fed back.
By Lattice editorial · Entry last reviewed · method
What it implies
Weaker than constrained decoding but far more ergonomic, and it handles messy extraction that token masking handles awkwardly. It gives a typed retry rather than a guarantee. If you cannot decide between the two, start here.