guidance-ai/guidance
A programming paradigm for steering large language models by constraining output structure and interleaving control flow with generation.

Velocity · 7d
+16
★ / day
Trend
→steady
star history
Guidance provides a Pythonic interface for working with LLMs that allows precise control over how outputs are structured. It supports multiple backends including Transformers, llama.cpp, and OpenAI. Users can constrain generation using regex and context-free grammars, and interleave control structures like conditionals, loops, and tool use directly with generation calls.