HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
dottxt-ai
outlines
Python2023–2026
dottxt-ai / outlines

outlines

Structured Outputs

46Distinct people
53Mentions
0Explicit recommenders
16KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Structured Outputs

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:56:07 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year53 dated mentions

Observed mentions: 2023-07-21 23:46:24 UTC to 2026-10-16 19:42:56 UTC.

05101520252023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 19 mentions; 3 submissions, 16 comments20232024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 24 mentions; 3 submissions, 21 comments20242025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 5 mentions; 1 submissions, 4 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 5 mentions; 1 submissions, 4 comments. Incomplete calendar period.2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC19316
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC24321
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC514
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC514

What Hacker News says

53 sources
This is a fantastic guide! I did a lot of work on structured generation for my PhD. Here are a few other pointers for people who might be interested: Some libraries: - Outlines, a nice library for structured generation - https://github.com/dottxt-ai/outlines - Guidance (already covered by FlyingLawnmower in this thread), another nice library - https://github.com/guidance-ai/guidance - XGrammar, a less-featureful but really well optimized constrained generation library - https://github.com/mlc-ai/xgrammar - This one has a lot of cool technical aspects that make it an interesting project Some papers: - Efficient Guided Generation for Large Language Models - By the outlines authors, probably the first real LLM constrained generation paper - https://arxiv.org/abs/2307.09702 - Automata-based constraints for language model dec
Read the rest
oding - A much more technical paper about constrained generation and implementation - https://arxiv.org/abs/2407.08103 - Pitfalls, Subtleties, and Techniques in Automata-Based Subword-Level Constrained Generation - A bit of self-promotion. We show where constrained generation can go wrong and discuss some techniques for the practitioner - https://openreview.net/pdf?id=DFybOGeGDS Some blog posts: - Fast, High-Fidelity LLM Decoding with Regex Constraints - Discusses adhering to the canonical tokenization (i.e., not just the constraint, but also what would be produced by the tokenizer) - https://vivien000.github.io/blog/journal/llm-decoding-with-regex-constraints.html - Coalescence: making LLM inference 5x faster - Also from the outlines team - This is about skipping inference during constrained generation if you know there is only one valid token (common in the canonical tokenization setting) - https://blog.dottxt.ai/coalescence.html
In LLM Structured Outputs Handbook
I assume they're doing "Structured Generation" or "Guided generation", which has been possible for a while if you control the LLM itself e.g. running an OSS model, e.g. [0][1]. It's cool to see a major API provider offer it, though. The basic idea is: at each auto-regressive step (each token generation), instead of letting the model generate a probability distribution over "all tokens in the entire vocab it's ever seen" (the default), only allow the model to generate a probability distribution over "this specific set of tokens I provide". And that set can change from one sampling set to the next, according to a given grammar. E.g. if you're using a JSON grammar, and you've just generated a `{`, you can provide the model a choice of only which tokens are valid JSON immediately after a `{`, etc. [0] https://github.com/dottxt-ai/outlines [1]
Read the rest
In GPT-5 for Developers
If I understand it correctly, that's a valid concern but the way structured generation library like outlines[1] work is that they can generate multiple variants of the inference (which they call beam search). One beam could be "This is a way to solv-". With no obvious "good" next token. Another beam could be "This way is solv-". With "ing" as the obvious next token. It will select the best beam for the output. [1]:https://github.com/dottxt-ai/outlines
In Albert Einstein's theory of relativity in words of four letters or less

Showing the 15 most recent of 53 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.