Guidance
the six Ws · specification
Maintained by the guidance-ai project (roots at Microsoft).
A paradigm for constraining and interleaving LLM generation with control flow, regex, and grammars.
A Python library driving local or API-based models.
Reach for it when you need reliable structured output or token-level control.
Enforces output structure and reduces wasted tokens by constraining generation.
Works with Transformers, llama.cpp, and OpenAI-compatible APIs.
Maintained by the guidance-ai community; open-source (MIT/Apache-2.0), self-hostable, no hosted service. With local models it runs entirely on your machine.