HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
newhouseb
clownfish
Python2023–2023
newhouseb / clownfish

clownfish

Constrained Decoding for LLMs against JSON Schema

9Distinct people
20Mentions
0Explicit recommenders
328GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Constrained Decoding for LLMs against JSON Schema

GitHub

Where it is used

No documented product use has been verified yet.

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 9–Nov 16 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/16/2026, 7:57:46 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 week20 dated mentions

Observed mentions: 2023-03-27 12:03:16 UTC to 2023-08-14 20:35:04 UTC. Weeks start Monday, UTC.

012342023-03-27 00:00:00 UTC to 2023-04-03 00:00:00 UTC (exclusive): 4 mentions; 2 submissions, 2 commentsMar 272023-04-03 00:00:00 UTC to 2023-04-10 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2023-04-10 00:00:00 UTC to 2023-04-17 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2023-04-17 00:00:00 UTC to 2023-04-24 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2023-04-24 00:00:00 UTC to 2023-05-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2023-05-01 00:00:00 UTC to 2023-05-08 00:00:00 UTC (exclusive): 3 mentions; 1 submissions, 2 comments2023-05-08 00:00:00 UTC to 2023-05-15 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2023-05-15 00:00:00 UTC to 2023-05-22 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2023-05-22 00:00:00 UTC to 2023-05-29 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-05-29 00:00:00 UTC to 2023-06-05 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-06-05 00:00:00 UTC to 2023-06-12 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsJun 52023-06-12 00:00:00 UTC to 2023-06-19 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2023-06-19 00:00:00 UTC to 2023-06-26 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-06-26 00:00:00 UTC to 2023-07-03 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-07-03 00:00:00 UTC to 2023-07-10 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-07-10 00:00:00 UTC to 2023-07-17 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-07-17 00:00:00 UTC to 2023-07-24 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-07-24 00:00:00 UTC to 2023-07-31 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-07-31 00:00:00 UTC to 2023-08-07 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-08-07 00:00:00 UTC to 2023-08-14 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-08-14 00:00:00 UTC to 2023-08-21 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 commentsAug 14

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
Mar 272023-03-27 00:00:00 UTC2023-04-03 00:00:00 UTC422
Apr 32023-04-03 00:00:00 UTC2023-04-10 00:00:00 UTC101
Apr 102023-04-10 00:00:00 UTC2023-04-17 00:00:00 UTC202
Apr 172023-04-17 00:00:00 UTC2023-04-24 00:00:00 UTC101
Apr 242023-04-24 00:00:00 UTC2023-05-01 00:00:00 UTC101
May 12023-05-01 00:00:00 UTC2023-05-08 00:00:00 UTC312
May 82023-05-08 00:00:00 UTC2023-05-15 00:00:00 UTC101
May 152023-05-15 00:00:00 UTC2023-05-22 00:00:00 UTC303
May 222023-05-22 00:00:00 UTC2023-05-29 00:00:00 UTC000
May 292023-05-29 00:00:00 UTC2023-06-05 00:00:00 UTC000
Jun 52023-06-05 00:00:00 UTC2023-06-12 00:00:00 UTC000
Jun 122023-06-12 00:00:00 UTC2023-06-19 00:00:00 UTC202
Jun 192023-06-19 00:00:00 UTC2023-06-26 00:00:00 UTC000
Jun 262023-06-26 00:00:00 UTC2023-07-03 00:00:00 UTC000
Jul 32023-07-03 00:00:00 UTC2023-07-10 00:00:00 UTC000
Jul 102023-07-10 00:00:00 UTC2023-07-17 00:00:00 UTC000
Jul 172023-07-17 00:00:00 UTC2023-07-24 00:00:00 UTC000
Jul 242023-07-24 00:00:00 UTC2023-07-31 00:00:00 UTC000
Jul 312023-07-31 00:00:00 UTC2023-08-07 00:00:00 UTC000
Aug 72023-08-07 00:00:00 UTC2023-08-14 00:00:00 UTC000
Aug 142023-08-14 00:00:00 UTC2023-08-21 00:00:00 UTC202

What Hacker News says

4 sources
Last weekend I built some tooling that you can integrate with huggingface transformers to force a given model to _only_ output content that validates against a JSON schema [1]. The challenge is that for it to work cost effectively you need to be able to append what is basically a final network layer to the model that is algorithmically designed and until OpenAI exposes the full logits and/or some way to modify them on the fly you're going to be stuck with open source models. I've run things against GPT-2 mostly but it's only list to try LLaMA. [1] "Structural Alignment: Modifying Transformers (like GPT) to Follow a JSON Schema" @ https://github.com/newhouseb/clownfish
In Could you train a ChatGPT-beating model for $85k and run it in a browser?
We also use GPT to perform actions in the software I build at work and we hit the same issue of inconsistency which lead me down a long rabbit hole to see if I could force an LLM to only emit grammatically correct output that follows a bespoke DSL (a DSL ideally safer and more precise than just eval'ing random AI-produced Python). I just finished writing up a long post [1] that describes how this can work on local models. It's a bit tricky to do via API efficiently, but hopefully OpenAI will give us the primitives one day to appropriately steer these models to do the right things (tm). [1] https://github.com/newhouseb/clownfish
In BlenderGPT: Use commands in English to control Blender with OpenAI's GPT-4

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.