Guidance
Programming paradigm and library for controlling LLM generation with interleaved prompting, control flow, and constrained output in one program.
Overview
Guidance lets a developer write a single program that mixes plain text prompts, control flow (loops, conditionals), and constraints on exactly what the model can generate next - regex patterns, choice lists, or structured formats - rather than making multiple separate calls to an LLM API and stitching results together in application code. This can also make generation faster by skipping tokens that are already determined by the constraints.
Guidance is a fit for teams that want fine-grained, programmatic control over the generation process itself, a compared alternative to Outlines (also in this catalog) - both constrain LLM output, with Guidance emphasizing an interleaved program-and-generation authoring style.
- Categories
- AI & Machine Learning
- Languages
- Python
- License
- MIT
Related Projects
Outlines
Apache-2.0Library for constraining LLM output to a specific structure - JSON schema, regex, grammar - guaranteeing valid, parseable results.
- AI & Machine Learning
Instructor
MITLibrary for getting reliable, structured data output from LLMs using function-calling APIs and Pydantic models for validation.
- AI & Machine Learning
CAMEL
Apache-2.0Open-source framework for research and building systems of multiple communicating, role-playing AI agents that collaborate autonomously.
- AI & Machine Learning
CrewAI
MITMulti-agent orchestration framework for building teams of collaborating, role-based AI agents that work together autonomously to complete complex tasks.
- AI & Machine Learning
Spotted an error? Suggest an edit on GitHub.