Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

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от 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:

  1. 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.
  2. 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)

  1. 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
  • If any are missing, provide installation instructions for the user's OS.
  1. Ensure repo is cloned and installed
  • Confirm if it's ok to clone dspy-gepa-logger repo 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_observable imports work from any folder.
  • See references/repo-setup.md.
  1. 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.
  1. 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.md for question prompts and mapping patterns.
  1. 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|heavy OR max_full_evals OR max_metric_calls. Default to auto=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.
  1. Create .env.local and verify API key
  • Create <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
    
  • ⚠️ CRITICAL: Inform the user they MUST manually edit this file and add their actual API key
  • The placeholder your_openai_api_key_here will 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
Полный SKILL.md на GitHub

Установить gepa-demo в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

README.mdassets/gepa-demo/gepa-demo-eval.pyassets/gepa-demo/gepa-demo-script.pyassets/gepa-demo/gepa_demo_data.pyassets/gepa-demo/gepa_demo_eval.pyassets/gepa-demo/gepa_demo_metric.pyassets/gepa-demo/gepa_demo_optimize.pyassets/gepa-demo/gepa_demo_program.pyassets/images/lineage.pngassets/images/overview.pngreferences/data-mapping.mdreferences/env.mdreferences/interactive-prompting.mdreferences/metrics.mdreferences/repo-setup.mdreferences/user-journeys.mdreferences/web-dashboard.md

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 запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить gepa-demo с