← All patterns
Structured Output & Extraction
Turning generated text into data your system can actually depend on.
5 patterns
Schema-First Generation
Define the output type first and constrain decoding to it, so parsing becomes a guarantee rather than a hope.
8 minaka constrained decoding
Validate and Repair Loop
When output fails validation, hand the model the specific errors and let it fix them instead of retrying blind.
8 minaka self-correction
Extraction with Provenance
Return the source span and a confidence alongside every extracted field, so reviewers can verify without re-reading the document.
9 minaka grounded extraction
Classification with an Escape Hatch
Give every classifier an explicit way to say "none of these" and "I am not sure", then route those cases instead of forcing a label.
8 minaka abstention
Decomposed Extraction
Split a large schema or a long document into focused passes instead of asking for eighty fields in one call.
9 minaka multi-pass extraction