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
ChainOfThoughtto 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.
External Tutorials¶
For more tutorials, especially those focused on the DSPy integration, see:
Official DSPy Tutorials¶
- dspy.GEPA Tutorials - Official DSPy tutorials with executable notebooks
- GEPA for AIME (Math) - Optimize prompts for competition math (+10% improvement on AIME 2025)
- GEPA for Structured Information Extraction - Enterprise task optimization
- GEPA for Privacy-Conscious Delegation - Papillon benchmark (+9% with just 3 examples)
- GEPA for Code Backdoor Classification - AI control applications
- GEPA Advanced Guide - Multimodal, custom proposers, and advanced configuration
Community Tutorials & Blogs¶
- Non-Obvious Things About GEPA - Deep insights and lessons learned by @realsanketp
- Enterprise Agents with DSPy and GEPA - Production deployment patterns by @slavozard
- Multi-Agent RAG for Healthcare - Diabetes and COPD agents
- Context Engineering for AI Coding Agents - Data analysis agent optimization by @ArslanSAAS
- Teaching Small LLMs to Write Fiction - Creative writing with Gemma3-1B
- AI Voice Evolution & Authenticity - Multi-objective voice optimization
- GEPA in Observable JavaScript - Interactive browser-based GEPA by @tomlarkworthy
- OCR Optimization Research - 38% error reduction with Gemini models by Intrinsic Labs
- GEPA for AI Code Safety - Tutorial notebook by @hi_ZachParent
- Solving Agent Tool Sprawl with DSPy - GEPA optimization of tools and routes
- XKCD Comics with DSPy and GEPA - Fun application of GEPA
- Databricks Sales Support Multi-Agent - 75% routing accuracy improvement
- DeepResearch Agent - LangGraph + DSPy + GEPA research system by @RajaPatnaik
- Self-Improving AI Agents - GEPA for orchestration, TRM for reasoning
- Context Compression Experiments - GEPA for optimizing context compression prompts by @gridinoc
- Google ADK Training with GEPA - Optimizing Google Agent Development Kit agents
International Tutorials¶
- GEPA Explained (Japanese Video) - AIが反省し始めた?内省的学習法のGEPAの仕組み
- MLflow + GEPA on Databricks Free Edition (Japanese) - Qiita tutorial
- Naruto-Style Dialogues with GEPA (Japanese) - Creative application
- GEPA Revolutionary Breakthrough (Chinese) - 35x efficiency improvement explained
- DSPy + GEPA Tutorial (HuggingFace Cookbook) - Featured by @TheDojoMX
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¶
- DSPy-Go - Full Go implementation including GEPA
- Ax (DSPy in TypeScript) - GEPA available in TypeScript
- DSRs - DSPy in Rust - Rust implementation targeting the nerdiest users
Video Tutorials¶
- Weaviate: GEPA for Listwise Reranker & Evaluator-Optimizer Pattern - Step-by-step optimization tutorial including fuzzy generative tasks by @hammer_mt
- Matei Zaharia at Berkeley AI Summit - GEPA and reflective prompt evolution with few rollouts
- Weaviate Podcast #127: Deep Dive on GEPA - High-level overview with Lakshya A. Agrawal
- GEPA Paper Walkthrough (ReallyEasyAI) - Detailed paper explanation
- Karl Weinmeister: GEPA Short - Quick overview of GEPA for agent improvement
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:
-
API Keys: Most tutorials require an OpenAI API key (or other LLM provider)
-
Python Environment: Python 3.10+ with GEPA installed
-
Optional: Install DSPy for the DSPy-specific tutorials