/gepa-observable-migration:gepa-demofrom gepa-observable-migration
Guides users through prompt optimization using the GEPA algorithm with DSPy, including dataset collection, grader creation, and running optimization loops.
Ships in gepa-observable-migration. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Prompt optimization is the process of improving the quality of prompts used in language models. It is often done manually, but increasingly their are frameworks (such as DSPy) being used to use LLMs to do this.
In essence, the process involves the user providing a dataset and a grader or reward model to judge an LLM's output. A prompt's performance on the dataset is measured, the gaps in in its performance identified, and a new prompt is then proposed and tested. This runs in a loop until an end state is reached.
GEPA (which stands for GEnetic PAreto) is a prompt optimization algorithm that follows the process above. It is increasingly a popular approach to prompt optimization, and utilizes two key strategic choices compared to other algorithms:
More can be read about GEPA on this Github repo if needed.
Help users improve their prompts using our custom implementation of GEPA. Ask them for a dataset and create a grader for them (if they don't already have one), then optimize the prompt.
Our custom GEPA implementation forks the original library to provide observability into its run. The Github repo also packages a webserver which is used to visualize the process.
python --versionnode --version (Prisma requirement)npm --versiongit --versiondspy-gepa-logger repo to the current folder (if not, ask where to clone it).gepa_observable imports work from any folder.references/repo-setup.md.references/data-mapping.md for question prompts and mapping patterns.auto=light|medium|heavy OR max_full_evals OR max_metric_calls. Default to auto=light.env.local and verify API key<user-folder>/optimizer-script/.env.local with template:
OPENAI_API_KEY=sk-... # User must replace with actual key
TASK_LM=openai/gpt-5-mini
REFLECTIVE_LM=openai/gpt-5.2
JUDGE_LM=openai/gpt-5.2
your_openai_api_key_here will cause authentication errorsreferences/env.md)dspy.Example list from the dataset and call .with_inputs(...).dspy.Signature from input/output fields.dspy.Module (e.g., ChainOfThought or Predict).references/data-mapping.md for patterns.dspy.Prediction(score=float, feedback=str).Signature (e.g., JudgeSig) and call
dspy.ChainOfThought(JudgeSig) to get structured outputsreferences/metrics.md for templates.<user-folder>/optimizer-script/ and copy all files from assets/gepa-demo/ into it.gepa_demo_data.py, gepa_demo_program.py, gepa_demo_metric.py to match the dataset.gepa-demo-script.py keeps CLI args for:
--seed-prompt--auto or --max-full-evals or --max-metric-calls--server-url--project-name--log-dir--train-ratio/--val-ratiooptimizer-script/.python <user-folder>/optimizer-script/gepa-demo-eval.py --data-file <path>.score + feedback, and outputs look sane.--use-llm-judge. If scores are all zero, the judge output
is likely malformed or not being parsed.references/web-dashboard.md to start the server from the cloned repo web/ directory.npx prisma generate is run before npx prisma migrate deploycd web && npm run devpython <user-folder>/optimizer-script/gepa-demo-script.py ... with the server URLauto=medium or auto=heavy for better results)To start completely fresh:
# Stop web server
pkill -f "next dev"
# Remove directories
rm -rf optimizer-script dspy-gepa-logger
# Clear database (if needed)
rm dspy-gepa-logger/web/dev.db
# Start from step 0
Common issues:
"Incorrect API key" error
optimizer-script/.env.local with your actual API keyyour_openai_api_key_here with sk-..."Cannot find module '.prisma/client'" error
npx prisma generate in the web/ directorynpx prisma migrate deploy"Port 3000 already in use" error
lsof -i :3000 then kill the processWeb server stops unexpectedly
lsof -i :3000cd web && npm run dev"temperature not supported" error
temperature=1.0No data showing in dashboard
sqlite3 web/dev.db "SELECT COUNT(*) FROM Run;"--server-url http://localhost:3000 was passed to optimizerWhen available, use the AskUserQuestion tool for better interactivity:
This creates a more guided, interactive experience.
references/data-mapping.mdreferences/metrics.mdreferences/env.mdreferences/repo-setup.mdreferences/web-dashboard.mdreferences/interactive-prompting.mdreferences/user-journeys.mdassets/gepa-demo/README.md (opens in a new tab)assets/gepa-demo/gepa-demo-eval.py (opens in a new tab)assets/gepa-demo/gepa-demo-script.py (opens in a new tab)assets/gepa-demo/gepa_demo_data.py (opens in a new tab)assets/gepa-demo/gepa_demo_eval.py (opens in a new tab)assets/gepa-demo/gepa_demo_metric.py (opens in a new tab)assets/gepa-demo/gepa_demo_optimize.py (opens in a new tab)assets/gepa-demo/gepa_demo_program.py (opens in a new tab)references/data-mapping.md (opens in a new tab)references/env.md (opens in a new tab)references/interactive-prompting.md (opens in a new tab)references/metrics.md (opens in a new tab)references/repo-setup.md (opens in a new tab)references/user-journeys.md (opens in a new tab)references/web-dashboard.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub raveeshbhalla/dspy-gepa-logger --plugin gepa-observable-migration2 skills in this plugin
Other plugins' skills for the same job