Re:LLM Structured Outputs Handbook
by reactordev on Friday January 16, 2026 @07:46PM
(#46654180)
What a gold mine!
Automata-based constraints is fun.
Re:LLM Structured Outputs Handbook
by anonymoushn on Saturday January 17, 2026 @01:41AM
(#46655870)
Hello, the part about canonical filtering in https://openreview.net/pdf?id=DFybOGeGDS doesn't seem to try to account for pretokenization. For example, if you receive " 天天中彩票APP" in o200k, it means there has to be a lowercase letter within the span of letters, and while tokens like (4 spaces) may be pairwise compatible with tokens like "123" according to the BPE merge rules, the pretokenizer would split the span of spaces to give (3 spaces), " ", "123" instead. Are you aware of any work that does actual canonical generation for models with this kind of pretokenization regex?
Re:LLM Structured Outputs Handbook
by iLoveOncall on Saturday January 17, 2026 @06:44AM
(#46657260)
> Here are a few other pointers
Proceeds to list all the libraries already listed in the guide.
I've never fully understood where Outlines fit in the stack. Is it a way to create a structured output API similar to the ones big providers have? Have you looked at something like BAML?
Some libraries:
- Outlines, a nice library for structured generation
- Guidance (already covered by FlyingLawnmower in this thread), another nice library - XGrammar, a less-featureful but really well optimized constrained generation library Some papers:- Efficient Guided Generation for Large Language Models
- Automata-based constraints for language model decoding - Pitfalls, Subtleties, and Techniques in Automata-Based Subword-Level Constrained Generation Some blog posts:- Fast, High-Fidelity LLM Decoding with Regex Constraints
- Coalescence: making LLM inference 5x faster