Guidance
by guidance-aiLanguage for controlling large language models. Mix templating, control flow and generation in one expression.
About Guidance
Guidance is a Python open-source prompt engineering project by guidance-ai. Language for controlling large language models. Mix templating, control flow and generation in one expression. With 20,000 GitHub stars and 0forks, it's one of the Prompt Engineering tools worth knowing. You can download the source, browse it on GitHub, or read the full setup guide in the README below.
From the project README
<div align="right"> <a href="https://discord.gg/cjPfAK43dz"><img src="https://img.shields.io/badge/Discord-Join%20Us-5865F2?logo=discord&logoColor=white" alt="Discord"></a> <a href="mailto:guidanceai@microsoft.com"><img src="https://img.shields.io/badge/Email-guidanceai%40microsoft.com-0078D4?logo=microsoft-outlook&logoColor=white" alt="Email"></a> <img src="https://img.shields.io/badge/Hours-10am--2pm%20Pacific-gray" alt="Hours"> </div> <div align="center"><picture> <source media="(prefers-color-scheme: dark)" srcset="docs/figures/guidance_logo_blue_dark.svg"> <img alt="guidance" src="docs/figures/guidance_logo_blue.svg" width=300"> </picture></div> <br/>
Guidance is an efficient programming paradigm for steering language models. With Guidance, you can control how output is structured and get high-quality output for your use case—while reducing latency and cost vs. conventional prompting or fine-tuning. It allows users to constrain generation (e.g. with regex and CFGs) as well as to interleave control (conditionals, loops, tool use) and generation seamlessly.
Install
Guidance is available through PyPI and supports a variety of backends (Transformers, llama.cpp, OpenAI, etc.). If you already have the backend required for your model, you can simply runpip install guidance
Features
A Pythonic interface for language models
When using Guidance, you can work with large language models using common Python idioms:
This is an excerpt from the project's own README, quoted here for reference. Read the full README on GitHub →
Guidance — FAQ
What is Guidance?
Language for controlling large language models. Mix templating, control flow and generation in one expression.
Is Guidance free to use?
Yes. Guidance is open-source and free. You can browse the source on GitHub or download it here at no cost — no signup required.
How do I install and run Guidance?
Download the latest source as a ZIP from GitHub (or clone the main branch), then follow the setup steps in the README below.
What language is Guidance written in?
Guidance is primarily written in Python.
How popular is Guidance?
Guidance has 20,000 stars and 0 forks on GitHub — a useful signal of how actively it's maintained and trusted by developers.
More Prompt Engineering skills
See all Prompt Engineering →f.k.a. Awesome ChatGPT Prompts. Share, discover, and collect prompts from the community. Free and open source — self-host for your organization with complete privacy.
The original awesome-list of high-quality ChatGPT system prompts. Translated into 13+ languages.
Examples and guides for using the OpenAI API
Generate structured text and JSON from any LLM. Guarantees the output matches your schema or grammar.