← all repositories

guidance-ai/guidance

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

21.5k stars Jupyter Notebook Language ModelsLLMOps · Eval
guidance
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.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.