dspyEasy Examples

Framework for programming (not prompting) language models

Getting started with dspy

Installation and basic usage of dspy.

python
# Install: pip install dspy-ai
import dspy

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

dspy is a third-party package. Framework for programming (not prompting) language models. Install with: pip install dspy-ai

Common dspy operations

Frequently used features of dspy.

python
# Install: pip install dspy-ai
import dspy

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

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

Want to try these examples interactively?

Open Easy Playground