Overview

A golden set (also called an eval set or eval dataset) is a fixed collection of inputs paired with verified correct outputs or grading criteria. It does for an LLM feature what a test suite does for code: it shows whether a new prompt, model, or retrieval setting is better or worse.

The expected outputs are the ground truth: answers verified by domain experts, authoritative sources, or formal checks such as unit tests and SQL results. Every metric (accuracy, F1, faithfulness) is bounded by the quality of that ground truth, and a wrong label makes a correct system look broken.

Build the set before changing prompts, models, or retrieval. Draw cases from real production inputs and past failures, cover each category and edge case, and keep the set out of few-shot examples and training data. Version it with the code and refresh it when the domain changes. Keep it small enough that people can re-grade it when the rubric changes. For RAG, store the expected answer and the expected source chunks so retrieval and generation are scored separately. Treat a failing run as a release blocker, and run it through an evaluation-harness.