LLM Eval Datasets: Build, Curate, and Maintain Test Data
Published 2026-08-17 · 2,284 words · 9 min read
An LLM evaluation pipeline is only as good as the dataset it runs on. A great benchmark harness on top of a mediocre test set produces measurements that look rigorous and mean nothing — the leaderboard moves when models luck onto well-represented cases and stalls when they confuse on the gaps nobody tested. This guide is about the data layer underneath the eval, the part that most teams underinvest in: how to gather examples, label them, dedup, find hard cases, version-control the whole thing, and run the maintenance loop that keeps the benchmark honest as models, tasks, and your product shift underneath you.
If you are setting up the evaluation harness itself — the runner, scheduler, judge models — read our AI model evaluation guide first. This article assumes you have a running harness and focuses on the dataset that feeds it.
The Five Things Datasets Do That Harnesses Cannot
A benchmark harness scores the model's outputs against a key, but five decisions about quality live inside the dataset itself, not the harness:
- What counts as covered. A model that tests well on 200 generic classification examples and 0 edge cases scored "good" because the dataset never asked the harder question. Coverage is a dataset property.
- What counts as right. Multiple acceptable outputs, partial correctness, and subjective quality all live or die in the answer key. The key is part of the dataset.
- What counts as failure mode. Is a model that hallucinates on 1% of inputs better than one that refuses on 5%? Only your dataset's categorization tells you.
- What counts as adversarial. Bomb prompts, prompt-injection attempts, and ambiguous instruction cases must exist in the set, or running "adversarial eval" is theater.
- What counts as drifted. When product usage shifts from classification to freeform chat, the eval needs to match. Relevance to the deployed task is a dataset decision.
Teams that assume the harness owns these decisions ship benchmarks that pass today and miss real problems tomorrow.
Stage 1: Sourcing — Where Examples Actually Come From
Datasets built from public benchmark dumps (MMLU, GSM8K, HELM slices) have one advantage — they give a comparison to the open literature — and several problems: they are saturated (models train on them), they do not reflect your product's distribution, and they hold static while production traffic drifts. The pragmatic approach uses three sources, weighted:
| Source | Share | Pros | Pitfalls |
|---|---|---|---|
| Public benchmarks | 20-30% | Comparability; free; fast | Contamination; doesn't match product |
| Production traces (sampled) | 50-60% | Real distribution; finds real bugs | PII/legal review; requires labeling |
| Synthetic / curated hard cases | 10-30% | Tests adversarial boundary cases | Can be underpowered; needs care |
The 50-60% share from production traces is the unglamorous secret. Every well-run LLM team has a pipeline: sample one in N production requests, redact PII, route to the labeling queue, and gradually build a test set that actually matches production. The match is the only way to keep the benchmark honest, and it is the single highest-leverage experiment most teams skip.
Stage 2: Annotation and the Key That Admits Multiple Rights
Weak answer keys are the single biggest cause of wrong benchmark conclusions. Three practices make keys robust:
- Multiple acceptable answers per example. The same question ("extract the vendor name from this invoice") may be correctly answered as "ACME LLC", "ACME", "Acme, LLC", or "ACME Limited Liability Company". A single-string-equality key will mark correct responses wrong. Every example should accept a list of acceptable answer variants plus a verifier function (regex match, normalized string compare, fuzzy match, semantic similarity threshold).
- Pass/fail grid for open-ended cases. For long-form cases the key is not a string but a list of pass/fail assertions — checks like "must mention refund policy", "must not include a competitor URL", "must reference the customer's original question". A grader model checks each assertion against the response.
- Confidence tagging for borderline answers. Mark hard-to-judge cases with low confidence so that the head of cases where the judge disagrees — the most informative part of the dataset — is checked by a human reviewer.
This is where the dataset becomes a real engineering asset, not a CSV. Examples with multiple accepting strings and verification functions are heavier to write than simple Q/A pairs, but a thousand simple Q/A pairs produce the same boring measurement every model aces. A thousand annotated-with-verifier cases produce signal that scales with the model.
Stage 3: Dedup, Decontamination, and Hard Cases
Two cleaning steps are non-optional on any dataset that grew from production traces:
- Semantic dedup. Same prompt appearing 18 times in slightly different wording inflates the count of "tested examples" without producing new signal. Dedup uses embedding similarity with a threshold (typically 0.92-0.95 for paraphrase) and keeps one representative per cluster. After dedup, expect to lose 15-40% of the original count — that loss is the silent measure of how redundant the original sampling was.
- Train-set decontamination. Before checking any model, run the eval examples against the training-data release for that model family (when available). Fan-out an embedding search; close matches (similarity > 0.85) are contamination — they should be flagged or removed. Skipping this step is how a new model looks like a 30-point jump on your benchmark and then fails on real traffic.
The hard cases are easier to find than people think. After running the deduped set, sort by disagreement — reveal the examples where multiple judges disagree, where identical prompts got wildly different responses across runs, where the pass rate across model providers is most volatile. The 5% of examples with the highest disagreement is the heart of the dataset; nothing else tells you where models actually break.
Stage 4: Splits That Survive Model Improvement
A single train/eval/test split is a relic for most LLM tasks. A serious eval dataset has five meaningful splits:
- Stable holdout (locked): a fixed set never used for prompt development or model selection. Used only for release-stage regression checks. Locked at version label v1 and never mutated in-place — new versions create new labels.
- Iteration split: used daily by the prompt team to optimize prompts, templates, and few-shot examples. Should NOT overlap with the stable holdout; if it does, the team has contaminated the locked set.
- Regression split: the cases the previous model version failed, refreshed at each release to prevent regressions of fixed bugs. This is the only split that actively keeps engineered fixes."
- Adversarial split: prompt-injection examples, bomb prompts, ambiguous instructions, red-team outputs. Must contain at least N cases per risk category defined by your security review.
- Production-shadow split: a rotating sample of recent production traffic, refreshed weekly, that matches the real distribution you are about to ship against.
The shadow split is the one most teams skip and most miss. A benchmark without it reports measurements that diverge from production because the eval is calibrated on old data, while production keeps moving.
Stage 5: Version Control — Not Just Git, Semantic Versions
A dataset is code. It needs a versioning discipline that intent-labeled releases survive over time:
- Semantic dataset versions. v1.0 → v1.1 (examples added, no removal); v1 → v2 (answer key changes, splits reorganized — old scores NOT comparable); v1.0 → v1.0.1 (typos and label bug fixes). Document every version's change in a CHANGELOG that includes "what scores are comparable to v1.0".
- Per-example provenance. Each example carries: source (public-benchmark: MMLU subset X / production-date-of-trace / synthetic-prompt-XXX), added-in-version, last-reviewed-version. Without provenance you cannot later answer "why are those examples still in our set?"
- Immutable versions in object storage. Snapshot every release as a tarball in object storage with a hash. Even if you regenerate v1.0 from a clean git tree, the snapshot is the authoritative record that everyone re-running the eval actually used.
- Score-and-key append, never overwrite. Never mutate an older version's answers in place to "fix" wrong keys you later discover — that makes historical scores un-reproducible. Instead, release v1.1 with the corrected key plus a CHANGELOG note that v1.0 had a labeling bug affecting N examples.
Teams without dataset versioning can never interpret a model-over-time trend. Today's model beats last quarter's model by 12 points — but the dataset added 400 examples since; what would the old model score on the new dataset? You cannot answer this if the dataset history was overwritten.
Stage 6: Drift Detection and the Maintenance Loop
Production data drifts. A dataset that does not drift with it becomes an anachronism. The maintenance loop has four recurring motions:
- Weekly shadow refresh. Sample N new production traces (post-redaction, post-labeling-pending), evaluate the current production model on them, and compare against the existing shadow split. Movement > benchmark-relevant threshold triggers a shadow-split rotation.
- Monthly disagreement mining. Mine the highest-disagreement examples from the past month's model runs, label, and add to the adversarial or iteration split. The hardest cases from monthly traffic are better than any researcher-invented adversarial prompt, because they are the ones customers actually hit.
- Quarterly decontamination recheck. If a new model with a published training cutoff lands on your radar, re-run decontamination on the entire stable holdout. Contamination status changes as new training sets are released.
- Release-gated regression. Before a model ships to production, regression on all five splits must pass: stable holdout (within X points of last production model's score), regression split (zero regressions on fixed bugs), adversarial split (no new safety failures), and shadow split (within X points of the current production). Without all four, the model does not ship.
Skipping these motions is what produces the silent rot where production model "improvements" stop helping users because the benchmark no longer resembles the work users do. Three years of routine maintenance, not three weeks of heroic launch, is how an eval dataset stays useful.
Benchmark Hygiene and Size — How Big the Dataset Actually Needs to Be
Calibrate size to the question you are asking, not to a vanity round number:
| Use | Recommended size | Reason |
|---|---|---|
| Daily prompt iteration | 50-200 | Fast iteration; per example talks to humans easily |
| Pre-release regression | 300-1000 | Enough statistical power to detect a 2-3 point drop |
| Vendor model selection | 1000-3000 | Statistically meaningful comparison across providers |
| Public claim (e.g. "model X beats Y on Z") | 5000+ with bootstrap CIs | Independence of samples matters more than count |
| Adversarial / safety | 200+ per category | Per-category coverage; not flat rate |
Note that "1000" and "3000" are not magic sizes — the rule of thumb is: enough examples that bootstrap 95% confidence intervals on the headline metrics are tighter than your decision threshold (typically 2-3 percentage points). Plotted larger without bootstrap CIs, the leaderboard number is decoration.
Tooling and the Dataset-as-Code Stack
A serious eval dataset is not a JSON file in a repo — it is an artifact produced by a pipeline. Production-grade dataset-as-code stacks include four components, and skipping any is the reason teams end up maintaining evals by editing CSVs by hand:
- The source. A sampler that pulls one in N production requests, redacts PII via deterministic rules plus a model pass, and lands the cleaned cases into a redacted raw table. Production samplers run continuously, not as one-off dumps; the trust the eval team places in the dataset is bounded by how fresh the sampler is.
- The labeling pipeline. Either a human-in-loop workflow (with a UI to accept, reject, or annotate model-judge suggestions) or a grader-model-judge workflow with confidence gates. Pure human labeling at scale is expensive and slow; pure model-judge labeling is fast but noisy on the borderline cases that matter most. Production stacks combine the two — grader model labels all candidates, humans verify the low-confidence tail.
- The validator. A test that the dataset itself conforms to schema: every example has a non-empty key, every accept-string is non-empty, every verifier function imports without syntax error, and no example appears twice under different ids after dedup. The validator runs in CI on every dataset commit, not just at release time.
- The export publisher. A step that takes the validated dataset, snapshots it to object storage with a hash and a semantic version label, writes to the CHANGELOG, and notifies the eval-runner that a new version is available for the regression pipeline. Without the publisher, "the dataset" is whatever is in git HEAD — every runner is on a different version and your reported scores are unreproducible.
Teams that take this stack seriously can ship a dataset update from raw production trace through labeled, validated, versioned, and regression-tested without a human authoring any individual example. Teams that skip it edit the CSV by hand every quarter and ship benchmarks the company keeps quietly distrusting.
The Dataset Maintenance Checklist
- Mix production-traced, public-benchmark, and curated adversarial sources, with production traces weighted at 50%+
- Label with multi-answer keys plus verifier functions — never single-string equality
- Run semantic dedup; expect to cut the count by 15-40%
- Run decontamination against the training data of every model family you benchmark
- Keep five splits: stable holdout, iteration, regression, adversarial, production-shadow
- Version with semantic labels and a CHANGELOG; document score comparability per release
- Store immutable per-version snapshots in object storage with hashes
- Refresh the production-shadow split weekly; mine disagreement monthly
- Gate every release-to-production on regression across all five splits
- Report bootstrap confidence intervals, never point estimates alone, on public claims
The benchmark dataset is the most underengineered artifact in most LLM stacks. Treat it as code with versioning, contamination, drift monitoring, and a maintenance plan and the rest of the eval pipeline becomes trustworthy — otherwise the harness measures noise at high precision. DrAI's gateway gives you a single OpenAI-compatible endpoint that can sample outputs for the production-shadow split and run regression suites against multiple model families from one client, with per-call latency and token telemetry that feed the drift monitors described above. Start with a free account at sign in, or check pricing for usage-based plans that scale with your evaluation workload.
Start Building with DrAI Today
One OpenAI-compatible API key for GPT-5, Claude Opus 4, DeepSeek, Qwen, Llama and 40+ models — pay-as-you-go with no monthly fees.