NewProject Coding is here — build features and fix bugs in real codebases with an AI assistantSee what's new
Advanced
Building Evaluation Datasets
40 min readChapter 3Core
1Building eval datasetsChapter 1

HelpDesk Assistant answers support questions and, in agent mode, issues refunds. The interview follow-up: "You have no labeled data. Where do your test cases come from, and how many do you need?" The answer is an eval dataset: a fixed, versioned set of inputs (plus labels where needed) that every version of the feature runs against. You draw cases from traffic and known failures, fill gaps with synthetic cases built from explicit dimensions, label them under a guideline two people agree on, size it per failure mode, and hold some cases out so scores stay honest.

Build one when you'll measure quality repeatedly: before a launch, after error analysis names failure modes to track, or whenever a prompt or model change must be compared with the last version. Skip it for a one-off prototype, where reading 20 to 30 outputs yourself tells you more, and for a deterministic rule such as "the reply is valid JSON", where a unit test with a few fixed inputs is enough.

This usually comes up as two or three short follow-ups, not a full round. A mid-level answer names the sources, describes dimension-based generation, and gives a size with a reason. A senior answer sizes each failure mode from a margin of error, measures labeler agreement with Cohen's kappa, and keeps a held-out split so that tuning against the test cases does not inflate the score. The chapters follow the order in which the set gets built. Retrieval relevance labels belong to the course's retrieval-augmented generation (RAG) section.

Your progressLogin to save progress
Spot an issue or have a suggestion?
LLM-as-Judge: Building a Judge You Can Trust  |

Discussion

Log in to join the discussion.