Skip to main content

Structured output

Constrain model output against a runtime-supplied JSON Schema.

Running on the dummy driver?

The dummy driver honors constraint masks, so these inferlets emit in-grammar / schema-valid output — but the content inside the structure (string field values, numbers) is uniform random. The structural assertions hold; semantic ones don't.

InferletWhat it shows
json-schema-constrained-decodingCompile a JSON Schema, feed grammar masks into PTIR, and decode valid JSON.