Skip to content

Tutorials

Welcome to the GEPA tutorials! These hands-on notebooks will help you learn GEPA through practical examples.

Available Tutorials

DSPy Full Program Evolution

Learn how to use GEPA to evolve entire DSPy programs, including custom signatures, modules, and control flow logic.

  • DSPy Full Program Evolution - Evolve a complete DSPy program from a basic ChainOfThought to a sophisticated multi-step reasoning system. This tutorial demonstrates how GEPA can improve a program from 67% to 93% accuracy on the MATH benchmark.

ARC AGI Example

  • ARC AGI Example - Apply GEPA to the ARC (Abstraction and Reasoning Corpus) challenge, demonstrating how to optimize programs for complex reasoning tasks.

3D Unicorn Optimization (Seedless)

Use GEPA's seed_candidate=None mode to evolve a complete Python program (build123d + pyrender) that generates a 3D unicorn — starting from no code at all. This tutorial demonstrates how to optimize when you know what good looks like (evaluation aspects) but don't know how to get started (no seed). GEPA bootstraps the first candidate from a natural-language objective, then iteratively refines it using VLM feedback on rendered multi-view images.

  • 3D Unicorn Optimization - From no code to a 600+ line 3D modeling program through seedless optimization with visual feedback.

External Tutorials

For more tutorials, especially those focused on the DSPy integration, see:

Official DSPy Tutorials

Community Tutorials & Blogs

International Tutorials

Quick Start Tools

  • DSPy + GEPA Skill - Quick way to try DSPy + GEPA without setup. Simply install and start experimenting! Created by @raveeshbhalla
  • Arbor: Agent Architecture Discovery - GEPA-integrated tool for discovering optimal agent architectures, well-integrated into DSPy by @NoahZiems

Language-Specific Implementations

Video Tutorials

Running Tutorials Locally

To run these tutorials locally:

# Install GEPA with full dependencies
pip install gepa[full]

# Install Jupyter
pip install jupyter

# Start Jupyter
jupyter notebook

Then navigate to the tutorial notebook you want to run.

Prerequisites

Before starting the tutorials, ensure you have:

  1. API Keys: Most tutorials require an OpenAI API key (or other LLM provider)

    export OPENAI_API_KEY="your-key-here"
    

  2. Python Environment: Python 3.10+ with GEPA installed

    pip install gepa[full]
    

  3. Optional: Install DSPy for the DSPy-specific tutorials

    pip install dspy