AidanCooper/constrained-decoding

A guide to structured generation using constrained decoding

21
/ 100
Experimental

This project helps AI application developers ensure that large language models (LLMs) generate text that strictly follows a predefined format, such as JSON, XML, or specific grammar rules. You input a prompt and a desired output structure, and the system produces text that adheres precisely to that structure. It's for engineers building applications where LLM outputs must be predictable and machine-readable.

No commits in the last 6 months.

Use this if you need to guarantee that an LLM's output conforms to a specific, machine-readable schema, like JSON for an API or a custom grammar for a structured report.

Not ideal if you are looking for open-ended, creative text generation without any structural constraints.

AI-application-development LLM-output-control structured-data-generation API-response-formatting
Stale 6m No Package No Dependents
Maintenance 0 / 25
Adoption 5 / 25
Maturity 16 / 25
Community 0 / 25

How are scores calculated?

Stars

14

Forks

Language

Jupyter Notebook

License

MIT

Last pushed

Jun 09, 2024

Commits (30d)

0

Get this data via API

curl "https://pt-edge.onrender.com/api/v1/quality/llm-tools/AidanCooper/constrained-decoding"

Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.