Lattice
Skip to content

Guidance

librarySelf-hostedguidance.mit.edu

Guidance is a self-hosted library in the Prompt Engineering layer of the AI stack. Constrained generation by interleaving control flow and model output.

By Facts verifiedmethod

Licence
MIT
Language
Python
Cost
free
Owned by
Applied Engineering

Use Guidance when

Constrained decoding with control flow interleaved into generation.

Skip Guidance when

You need better ergonomics for plain extraction.

Makes the prompt an artifact you can diff and test. See every prompts tool.

Badge this entry
Lattice badge: Guidance verified 2026-09
[![Guidance on Lattice: verified 2026-09](https://lattice.kunjshah.in/prompt-engineering/guidance/badge.svg)](https://lattice.kunjshah.in/prompt-engineering/guidance)

Rules of thumb

  • Prompt changes without evals are guesses. Version prompts and measure before you ship a wording change.
  • Keep prompts out of string literals. A prompt you cannot diff is a prompt you cannot review.
  • Fix the examples before the instructions. Models copy what you show more faithfully than what you tell.

Quick answers

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

Ask an AI about this page

Opens the assistant with this page’s link and a question already filled in.

Compared in

Reading on prompts

Alternatives to Guidance

Listed as an alternative to

  • Instructor
  • Outlines

Also in prompts

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