What problem does it solve?
Guidance prevents large-language models from producing malformed or ill-formed outputs by enforcing regex and grammar constraints during generation, so you can reliably get structured results instead of relying on fragile “prompt + guess” formatting.
Core Features & Use Cases
- Regex-constrained generation to ensure fields match required patterns like emails, IDs, dates, or numeric formats.
- Grammar-based constrained generation for nested structures and full documents such as JSON objects and XML.
- Structured workflows with token healing to maintain correct syntax boundaries and reduce failures from tokenization artifacts.
Quick Start
Ask an AI to generate a valid JSON object by specifying a grammar or regex constraints for each required field, ensuring the response is syntactically correct and immediately parseable.