Skip to content

LLM evaluation: golden sets and LLM-as-judge

A repeatable way to detect regressions before they reach users.

7 MIN READUPDATED 2026-11-18Evaluation & safety
ORIGINAL DIAGRAM · 4 STEPS1Collect real inputs and2Define a rubric: correc…3Run the golden set4Calibrate judges agains…

Original flow diagram from note steps — not a copied image

§ 01Key concepts
Golden setA labelled collection of representative inputs and expected properties.
LLM-as-judgeUsing a model to score outputs against a written rubric.
Regression gateA check that blocks a change when quality drops below a threshold.
§ 02When to use
  • Changing prompts, models or retrieval configuration.
  • Before a release that touches AI behaviour.
  • Comparing vendors on your own workload.
§ 03How it works
  1. 01Collect real inputs and label the properties that matter.
  2. 02Define a rubric: correctness, grounding, format, tone.
  3. 03Run the golden set on every candidate change.
  4. 04Calibrate judges against human scores and gate releases on the delta.
§ 04Use cases & scenarios

Prompt change before release

Context
A team rewrites the system prompt for a support assistant.
Problem
The new prompt helps some cases but breaks others.
Approach
Run a labelled golden set with a written rubric and gate the release on score deltas.
Outcome
Regressions are caught before users see them.

Vendor comparison on real traffic

Context
Two model vendors claim similar quality.
Problem
Public benchmarks do not reflect the product's actual workload.
Approach
Run both vendors through the same eval set and calibrate a judge against human ratings.
Outcome
A decision based on the product's own data.
§ 05Examples

Golden-set case with a rubric

json
{
  "input": "Summarise the refund policy for a leased device.",
  "expected_properties": ["mentions 14 days", "cites policy-v3"],
  "must_not": ["promise a same-day refund"],
  "rubric": { "correctness": 2, "grounding": 2, "format": 1 }
}

Include negative cases with must_not rules; a model that never refuses can still fail them.

Release gate

yaml
gate:
  max_faithfulness_drop: 0.02
  max_cost_per_success_increase: 10%
  judge_model: pinned
  sample_human_review: 10%

Gate on deltas against the previous version, not absolute scores, and spot-check the judge each release.

§ 06Trade-offs

Human reviews

Up: Trusted judgement

Down: Slow and hard to scale

Model judges

Up: Fast and repeatable

Down: Bias and drift require calibration

Exact match

Up: Deterministic

Down: Unsuitable for open-ended tasks

§ 07Implementation checklist
  • Include negative and no-answer cases.
  • Version the eval set alongside the code.
  • Report deltas, not just absolute scores.
  • Spot-check judge decisions every release.
§ 08Configuration reference
KeyTypical valueNote
golden_set50–200 casesCover real traffic patterns.
judge_rubricwrittenCriteria with examples.
gate_thresholddocumentedBlocks regressions.
§ 09Troubleshooting
SymptomCauseFix
Judge disagrees with usersRubric too vagueAdd concrete examples and re-calibrate.
Scores unstableNon-zero sampling in judgePin judge model and temperature.
§ 10Frequently asked questions

How large should a golden set be?

Start with 50 focused cases and grow with real failures. Coverage matters more than size.

Can evaluation replace human review?

No. It catches regressions at scale; humans still define quality and review edge cases.

More in Evaluation & safety