Skip to content
mentoor

Topic 5 of 5 · 5 min read

Versioning and refreshing eval sets

Goal: Review an eval set's change history and flag stale, saturated or leaked cases.

An eval set is a living piece of code: new production failures go in, dead and solved cases come out, and every change is versioned so a score always names the exact set that produced it.

Check yourself · 1 of 3

A user reports a wrong answer in production. What is the best use of it for evals?

Choose one answer

Why it matters

Products change. A feature is renamed, a policy changes, users find new ways to phrase things. A set frozen at launch slowly stops measuring what matters. Worse, scores from two different versions of a set cannot be compared, and nobody notices because the file is just "evals.json".

How to maintain it

  1. Turn every production failure into a case. When a bug report arrives, add the input, write the criteria, confirm the current system fails it, then fix and watch it pass. That is a regression test for model behaviour.
  2. Retire stale cases. If the refund window changed from 30 to 14 days, the old expected answer is wrong. Update or delete cases whose facts or features no longer exist, and record why.
  3. Watch for saturation. A case that every candidate passes for months tells you nothing new. Keep a small set of such cases as a safety net, but do not count them as progress. Add harder cases once most of the set sits near the top score.
  4. Prevent leakage. If you paste eval cases into the prompt as few-shot examples, tune the prompt on them, or let them reach a fine-tuning set, the score stops measuring generalisation. The GPT-3 paper documents how test data in training material inflates results. Keep a separate held-out set that nobody tunes against, and give prompt examples their own list.
  5. Version it like code. Keep the set in git as plain files. Use a version number or a content hash, require a short message for each change, and record the set version beside every score.

Before and after

Weak history: one file edited in place, no messages, the pass rate "improved from 78 to 91" after someone quietly deleted nine hard cases.

Fixed history:

- {"id": "refund-007", "criteria": ["States the 30-day refund window"]}
+ {"id": "refund-007", "criteria": ["States the 14-day refund window"]}
+ {"id": "refund-061", "source": "incident-2210", "criteria": ["Does not promise a refund after 14 days"]}

Commit message: "set v1.4: policy change to 14 days; add case from incident 2210".

What goes wrong

  • Silent deletions raise the score without any real improvement.
  • Examples shared between prompt and eval reward memorising.
  • Comparing runs on different set versions gives numbers that mean nothing together.

Examples

Reading a change history

A commit removes nine cases tagged hard, and the pass rate moves from 78 to 91 percent in the same commit. The removed cases were the ones the system failed, so the improvement is the deletion, not the system. A reviewer should ask for a reason and re-score on the old set.

A leaked case

The prompt's few-shot examples include the input from case refund-012. The model now passes it by copying the example. The case should be removed from the prompt or replaced in the eval, and the pass rate recomputed without it.

Key points

  • Turn each production failure into a saved case and confirm it fails before you fix it.
  • Update or retire cases whose facts, policies or features have changed, and record why.
  • Saturated cases give no signal for progress; keep a few as a safety net and add harder ones.
  • Keep prompt examples and tuning data out of the held-out eval set to prevent leakage.
  • Version the set in git and record the set version next to every score.

Common mistakes

  • Editing the eval file in place with no version or message.
  • Deleting hard cases without a recorded reason.
  • Reusing eval cases as few-shot examples in the prompt being evaluated.
  • Comparing a score from last quarter's set with this quarter's as if they were the same test.

Check yourself · 2 of 3

What does a case that every candidate passes for months tell you?

Choose one answer

Check yourself · 3 of 3

Why keep eval cases out of the prompt's few-shot examples?

Choose one answer

Practice items, not counted towards your mastery.

Start here

More for this topic