Topic 1 of 5 · 5 min read
Curating a golden reference set
Goal: Select golden cases from real usage so that features, user types and difficulty levels are all covered.
A golden set is a small, hand-checked collection of real inputs, each with an answer or criteria a domain expert has approved, and it is the ruler every prompt or model change gets measured against.
Check yourself · 1 of 3
Where should most golden-set inputs come from?
Why it matters
Without a golden set, "the new prompt feels better" is the whole test. With one, you can say that 41 of 50 cases pass now and 44 of 50 passed before. The set is only useful if it looks like what users really send. Cases written at your desk are tidier, shorter and friendlier than real traffic.
How to build one
- Start from real usage. Pull inputs from production logs, support tickets, the beta, or the tickets the feature replaced. Remove personal data first. If there is no traffic yet, ask three people who will use the feature to hand you real examples from their last week.
- List the dimensions before you pick cases. For a support-reply assistant: feature (refund, shipping, account), user type (new customer, angry repeat customer, business buyer) and difficulty (clear, ambiguous, needs a policy lookup). Pick cases so every cell you care about has at least a few.
- Have an expert approve each answer or criteria list. An engineer guessing at the right refund policy is not an expert. One reviewer is fine at first; for disputed cases, record the disagreement instead of hiding it.
- Record provenance. Every case gets a
source(ticket 4821, March log sample, red-team session), a date and an owner. Provenance tells you later why a case exists and whether it can be deleted. - Keep it small enough to review. Start at 30 to 100 cases you have actually read. Volume comes later, and Anthropic's own guidance favours many automatable cases over a few perfect ones once grading is automated.
Before and after
Weak: 40 cases, all written by the developer, 35 of them "Where is my order?" variants, no source column, answers produced by running the current model and pasting the output.
Fixed: 60 cases sampled from last month's tickets, balanced across the three features and three user types, the hard cases deliberately over-represented, each with a source id and an answer approved by a support lead.
{
"id": "refund-014",
"input": "I was charged twice for order 8812 and nobody answers",
"feature": "refund",
"userType": "angry-repeat",
"difficulty": "hard",
"source": "ticket-4821",
"approvedBy": "support-lead"
}
What goes wrong
- The set mirrors the happy path. A real mix includes the awkward 10 percent that produces most complaints.
- Answers come from the model under test. Then you are measuring agreement with itself.
- No coverage map. You cannot say what the set does not test, so a 95 percent pass rate means little.
Examples
Coverage table for a support assistant
Rows are features, columns are user types, cells are case counts.
| Feature | New customer | Angry repeat | Business buyer |
|---|---|---|---|
| Refund | 6 | 8 | 4 |
| Shipping | 6 | 5 | 3 |
| Account | 4 | 3 | 0 |
The zero in the last cell is the finding: business buyers asking about accounts are untested, so a pass rate says nothing about them.
Where the cases came from
A team had no traffic, so they asked the five support agents to paste the three hardest messages each handled last month. They got 15 real, messy cases with the agent's own reply as the draft answer, then had the support lead approve or correct each one.
Key points
- A golden set is built from real inputs, not from cases the developer invents at a desk.
- Decide the dimensions (feature, user type, difficulty) first, then pick cases so each cell is covered.
- A domain expert approves each reference answer or criteria list; the model under test never writes its own key.
- Record the source, date and owner of every case so you can later tell why it exists.
- Start small enough that a human has read every case, and grow it as grading gets automated.
Common mistakes
- Filling the set with variants of one common question because they are easy to write.
- Generating the expected outputs by running the model being evaluated.
- Leaving out the source and approver, so nobody can tell later which cases are trustworthy.
- Treating the first 20 cases as finished instead of adding to the set as new failure types appear.
Check yourself · 2 of 3
Why record a source for each golden case?
Check yourself · 3 of 3
A golden set has 50 cases, 46 of them about shipping and 4 about refunds. What is the main problem?
Practice items, not counted towards your mastery.
Start here
- Develop test cases (Claude docs) (opens in a new tab)DocsFree
Anthropic's guidance on eval design: realistic task cases, edge cases, automated grading and volume over polish.
- promptfoo: Test case datasets (opens in a new tab)DocsFree
How to load test cases from CSV, JSON, spreadsheets and generated files into a runnable eval.
- Evaluation best practices (OpenAI) (opens in a new tab)DocsFree
Covers building datasets from production data, edge cases and continuous evaluation.