Guidance

Python library for interleaving generation, prompting, and logical control using Handlebars templating.

EstablishedOpen SourceLow lock-in

Pricing

Free tier

Flat rate

Adoption

Stable

License

Open Source

Data freshness

Verified · Jun 21, 2026

Overview

What is Guidance?

Guidance is a Python library from Microsoft that uses Handlebars templating to interleave AI-generated text with prompts and logical control structures. This makes it easier to create complex interactions with language models in a structured way.

Key differentiator

Guidance stands out by offering a unique way to integrate logical control and prompting within text generation, making it ideal for developers who need structured AI-generated content.

Capability profile

Capability Radar

Ease of StartEcosystemValueMaturityFlexibilityScale Ready

Honest assessment

Strengths & Weaknesses

↑ Strengths

Handlebars templating for structured text generationmedium

Interleaving of prompts and logical control within templatesmedium

Integration with language models for dynamic content generationmedium

↓ Weaknesses

Steep learning curve for non-Python developershigh

API requires Python-specific patterns, TypeScript SDK is community-maintained

Frequent breaking changes between versionsmedium

v0.1 to v0.2 migration required rewriting chain definitions

Limited language support beyond Pythonhigh

Primary development and maintenance focus is on Python, with no official support for other languages

Small community and slow issue resolutionmedium

GitHub repository has few contributors and issues take a long time to be addressed by maintainers

Fit analysis

Who is it for?

✓ Best for

Developers building interactive AI applications who need structured text generation

Teams working on chatbot development requiring dynamic and context-aware responses

Projects that require automated document creation based on variable inputs

✕ Not a fit for

Real-time data processing where low-latency is critical

Applications requiring heavy customization beyond templating capabilities

Cost structure

Pricing

Free Tier

Available

Open source — free to use

Starts at

$0

Model

Flat rate

Enterprise

None

Performance benchmarks

How Fast Is It?

Ecosystem

Relationships

Next step

Get Started with Guidance

Step-by-step setup guide with code examples and common gotchas.

View Setup Guide →