Golden dataset for LLM testing: how to build one

In AI, a golden dataset is a fixed set of test cases that people have checked by hand, used to test a model or product before every change. It is not the Power BI term of the same name. This guide shows how to build one from real usage, how to keep it honest, and where eval-driven development fits.

Willem van der MadenCo-founder · Researcher at the IT University of Copenhagen

6 min read Guides

Summarise with AIChatGPTClaudeGemini

What a golden dataset is, and why invented examples mislead

A golden dataset is a curated set of test inputs, usually paired with a reviewed description of what a correct response looks like. The word "golden" means trusted: someone who knows the subject has checked each case. You run your product against the same set before every meaningful change, so two runs can be compared.

The term is informal and has no standard definition, so a vendor may mean something slightly different by it. In Power BI, "golden dataset" is an informal name for one shared master data model that many reports build on. That is a different thing and has nothing to do with testing.

The quick way to fill a test set is to write the examples yourself, or ask a model to write them. Both give you cases that look like what you expect. Real users ask in other words, leave out context, mix topics and make typos. A set made from your own imagination can score well and still say nothing about what happens when someone uses the product.

One published guide to golden datasets puts it in one line: real traffic beats invented examples, so start there. Generated cases still have a place as a supplement, but only after a person has reviewed them.

Where the rows come from

Build the set from what has already happened. The best sources are the ones with a real person behind them.

Sources for rows, from strongest to weakest
SourceWhy it helpsWatch out for
Real user answers to short questions asked in the productA person said whether this answer helped, in their own wordsOnly users who answer are heard
Real usage logsThe inputs people actually sendNo verdict until someone labels them
Support tickets and complaintsThe cases that already went wrongSkews towards failures
Cases written by the teamCover edge cases you know aboutReflect your expectations, not your users
Model-generated cases, reviewed by a personFast way to widen coverageUnreviewed ones weaken the trust the name promises

Anthropic's documentation on building evaluations advises that tests mirror your real task distribution and include edge cases, such as irrelevant or missing input, overly long input and ambiguous cases where even humans would struggle to agree. Keep those cases in the set on purpose.

How big should a golden dataset be?

There is no number that fits every product, and we will not invent one. The same guide ties size to purpose: a handful of cases to look into one issue, far more to gate a larger change. Its rule of thumb is a set large enough to cover your failure modes and small enough that you actually run it.

Decide it with three questions.

  • Does every criterion you wrote have enough cases that one odd row cannot flip its result?
  • Does every kind of user and every kind of input you serve appear at least a few times?
  • Can you run the whole set as often as you change the product?

Start small and let it grow. A small set you trust beats a large one you do not.

How to label the cases

Write the criterion first, then label each row against it. For each case record the input, what a good answer must contain or avoid, and the label: met or not met. Keep the reasoning for the label in a short note, so the next person can see why.

Let two people label the same rows. Where they disagree, do not average and move on. A disagreement means the criterion is unclear, or the case is genuinely hard. Both are worth knowing. Those rows are often the most valuable in the set, because they show where your own definition of good has holes. Rewrite the criterion, then relabel.

How to keep it: versions, new rows and a held-out part

A golden dataset is a record, not a one-off file. Version it, so every run says which version it used. Without that, two scores cannot be compared. Add a row whenever a real failure turns up that the set did not catch, and note the date and the reason.

Split the set in two. Use one part to tune your prompts, your judge and your fixes. Keep the other part held out and look at it only to check the result. If you change the product until the held-out rows pass, they are no longer a test. Never tune on the test rows.

Tie the set to your criteria and their pass marks. Each criterion keeps its cases, its latest score and the change that moved it. That record is what lets you say, later, why something got better or worse. When a judge model does the scoring, the human labels in this set are what you check it against.

Where eval-driven development fits

Eval-driven development means writing the evals for an LLM feature before or alongside the feature itself, then using the results to decide what to change next. It borrows the order of test-driven development: measure first, build against it. One glossary describes it as emerging vocabulary rather than settled terminology, so define it in your own documents.

It is also contested. Hamel Husain and Shreya Shankar answer "generally no" to whether you should practise it, because the failures of a language model are hard to predict. They recommend starting from error analysis of what actually happens, and allow the approach for a clear, specific constraint such as "never mention competitors".

A workable middle: write the checks first where you know exactly what success looks like, and grow the rest of the set from real usage after launch.

Common mistakes with golden datasets

  • Letting a model write both the cases and the expected answers, with nobody checking them.
  • Tuning the product against the same rows you report the score on.
  • Looking only at the average. A small change in the total can hide big changes in single rows that cancel out. Read those rows.
  • Never adding rows, so the set drifts away from how people use the product today.
  • Dropping the hard or disputed rows because they make the score look worse.

If you want the wider picture of how this set feeds the rest of your checks, read the guide to LLM evaluation. The loop around it is laid out in the AI evals guide.

What a golden dataset cannot tell you

A golden dataset is a snapshot of the cases you have seen. It cannot warn you about inputs nobody has sent yet, and a high score on it is not proof that users are well served. It is only as good as its labels, and it ages as your product and your users change. Keep asking real users, and keep adding what they teach you.

← All posts

Want to see Eva on your own product?

Apply for accessTalk to a founder