gepa-demo
БесплатноЗапускает вложенные скриптыНе проверенGuide users who want to optimize their LLM prompts. We will interact with them, understanding their datasets and grader requirements, and finally writing DSPy…
от raveeshbhalla★ 60 звёзд на GitHubОб этом скилле
What is prompt optimization?
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.
What is GEPA?
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:
- Text Feedback: most prompt optimization algorithms and RL simply use a scalar reward. GEPA however also uses textual feedback, including log traces, which can be used to identify the root cause of issues in a prompt. This makes it particularly well suitable for LLM as Judges, which may not be well calibrated from a score perspective but can provide high quality text feedback identifying what needs to be improved.
- Pareto Frontiers: GEPA does not simply select the best overall prompt based on score, but checks for which prompt dominates other candidate prompts on most test cases in the validation dataset. Through this, you are more likely to find a prompt that performs reliably on a wider variety of cases, rather than one that might simply spike on some scenarios but underperform on others.
More can be read about GEPA on this Github repo if needed.
The goal for this skill
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.
Workflow (follow in order)
- Validate prerequisites
- Check that required tools are installed:
- Python 3.8+:
python --version - Node.js 20.19+:
node --version(Prisma requirement) - npm:
npm --version - git:
git --version
- Python 3.8+:
- If any are missing, provide installation instructions for the user's OS.
- Ensure repo is cloned and installed
- Confirm if it's ok to clone
dspy-gepa-loggerrepo to the current folder (if not, ask where to clone it). - Clone it from https://github.com/raveeshbhalla/dspy-gepa-logger.git
- Install in editable mode so
gepa_observableimports work from any folder. - See
references/repo-setup.md.
- Confirm data location
- Look in the current folder for csv, json or jsonl files.
- Confirm with the user that if that's the file they want to use for optimization.
- If not, ask where the data file lives and move it to the current folder.
- Inspect data and define the task schema
- Load a small sample (first ~5–10 rows).
- Ask the user to map which fields are inputs and which are expected outputs.
- Show them the fields and some sample values so they have an idea of what data they're working with.
- Identify optional metadata fields (IDs, timestamps, categories, etc.).
- Decide the output type (single field, multi-field, structured JSON, etc.).
- For messy columns, propose a normalized mapping and confirm.
- See
references/data-mapping.mdfor question prompts and mapping patterns.
- Collect model + budget preferences
- IMPORTANT: Use AskUserQuestion tool if available for better interactivity
- Ask for:
- Task LM (what they'll use in production - can be smaller/cheaper like gpt-5-mini, claude-4-5-haiku)
- Reflective/Judge LM (recommend stronger model like gpt-5.2, claude-4-5-sonnet)
- Budget:
auto=light|medium|heavyORmax_full_evalsORmax_metric_calls. Default toauto=light - Whether to attach the web dashboard (default: yes)
- Project/run name
- Seed prompt (user can provide some text, rubrics or point to a file to extract from)
- If unclear, propose sensible defaults based on your web search and confirm.
- Create
.env.localand verify API key
- Create
<user-folder>/optimizer-script/.env.localwith 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 - ⚠️ CRITICAL: Inform the user they MUST manually edit this file and add their actual API key
- The placeholder
your_openai_api_key_herewill cause authentication errors - If using other providers (Anthropic, etc.), add those keys too (see
references/env.md) - Keep the reflective LM and judge LM the same unless the user explicitly splits them
- WAIT for user confirmation that they've added their API key bef
Установить gepa-demo в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл gepa-demo?
Guide users who want to optimize their LLM prompts. We will interact with them, understanding their datasets and grader requirements, and finally writing DSPy code to optimize their prompt (using a custom implementation of the GEPA algorithm).
Как установить скилл gepa-demo?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл gepa-demo запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic