Building a golden dataset for RAG eval from scratch: walk through the steps and name the mistake that wastes the most labeling budget.
Building a golden dataset for RAG eval from scratch: walk through the steps and name the mistake that wastes the most labeling budget.
Sample queries, retrieve passages, expert-label with IAA, stratify, and freeze. Skipping IAA wastes the most budget because inconsistent labels invalidate downstream metrics.
Imagine building a math answer key for a school test. You write the test questions, solve each one, then hand the answer key to a second teacher to check. If you skip the second teacher and find out later that half your answers were graded on a different rubric, you have to redo the whole thing. The same happens with a golden dataset: if annotators disagree on what counts as a good answer and you only find out after labeling hundreds of examples, you throw away half your work. The fix is cheap: have two people label a small batch first, compare, and agree on the rules before scaling up.
Detailed answer & concept explanation~5 min readEverything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
Walk the five steps in order: query sampling, retrieval execution, expert labeling with passage attribution, IAA with a kappa target, stratification and freezing. Name skipping IAA as the costliest mistake and explain the rework math. Cover passage-level attribution for decomposed metrics like Ragas. Close with versioning discipline and quarterly refresh cadence.
Real products, models, and research that use this idea.
- Ragas, the open-source RAG evaluation framework, decomposes golden-set evaluation into context relevance, faithfulness, and answer correctness, all of which require passage-level attribution in the golden set.
- Anthropic's model evaluations use human-labeled preference datasets with multi-annotator overlap and adjudication to maintain label quality across thousands of examples.
- Google DeepMind's Gemini evaluation suites version their golden sets per release and track lineage so score comparisons across model generations are valid.
- Industry MLOps platforms like Weights and Biases and LangSmith provide golden-set versioning and diff tools so teams can audit what changed between evaluation runs.
What an interviewer would ask next. Try answering before peeking at the approach.
QYour golden set has 200 examples but your RAG pipeline serves 50 different query types. How do you decide which types to over-sample and which to under-sample?
QYour annotators achieve kappa 0.85 on factoid queries but only 0.55 on multi-hop reasoning queries. What do you do?
Don't say thisRed flags and common mistakes that signal junior thinking. Click to expand.
Red flags and common mistakes that signal junior thinking. Click to expand.
Skipping inter-annotator agreement and discovering after hundreds of labels that annotators used different rubric interpretations, making half the labels unusable.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.
Same topic, related formats. Practice these next.