AI IDE List
AI IDE List
Back to Developer Workflow Tools
Developer Workflow Tools
Guidance logo

Guidance

Guidance is an MIT-licensed language for controlling large language model generation with regular expressions, context-free grammars, control flow, tool use, and efficient interleaving of generation and application logic.

Quick Verdict

Guidance is most useful when exact output syntax, token-level control, or grammars are central requirements and a developer is comfortable defining generation programs directly.

Last checked: Aug 14, 2026
Pricing checked: Aug 14, 2026
Editor Base
Python library
Pricing
Open Source
Platforms
Python, Local models, Hosted model APIs
Guidance preview

Pricing Plans

Open Source

Recommended
$0

Guidance is available under the MIT license.

Model usage

Provider or infrastructure cost

Costs depend on the selected hosted API or local inference stack.

Operations

Self-managed

Deployment, evaluation, observability, and scaling are handled by the application team.

Core Features

1Constrained generation

  • Enforce regular-expression patterns
  • Generate against context-free grammars
  • Build structured responses token by token instead of repairing them afterward

2Programmable control

  • Interleave Python control flow and model generation
  • Capture generated spans and reuse variables
  • Compose tool calls and multi-step generation programs

3Model flexibility

  • Use supported local models
  • Connect compatible hosted APIs
  • Apply the same generation program across model backends where capabilities allow

Pros

  • Grammar constraints can guarantee syntax that post-hoc parsing cannot
  • Interleaving code and generation gives precise application control
  • Works with local and hosted model backends
  • MIT licensing and source access support experimentation and production adoption

Cons

  • Constrained decoding support differs by model backend
  • Grammar design can become complex for large formats
  • Syntactic correctness does not guarantee factual correctness
  • The project is a developer library rather than a hosted end-user agent platform

Guidance Review

Guidance is an MIT-licensed language for controlling large language model generation with regular expressions, context-free grammars, control flow, tool use, and efficient interleaving of generation and application logic.

What Guidance Is

A constrained-generation library for developers who need an LLM to follow exact syntax or grammar while retaining programmable control over generation and tools.

Core Capabilities

Programmable control

  • Interleave Python control flow and model generation
  • Capture generated spans and reuse variables
  • Compose tool calls and multi-step generation programs

Model flexibility

  • Use supported local models
  • Connect compatible hosted APIs
  • Apply the same generation program across model backends where capabilities allow

Best Use Cases

  • Grammar-constrained LLM output
  • Reliable JSON or domain-specific formats
  • Local-model applications
  • Tool-using generation programs
  • Research and advanced agent control

Limitations

  • Constrained decoding support differs by model backend
  • Grammar design can become complex for large formats
  • Syntactic correctness does not guarantee factual correctness
  • The project is a developer library rather than a hosted end-user agent platform

Privacy and Operational Notes

Guidance runs in the application process, but data privacy depends on the configured model backend. Local models can keep prompts on controlled infrastructure; hosted providers receive whatever context the application sends.

Guidance Alternatives

The most relevant comparison set is Instructor, DSPy, Pydantic AI. Compare products by execution model, integration surface, security controls, deployment model, maintenance burden, and total usage cost.

Verdict

Guidance is most useful when exact output syntax, token-level control, or grammars are central requirements and a developer is comfortable defining generation programs directly.

Official Sources

Best For

  • Grammar-constrained LLM output
  • Reliable JSON or domain-specific formats
  • Local-model applications
  • Tool-using generation programs
  • Research and advanced agent control

Not Ideal For

  • No-code agent building
  • Teams needing a complete hosted runtime
  • Simple extraction already solved by a typed parser
  • Use cases where backend models cannot support efficient constraints

Privacy Notes

Guidance runs in the application process, but data privacy depends on the configured model backend. Local models can keep prompts on controlled infrastructure; hosted providers receive whatever context the application sends.

Update History

  • Aug 14, 2026: Added as an active constrained-generation library for structured and tool-using LLM applications.

Related Tools

More listings in a similar part of the directory.

Browse Developer Workflow Tools