Loading...
Structured Outputs(SO)
Guarantee that model output conforms to a schema by constraining decoding. A JSON Schema, regex, or grammar is compiled into a finite-state machine, and at every decode step the tokens that would violate the schema are masked out so only valid continuations can be sampled. In strict mode this makes malformed JSON and invalid tool arguments impossible. It is available natively at OpenAI, Google, and Anthropic and in open libraries such as Outlines and vLLM.
Loading technique guideβ¦
Structured Outputs(SO)
Guarantee that model output conforms to a schema by constraining decoding. A JSON Schema, regex, or grammar is compiled into a finite-state machine, and at every decode step the tokens that would violate the schema are masked out so only valid continuations can be sampled. In strict mode this makes malformed JSON and invalid tool arguments impossible. It is available natively at OpenAI, Google, and Anthropic and in open libraries such as Outlines and vLLM.
Loading technique guideβ¦