Comment on Sampling and structured outputs in LLMsparentComments−viralpraxis11moYou can specify `minimum` and `maximum` property for these fields. So this schema { "$id": "https://example.com/test.schema.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "Person", "type": "object", "properties": { "hp": { "type": "integer", "description": "HP", "minimum": 1, "maximum": 15 } } } is converted to this BNF-like representation: hp ::= ([1-9] | "1" [0-5]) space hp-kv ::= "\"hp\"" space ":" space hp root ::= "{" space (hp-kv )? "}" space space ::= | " " | "\n"{1,2} [ \t]{0,20}−michaelgiba11moFor anyone curious here is an interactive write up about this http://michaelgiba.com/grammar-based/index.html
Comments
You can specify `minimum` and `maximum` property for these fields. So this schema
is converted to this BNF-like representation:For anyone curious here is an interactive write up about this http://michaelgiba.com/grammar-based/index.html