guidance-ai/guidance

A guidance language for controlling large language models.

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 32 minutes ago
Added to GitGenius on September 2nd, 2026
Created on November 10th, 2022
Open Issues & Pull Requests: 323 (+0)
GitHub issues: Enabled
Number of forks: 1,203
Total Stargazers: 21,739 (+0)
Total Subscribers: 121 (+0)

Repository Insights (GitGenius)

Most active contributors

Sign in to see contributor activity.

Related repositories by overlapping contributors

No overlapping-contributor repos identified yet.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 84
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 547 days
Stale 30+ days: 80
Stale 90+ days: 65

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • bug (3)
  • enhancement (2)
  • good first issue (2)

Most active issues this week

Detailed Description

Guidance is a programming language for controlling large language models through structured prompts and constrained generation.

The tool addresses the challenge of obtaining reliable, well-formatted output from language models while minimizing latency and cost. It works by allowing developers to interleave generation with control flow—conditionals, loops, and tool calls—while enforcing output constraints through regular expressions, token selection, and context-free grammars. This means you can guarantee that a model's output conforms to a specific format or vocabulary before it is generated, rather than hoping the model complies after the fact.

Guidance suits projects where output structure matters: parsing structured data, generating code, building multi-turn interactions, or ensuring compliance with a known schema. It works across multiple backends including Transformers, llama.cpp, and OpenAI's API, so you can apply the same Guidance code to different models. The tool provides a Pythonic interface with decorators for composing reusable generation functions, and includes a Mock model for testing constraints offline without making API calls. This is particularly valuable when iterating on grammars or validating logic before running against a live model.

The project maintains a substantial base of real-world adopters, with nearly all open issues coming from outside users rather than the core team. Maintainers typically respond to new issues and pull requests within a few days. Work in the issue tracker centers on bug fixes and enhancements, indicating active refinement of existing functionality.