For the complete documentation index, see llms.txt. This page is also available as Markdown.

Tutorial 5: Optimize a judge with GEPA

Tutorial 5 — Optimize a judge with GEPA so its verdicts match your team's labels.

Time: ~45 minutes (most of which is GEPA running) Level: Intermediate You'll build: A judge tuned against ≥30 labels, with measurable agreement-rate lift.

What you'll learn

  • How to prepare a labeled dataset for GEPA

  • How to run a GEPA optimization

  • How to interpret the before/after agreement rates

  • When to re-optimize

Prerequisites

Step 1: Prepare the labeled dataset

Create a JSONL with one row per example:

{"input": "...", "output": "...", "label": "good"}
{"input": "...", "output": "...", "label": "bad"}

Upload to Premium as a labeled dataset:

Step 2: Inspect baseline agreement

Run the judge over the labeled set without optimization:

Anything below 80% is noisy. GEPA usually closes the gap.

Step 3: Run GEPA

GEPA explores rubric variations, runs each against your labels, picks the best.

Step 4: Read the result

Step 5: Validate on held-out examples

If you have a held-out labeled set, run the optimized judge against it. If agreement is similar, you're not over-fitting; if much lower, expand your training set or check for label inconsistencies.

When to re-optimize

  • After labeling ≥30 more examples

  • When your team's quality bar changes

  • When the underlying judge model is upgraded

What's next

Last updated

Was this helpful?