Lattice
Skip to content

Outlines

dottxt-ai.github.iolibraryself-hosted

Outlines is a self-hosted library in the Prompt Engineering layer of the AI stack. Constrained generation that masks the token space to valid output.

By Lattice editorial · Facts verified · method

licence
Apache-2.0
language
Python
cost
free

Use Outlines when

Token-level constrained generation from a JSON schema or grammar.

Skip Outlines when

Post-hoc validation is enough for your use case.

Makes the prompt an artifact you can diff and test. — that is what this layer of the stack is answerable for. See the full Prompt Engineering section for the rest of the options.

Visit dottxt-ai.github.ioCompare with another tool
Badge this entry
Lattice badge: Outlines verified 2026-09
[![Outlines on Lattice: verified 2026-09](https://lattice.kunjshah.in/prompt-engineering/outlines/badge.svg)](https://lattice.kunjshah.in/prompt-engineering/outlines)

Quick answers

Is Outlines open source?
Yes. Outlines is open source under the Apache-2.0 licence. It is free to use.
What are the alternatives to Outlines?
The closest alternatives to Outlines are Guidance and Instructor.

Compared in

Reading on prompts

Alternatives to Outlines

Listed as an alternative to

  • Instructor
  • Guidance

Also in prompts

  • DSPy
  • Instructor
  • Humanloop
  • Guidance
  • PromptLayer
  • Agenta
  • Promptwatch
  • TextGrad