# Define quality before you build

> An eval rubric and golden set turn "good output" into pass or fail criteria and labelled cases, written by a domain expert before the product is built.

Code: PM-03 · Pillar: AI Product Management · Updated: 2026-12-03 · Canonical: https://growthalchemylab.com/library/ai-product-management/define-quality-before-you-build

**What you'll produce:** Eval rubric and golden set

## Definition

An eval rubric is a short list of pass or fail criteria, one per failure category, each with a plain definition and examples. A golden set is a collection of real cases labelled against that rubric by a domain expert, with a written reason for each label and a portion held back for release checks. Together they are the team's working definition of quality, and every later change is measured against them.

## TL;DR

- Quality criteria come from reading real outputs. Guessing them in a meeting produces the wrong list.
- Use pass or fail with a written reason. Five-point scales hide disagreement.
- Write one criterion per failure category, and mark which ones block a release.
- Collect failures on purpose. A golden set that is nearly all passes cannot tell you much.
- One domain expert has the final say on labels, and that person is not the builder.

## Why quality has to be written down first

Ask five people on a team whether an AI answer is good and you will get five standards. One checks the facts, one checks the tone, one checks whether it would have saved them time. None of them is wrong, and none of them wrote it down. The product then gets built against whichever standard the builder happens to hold.

Writing the standard early has a second benefit. Once a prototype exists, people start grading it against itself. Outputs that would have been rejected on day one look acceptable by week six because everyone has seen worse. A rubric and a golden set agreed before the build are a fixed point.

There is a catch. Useful criteria rarely come from a whiteboard. Hamel Husain calls error analysis the most important activity in evals because it decides which evals are worth writing: you read real outputs, note what is wrong, and let the categories come from the notes. Generic measures chosen in advance tend to miss the failures that are specific to your product. So "before you build" means before the product, not before any output. Run a throwaway baseline, read what it produces, and define quality from that.

## The two artifacts

**The rubric** is a table. Each row is one criterion.

| Column | What it holds |
| --- | --- |
| Criterion | A short name, such as "states only what the record shows" |
| Pass definition | One sentence an operator would agree with |
| Examples | One output that passes and one that fails |
| Type | Blocker (any failure stops release) or target (we aim to improve it) |
| Checked by | Code, a person, or a model judge that has been compared with a person |

Keep each criterion to one idea. Eugene Yan warns against a single evaluator that tries to judge many dimensions at once: it is hard to calibrate, and when the score moves nobody can tell which dimension moved. He also separates guardrail measures, where a miss blocks shipping, from the measures a team keeps trying to raise. The Type column records that split.

**The golden set** is a table of cases. Each row has a case identifier, the input, the source material, the expected outcome, a pass or fail label per criterion, a one-line reason, a tag for the kind of case, and whether it sits in the working set or the holdout.

The reason column is worth its cost. Hamel Husain's judge-building guide asks the expert for a pass or fail decision plus a written critique, because being made to explain a label brings out expectations the expert had not yet put into words. Those reasons later become the best material for instructing a model judge, and for briefing a new reviewer.

## The playbook

**Get outputs in front of the expert.** Sample real inputs across the range the product will see. Run the plainest baseline that produces an answer. If the workflow is manual today, the existing human answers work too.

**Read before you categorise.** The expert reads at least 30 pairs and writes a free note on each. Note the first thing that goes wrong, since an early error often causes the later ones.

**Group, count, and name.** Cluster the notes into failure categories and count them. The counts tell you where to spend effort. A model can do the clustering, and the expert does the naming.

**Write one binary criterion per category.** Add a blocker criterion for each never-rule in the spec, even if the baseline never broke it.

**Label, and go looking for failures.** A set with 95 passes and 5 fails cannot show whether a change made failures rarer or whether a judge can catch them. Eugene Yan's guidance for aligning automated evaluators is at least 50 to 100 failing cases in a set of 200 or more, and he prefers failures that occur naturally, for instance from a weaker model, over defects written to order, which tend not to resemble production. Our own minimum is one case of each kind from the spec: a clear pass, a close-but-wrong answer, a missing-source refusal, a risky action that needs a person, and a correct answer with weak evidence.

**Test the rubric with a second reader.** Have a second person label a sample without seeing the first labels. Each disagreement points to a rubric line that is unclear. Fix the wording, relabel the affected cases, and let the lead expert settle what remains.

**Split and freeze.** Hold back a portion the builder never tunes against. Version the rubric and the set together.

## A worked example

This example is fictional. Northgate Supply, an invented parts distributor, is building a drafting assistant for order-status emails. The senior customer service agent is the domain expert.

She reads 40 baseline drafts and writes notes. Grouped, they give six categories. The rubric that results:

| Criterion | Type | Checked by |
| --- | --- | --- |
| States only what the order record and carrier feed show | Blocker | Person, later a judge |
| Gives no delivery date the carrier has not given | Blocker | Code plus person |
| Offers no refund, credit, or address change | Blocker | Code |
| Reports every parcel in a split shipment | Target | Person |
| Hands off when tracking is missing or stale | Target | Code |
| Answers the question the customer asked | Target | Person |

The first draft of the rubric had a criterion called "professional tone". The second reader and the expert disagreed on a third of the cases, so it was rewritten as "no apology for delays the record does not show", which both could apply.

The golden set ends at 160 cases: 45 from the spec, 75 more from history, and 40 picked because they were likely to fail, such as split shipments and orders placed within the last hour. Sixty-two cases fail at least one criterion. Forty cases form the holdout.

## Common failure modes

- **Criteria written before reading anything.** The list looks reasonable and misses what the system gets wrong in practice.
- **Numeric scales.** They feel precise and produce labels nobody can reproduce.
- **A golden set of successes.** If nearly every case passes, the set cannot detect regression.
- **The builder as labeller.** The person tuning the system should not own the standard it is judged by.
- **No reasons recorded.** Labels without reasons cannot be audited or taught.
- **A judge trusted without comparison.** Chip Huyen lists dropping human evaluation in favour of model judges as a common pitfall. A judge is itself a model product and needs checking against people over time.
- **A frozen rubric.** Real use surfaces new failure categories. Reganti and Badam note that evals built on an expected dataset will miss things once users arrive. Version the rubric and expect to revise it.

## How it connects to the other pillars

The rubric and golden set grow out of the acceptance cases in the AI product spec, and they supply the measurements that review gates and release decisions rely on.

In AI development, they are the content of the eval harness. Engineering builds the runner and the gate in the pipeline. Product owns what the runner checks.

In the factory pillar, the blocker criteria become rungs on the verification ladder. An agent's work is not accepted because it reports success. It is accepted because the cases pass.

## Run it yourself

Time: ~1 day of expert time across a week

1. **Produce outputs to read** — You need: 50 to 100 real inputs and the simplest possible baseline, such as one plain prompt or the current manual answers. You get: A sheet of input and output pairs with the source material beside each. This is a throwaway run. Its only job is to give the expert something concrete to judge.
2. **Read and take notes** — You need: The domain expert and at least 30 of the pairs. You get: An open note on each one, recording the first thing that is wrong or that it is fine. Do not start from a list of categories. Write what you see.
3. **Group the notes into failure categories** — You need: The notes from the previous step. You get: Five to ten named failure categories with a count for each.
4. **Write the rubric** — You need: The failure categories and the never-rules from the spec. You get: One pass or fail criterion per category, each with a definition, one passing example, one failing example, and a type: blocker or target.
5. **Label the golden set** — You need: The rubric, the remaining pairs, and extra cases chosen to add failures. You get: Cases labelled pass or fail per criterion with a one-line reason, tagged by case kind. Keep reading until new cases stop producing new failure categories.
6. **Test the rubric on a second reader** — You need: A second person and 20 to 30 cases they label without seeing the first labels. You get: A list of disagreements, each traced to a rubric line, and a revised rubric.
7. **Split and freeze** — You need: The labelled set. You get: A working set, a holdout set the builder does not see, and a version number on both.

## Do it with AI

```text
You are helping me define quality for an AI feature by building an eval rubric and a golden set. You assist. A named domain expert makes every final label.

Feature and decision: [ONE SENTENCE FROM THE SPEC]
Never-rules from the spec: [LIST]
Domain expert: [NAME AND ROLE]
Data: [PASTE 30 OR MORE INPUT AND OUTPUT PAIRS, WITH THE SOURCE MATERIAL FOR EACH]

Step 1. Do not propose criteria yet. Show me the pairs one at a time. For each, ask the expert for a free-text note on the first thing wrong with the output, or "fine". Record the notes exactly.

Step 2. After 30 notes, group them into failure categories. Show each category with its count and three example notes. Ask the expert to rename, merge, or split categories.

Step 3. Draft a rubric as a table: criterion name; pass definition in one sentence; one passing example; one failing example; type (blocker if any failure stops a release, target if we aim to improve it); how it is checked (code, human, or model judge). One criterion per category. Add one blocker criterion for each never-rule. Use pass or fail only, never a numeric scale.

Step 4. Apply the rubric to every pair and show me your proposed label and a one-line reason. The expert accepts or corrects each one. Keep a list of the cases where the expert disagreed with you and what rubric wording would have prevented it.

Step 5. Report the counts of pass and fail per criterion. For every criterion with fewer than ten failing cases, tell me what kind of input would be likely to produce a failure so I can go and find real ones.

Step 6. Output the final rubric table, the labelled cases as a table (case id, kind, labels per criterion, reason), and a proposed split into working and holdout sets.

```

## Chain it

1. **Baseline runner** — Runs a plain prompt over sampled real inputs and lays out input, output, and source side by side; 50 to 100 real inputs from the workflow → A review sheet ready for the expert
2. **Note clusterer** — Groups the expert's free-text notes into candidate failure categories and counts them; The expert's notes on at least 30 outputs → A draft failure list with counts and examples; gate: The domain expert names and approves the categories
3. **First-pass labeller** — Applies the rubric to the remaining cases and writes a one-line reason for each label; The approved rubric and the unlabelled cases → Proposed labels and a queue of low-confidence cases; gate: The domain expert accepts or corrects every label in the holdout and a sample of the rest
4. **Failure finder** — Searches logs and history for inputs likely to trigger each failure category; The rubric and read access to historical cases → Extra candidate cases for categories that are short of failures
5. **Agreement checker** — Compares two people's labels, lists the disagreements, and suggests rubric wording that would settle each; Two independent sets of labels on the same cases → A disagreement report and proposed rubric edits; gate: The domain expert decides each disputed case and signs the rubric version

## How AI changes this

### Automate

- Running the baseline and laying out outputs for review
- Clustering free-text notes into candidate failure categories
- Proposing first-pass labels with reasons for a person to correct
- Searching history for cases likely to fail a given criterion
- Comparing labels between readers and listing disagreements

### Keep human

- Reading the first 30 outputs and writing the notes
- Naming the failure categories and deciding which are blockers
- Labelling the holdout set
- Settling disagreements between readers
- Approving each new version of the rubric

## Stage

- Entry: A spec with a named decision and owner, and access to real inputs for the workflow.
- Exit: A versioned rubric and a labelled golden set with a frozen holdout, both approved by the domain expert who owns the labels.

## FAQ

### How can we define quality before there is a product?

Before the product, not before any output. Run the simplest baseline you can over real inputs, or use the current manual answers, and judge those. The point is to settle what good means before design choices and sunk cost start to shape the answer.

### Why pass or fail and not a score from 1 to 5?

Two readers rarely agree on where a 3 ends and a 4 begins, and a model judge does no better. A pass or fail decision forces the expert to say what matters, and a short written reason carries the nuance. Practitioners who publish on this, including Hamel Husain and Eugene Yan, recommend binary labels for the same reason.

### How many cases does a golden set need?

For finding failure categories, start with about 30 and continue until new cases stop showing new problems. For checking an automated judge, published guidance is larger. Eugene Yan suggests at least 50 to 100 failing cases in a set of 200 or more. Treat both as heuristics and scale with risk.

### Who should label?

One domain expert who understands the users, with final say. Add a second reader to test the rubric, not to vote. If a single case seems to need several specialists to judge, the product scope is probably too wide.

### Can a model do the labelling?

It can propose labels and group notes. It should not own the standard. An automated judge is only trusted after its labels have been compared with the expert's on cases it has not seen, and that comparison is repeated as the product changes.

## Sources

- [Eval design before agent design](https://growthalchemylab.com/blog/eval-design-before-agent-design) — Growth Alchemy Lab, accessed 2026-12-03
- [Product Evals in Three Simple Steps](https://eugeneyan.com/writing/product-evals) — Eugene Yan, accessed 2026-12-03
- [Why is "error analysis" so important in AI evals, and how is it performed?](https://hamel.dev/blog/posts/evals-faq/why-is-error-analysis-so-important-in-llm-evals-and-how-is-it-performed.html) — Hamel Husain, accessed 2026-12-03
- [Using LLM-as-a-Judge For Evaluation: A Complete Guide](https://hamel.dev/blog/posts/llm-judge/index.html) — Hamel Husain, accessed 2026-12-03
- [How many people should annotate my LLM outputs?](https://hamel.dev/blog/posts/evals-faq/how-many-people-should-annotate-my-llm-outputs.html) — Hamel Husain, accessed 2026-12-03
- [Common pitfalls when building generative AI applications](https://huyenchip.com/2025/01/16/ai-engineering-pitfalls.html) — Chip Huyen, accessed 2026-12-03
- [Why your AI product needs a different development lifecycle](https://www.lennysnewsletter.com/p/why-your-ai-product-needs-a-different) — Lenny's Newsletter, accessed 2026-12-03

## Related

- [Write the AI product spec](https://growthalchemylab.com/library/ai-product-management/write-the-ai-product-spec)
- [Build the eval harness](https://growthalchemylab.com/library/ai-development/build-the-eval-harness)
- [Build the verification ladder](https://growthalchemylab.com/library/factory/build-the-verification-ladder)
