guidanceEasy Examples

Constrained generation and templating for language models

Getting started with guidance

Installation and basic usage of guidance.

python
# Install: pip install guidance
import guidance

# Basic guidance usage
print(f"Using guidance")
# See documentation for detailed examples
Expected Output
# Expected output shown below
# (Run locally with: guidance)

guidance is a third-party package. Constrained generation and templating for language models. Install with: pip install guidance

Common guidance operations

Frequently used features of guidance.

python
# Install: pip install guidance
import guidance

# Common guidance patterns
print(f"guidance version: {guidance.__version__}")

These are the most commonly used features of guidance in everyday development.

Want to try these examples interactively?

Open Easy Playground