outlines-core
What it is
A Rust library for structured generation that builds regular expressions from JSON schemas and constructs finite-state automata to map vocabulary tokens to state transitions. It includes Python bindings that allow developers to guide LLM token generation to strictly match a defined schema.
The problem it solves
Ensuring LLMs generate outputs that strictly adhere to specific data structures or grammars without post-processing or validation failures.
What you could use it for
- Constraining LLM outputs to specific JSON formats
- Generating valid code or structured data using finite-state automata
- Integrating schema-constrained generation into Python LLM applications
Read the source ↗Back to the library →
Summary written by an AI model from the source; check the source before you rely on it.