guidance - Constrain LLM generation with Guidance
Controls LLM generation with regex, selections, grammars, and Python workflows for structured outputs such as JSON, XML, and code.
Tags
Updated: 2026-09-29Capabilities
Typical Inputs
Typical Outputs
What this skill does
- Constrain output with regex
- Generate structured data
- Select from fixed options
- Heal token boundaries
- Define context-free grammars
- Compose multi-step workflows
Inputs
- Model configuration
- Prompts and messages
- Regex patterns
- Grammar definitions
- Selection options
- Workflow questions
- Tool definitions
Outputs
- Constrained model text
- Named generated values
- Structured JSON or XML
- Workflow state
Requirements
- Python environment
- guidance package
- transformers package for Transformers backend
- Model backend
- API credentials for hosted models
