Atlas expedition

Golden Dataset Construction: Building the Eval Set That Vibes Can't Replace

How to build, label, size, and maintain a golden dataset — the curated ground-truth set that turns LLM evals from vibes into measurable signal.

37 sources ~7 min read #206 llm-evals · golden-dataset · evaluation · data-annotation · ai-quality

TL;DR — A golden dataset is a curated, human-labeled set of input/expected-output pairs that serves as ground truth for grading an LLM system [2]. Build it in this order: (1) mine real failures via error analysis instead of grabbing generic metrics [4]; (2) seed ~20 cases by hand, then grow from production traces and synthetic generation [7]; (3) label with one domain-expert “benevolent dictator,” validate every LLM-suggested label, and measure inter-annotator agreement [7][13]; (4) size for statistical power (~250 for a ±5% margin, not 20) [19]; (5) version it, hold out a split, and refresh continuously so you don’t overfit your own test [1][3]. If your eval can’t catch a regression or justify a launch in one slide, you’re still grading vibes [5].

Why a golden set, and why “vibes don’t scale”

A golden dataset (a.k.a. golden set / evaluation set) is a high-quality, hand-labeled collection of test cases that acts as the ground truth for assessing an LLM system, typically curated by subject-matter experts and covering both common patterns and tricky edge cases [1][2]. It is the curated reference material itself — distinct from a benchmark (the metric derived from it) and from the held-out test split used for scoring.

Manual spot-checking fails on two axes:

  • It doesn’t scale. You cannot read every query and inspect every response across thousands of traces. Cases should flow from systematic error analysis on real production traces, which surfaces failure modes unique to your application rather than the generic metrics platforms nudge you toward [4].
  • It doesn’t build consensus. Without a shared reference set, quality debates “stretch for weeks” because teams “argue feelings, not facts” [3]. A golden set converts opinion into measurable comparison against known answers, so regressions surface immediately — the fix for vibes is “a golden set, a rubric, and some statistics” [5].

Where the examples come from

Treat the golden set as a living artifact: start with a focused, representative set covering core use cases and known edge cases, then continuously feed validated production traces back in [11]. Four complementary sources, in rough priority:

Source How Notes
Production traces Sample interesting/failing runs; promote to dataset Highest fidelity. Some platforms turn traces + reported failures into regression tests in one click [12]
Error-driven sampling Review ≥100 traces until ~20 new ones yield no new failure category (“saturation”) Highest-ROI activity; a few issues drive most failures [4]
Synthetic generation Define dimensions (Features × Scenarios × Personas), write ~20 tuples by hand, scale via two LLM steps (tuples → natural-language queries) Generate inputs not outputs; ground in real IDs/business rules to avoid model bias [6][7]
Expert curation A domain expert hand-writes/validates canonical cases Questions should mirror real customer queries, be self-contained, and never ship an unvalidated LLM answer as ground truth [22]

Synthetic isn’t a second-class citizen: in a 2025 study, generated test cases were as effective as hand-crafted data for refining criteria, and 83% of 24 participants preferred generation over manual creation [10]. Guidance is consistently process-based — start focused, grow ~100 fresh traces per 2–4 week cycle — rather than a fixed target count [11].

Labeling the ground truth

Labels are fundamentally a human process that LLMs assist but don’t replace.

  • Appoint a “benevolent dictator.” A single domain expert (psychologist, lawyer, support lead) making the quality calls eliminates annotation conflict and decision paralysis [7].
  • Prefer binary pass/fail over Likert scales — it forces clearer thinking and more consistent labels, and targets errors you actually observed, not imagined ones [4].
  • When multiple annotators are unavoidable, run the loop: draft a rubric → label a shared set independently → measure agreement → reconcile in alignment sessions → refine the rubric. Use chance-corrected metrics — Cohen’s kappa (two raters), Fleiss’ kappa (more than two), or ICC [13]. Read kappa as 0.6–0.8 = substantial, >0.8 = almost perfect [14].
  • Expect “criteria drift.” You need criteria to grade outputs, but grading outputs is what reveals the criteria — so a-priori rubrics go misaligned. EvalGen operationalizes this: have humans grade a subset (a random max of 16 outputs per cycle), then select judge implementations aligned to those grades [8][9].

LLM-as-judge can scale labeling, but inherits biases — so for ground-truth labels, hand-validate every suggestion:

Bias Effect
Self-preference / perplexity Scores lower-perplexity (more familiar) text higher than humans do [15]
Verbosity Longer answers score higher regardless of quality [16]
Position The option shown first is favored [16]
Expertise gap Aligns more with lay-user preference than SME standards [16]

What makes a dataset actually “good”

Coverage & diversity. Use stratified sampling — group traces by user type, feature, and query category, then sample each group — and keep questions representative of real production distribution, not synthetic-only Q&A [22]. Surface edge/adversarial cases through error analysis to saturation [4].

Size for statistical power. A starter set of 100 is fine for triage, but “20 examples” can’t move a launch decision:

Goal Samples needed
Quick starter / smoke test 100 QA pairs (150 for larger domains) [17]
95% confidence, ±5% margin (on an 80% metric) ~246 [19]
95% confidence, ±2.5% margin ~984 [19]
Below “a few hundred” CLT intervals badly underestimate uncertainty → use Wilson intervals, clustered SEs, or Bayesian [18]

CI width scales as ~1/√n, so the jump from ±5% to ±2.5% costs 4× the data [19].

Avoid contamination. If training data overlaps the eval set, memorization inflates scores and high numbers reflect overfitting, not capability — and standard decontamination is leaky [23]. No semantic-preserving edit achieves both high fidelity and high resistance to contamination at once: LLM-generated variants hit >0.95 resistance but drop fidelity to 0.66–0.75 [21]. The cleanest defense is constructing items from knowledge absent from training sets, as AntiLeakBench does automatically [20].

Tooling

The 2026 pattern pairs a lightweight CI/CD eval framework (gating) with a platform for annotation, regression tracking, and dashboards [25].

Tool ⭐ Stars Type Best for golden-set work
Label Studio ⭐ 28k OSS General-purpose human labeling workhorse [33]
Promptfoo ⭐ 22k OSS CLI-first; test cases as YAML config-as-code in the repo [28]
OpenAI Evals ⭐ 19k OSS Templated registry teams extend with custom sets [34]
DeepEval ⭐ 16k OSS Fullest dataset lifecycle (curate/version/manage); pytest + 50+ metrics [26][27]
Ragas ⭐ 14k OSS RAG focus; built-in synthetic test-data generation to bootstrap [29]
Arize Phoenix ⭐ 10k OSS OTel-native tracing; feeds production traces into curation [35]
Argilla ⭐ 5.0k OSS Collaborative annotation + LLM-assisted labeling (distilabel/ArgillaLabeller) [31][32]
Inspect AI ⭐ 2.2k OSS UK AISI primitives: dataset → Task → Solver → Scorer; sandboxed agents [30]
Braintrust Commercial Most complete single platform; “Loop” agent auto-generates eval datasets, one-click trace→regression [24][12]

Maintenance: don’t let your golden set rot — or teach to the test

A golden set is a lifecycle, not a one-time build.

  • Version everything together. Track every schema and label change; version prompts, datasets, and graders with a changelog so a rubric change never “masquerades as a model win” by silently shifting historical baselines [3].
  • Refresh small and often. Favor frequent small updates over rare giant refreshes; re-run error analysis on any significant change (new features, prompt/model swaps, bug fixes), reviewing 100+ fresh traces per cycle and 10–20 weekly between cycles [3][7].
  • Watch for dataset drift. Static offline datasets quickly go stale as production distribution shifts; the eval set must move with user behavior [37].
  • Don’t overfit your own test. When the same set drives every iteration, you Goodhart it — “when a measure becomes a target, it ceases to be a good measure.” On LMArena, selective disclosure boosted a model’s score by up to 112% [36]. Defend by partitioning data and measuring how well your judge generalizes to held-out unfamiliar data [1].
  • Distrust suspiciously high scores. A ~70% pass rate often signals a more meaningful, stress-testing eval than a near-perfect one tuned to look good [7].

Anti-patterns checklist: too small / single-run results [37]; not representative of production [22]; stale / never refreshed [37]; judge misaligned to human labels [9]; and gaming the metric instead of the goal [36].

Citations · 37 sources

Click the Citations tab to load…