Week 5: Pipelines, Experiments, and Continuous Validation · Lesson 5.2

Test set strategy and dataset lifecycle

How do we iterate fast without overfitting our evaluation?

← All lessons
Browse lessons

Free, self-paced. Read the deck with its speaker notes, work the practice from the slides, then take the week's quiz for a certificate.

Slide 1 of 17

Speaker notes

Welcome back. Last lesson you set up the evaluation pipeline: sample, judge, aggregate, store, report, alert, with every run saved alongside its metadata. That pipeline assumes one thing we haven't looked at yet. It assumes the data going into it is worth measuring against. If the test set stops looking like what users actually ask, every run in that warehouse is precise and wrong. And if you've been tuning your judge against the same examples you report on, the numbers are inflated before anything drifts at all. So today is about the data itself. How you split it, how you keep the holdout clean, how you version it, and how you refresh it before it goes stale.

About this lesson

Say a test set passes 78 percent of 200 curated cases, and two weeks after release production quality is at 52 percent. The cases were six months old and mostly simple lookups, while users had moved on to multi-table joins and trend comparisons. Evaluation data goes bad in three ways: it goes stale, it gets contaminated when test examples leak into development, and it loses its version history so no one can reproduce an old result.

The lesson follows a dataset through four stages. At creation you split it into train, dev and holdout, 10, 45 and 45 percent, before any judge or metric work. In development you iterate on train and dev only, and every change, label corrections included, gets a version and a changelog entry. Once the judge settles, dev becomes a locked regression suite that you rotate on a schedule. When it no longer fits production, you retire it into an archive and keep it, because past release decisions cite it.

A large part of the lesson is keeping the holdout independent. Running it after every prompt revision, copying its examples into prompts, or tuning toward what you heard it contains all leak information into development. You predict what happens to a judge’s agreement score when it finally meets the holdout, and see why the dev-set number is too high.

The demo shows how to check whether a suite still matches production, with a Kolmogorov-Smirnov test on query complexity, user role and failure category, and how to decide whether to rotate.

The practice is a Dataset Management Spec for the AI Data Analyst’s regression suite, written on paper: you work out the split sizes, write the version history, set the drift check and what triggers a rotation, and write the holdout rules and retirement criteria.

Go deeper with AI Analytics for Everyone

5-week course: metrics, root cause analysis, experimentation, and storytelling. Think like a Product Data Scientist.

Book 1-on-1 with Shane

30-minute AI evals Q&A. Talk through your specific evaluation challenges and get hands-on guidance.

Finished all 36 lessons? Take the exam and get your free AI Evals certification.

→