• Picks
  • Discover
  • Alternatives
  • About

© 2026 Willet

  • Newsletter
  • About
  • FAQ
  • Terms
  • Privacy & Cookies
Join the Discord (opens in a new tab)
.txt avatar

Outlines

Python library that constrains LLM generation to schemas and grammars

  • Agent frameworks and tools
  • AI models and runtimes
View on GitHub
Website

What it is

Outlines is a Python library that forces language model output to match a given type, regex, JSON schema, Pydantic model, or context-free grammar while tokens are being generated, instead of fixing output afterward. The same code works across backends such as Hugging Face Transformers, vLLM, Ollama, and OpenAI. Developers building extraction, classification, or function-calling pipelines use it to get valid, parseable results every time, and it also includes reusable prompt templates.

Images

Facts

Stars
15,960 GitHub stars.
15,960

Forks
909
Commits
1,325
Contributors
179
Language
Python
License
Apache-2.0
Last commit
Aug 24, 2026
On GitHub since
March 2023
First release
May 2023
Platforms
library
Self-hostable
No
Tags
  • llm-inference
  • structured-output
  • prompt-engineering

Last synced from GitHub on Oct 20, 2026

The 10 best overlooked open-source projects, every Monday.

Share and more

Comments

No comments yet. Start the conversation.