# How to Build a Golden Dataset for AI Evals (and Edit goldens.csv in the Free Lab)

> Build a golden dataset for LLM and RAG evals: how many questions, which types to include, why unanswerable ones matter, and editing goldens.csv in a free lab.

Page: https://datautility.in/blog/how-to-build-golden-dataset-ai-evals
This is the Markdown copy of the page. The tool itself runs in the browser: your files are processed on your own device and are not uploaded.

Published 2026-11-28 · Analyze & protect · golden dataset, golden dataset llm evaluation, rag evaluation dataset, how many test cases for llm eval, unanswerable questions rag, goldens csv deepeval, ai evals

Short answer: a golden dataset is a list of questions with the answer you expect, and it is the most important part of an eval. Start with 50 to 100 questions for one feature, include questions your documents cannot answer, and write short expected answers. In the free Evals Lab it is a plain file, `goldens.csv`, that you can edit in the Python IDE.

Open the tool: [Evals Lab](https://datautility.in/ai-evals-lab)

## Why people struggle with this

On Reddit, the same questions keep coming up in r/Rag: [How do you build a solid gold dataset for evaluating a RAG system?](https://www.reddit.com/r/Rag/comments/1sfqscb/how_do_you_build_a_solid_gold_dataset_for/), [How do you create reliable evaluation datasets for LLM applications?](https://www.reddit.com/r/Rag/comments/1wdlgu1/how_do_you_create_reliable_evaluation_datasets/) and [A golden dataset is necessary for production RAG, correct?](https://www.reddit.com/r/Rag/comments/1vn4sp0/a_golden_dataset_is_necessary_for_production_rag/). The honest answer is that no research gives one magic number. Practitioner guides ([Barking Iguana](https://barkingiguana.com/writing/building-a-golden-dataset-for-llm-evaluation/), [QASkills](https://qaskills.sh/blog/golden-dataset-llm-evaluation-guide)) agree on one thing: coverage matters more than size.

## How many questions

Start small. A common starting point is 50 to 100 well-chosen questions for one feature. These are practitioner heuristics, not a standard. Twenty questions are enough to learn the method in the lab; you will need more to see small differences between two versions of your app. Add a new question every time a real user finds a failure.

## Which questions to include

| Type | Example | What it catches |
|---|---|---|
| Direct fact | "What is the refund window?" | Basic retrieval and answering |
| Several facts | "When is support open, and how fast is a priority 1 reply?" | Answers that miss part of the question |
| Spans two chunks | A question whose answer sits in two neighbouring paragraphs | Chunks that are too small |
| **Not in the document** | "Does the company offer a free trial?" | Made-up answers (hallucination) |
| Misleading wording | A question using different words than the document | Weak retrieval |

The question that is not in the document is the one people forget. If you leave it out, an app that invents an answer scores the same as an app that says "I do not know". The starter `goldens.csv` in the lab has one on purpose.

## How to write the expected answer

- Write the **facts**, not a perfect sentence: "30 days to request a full refund".

- For an unanswerable question, write what the app **should do**: "The handbook does not say. The app should say it does not know."

- Keep it short. A judge compares facts, and long expected answers make grading noisy.

- Do not copy the app's own answer. Write it from the document, before you look at what the app says.

## In the Evals Lab

1. Open the Python IDE and open `goldens.csv`. It has two columns: `input` (the question) and `expected_output` (the answer you expect).

2. Replace the sample rows with questions about your own document, or add rows below them.

3. Run `python run_eval.py`. Each row is graded by the judge, and the question appears in the Test cases and Results tabs.

4. To use test cases you wrote or generated in the Test cases tab instead, set `USE_LAB_CASES = True` in `run_eval.py`.

The lab can also draft one question per chunk with your model. Treat these as drafts: read each one, delete the weak ones and add a few of your own. A question written by a model from a chunk is easier than a real user question.

## Keep the set honest

- Never use the golden questions to tune the app's prompt and then report the score as if it were new. Keep a few questions aside that you never look at.

- Have a second person check a sample of expected answers.

- Refresh the set when the documents change. A stale expected answer makes a correct app fail.

## How to use the Evals Lab: step by step

1. Open goldens.csv in the Python IDE
2. Write 20 or more questions about your document
3. Include one or two the document cannot answer
4. Run python run_eval.py and read the reasons

## When to use the Evals Lab

- Starting an eval with the right questions
- Checking that an app does not invent answers
- Preparing a test set before comparing two versions
- Teaching a team what a good eval question looks like

## Example

Input:

```
northwind_support_handbook.txt, chunked and stored in ChromaDB
```

Output:

```
A score and a reason for every answer, and each run logged in MLflow
```

## Frequently asked questions

### What is a golden dataset?
A set of questions, each with the answer you expect. An eval asks your app every question and compares its answer with the expected one.

### How many test cases do I need?
A common start is 50 to 100 for one feature, with some edge cases. There is no standard number. Coverage matters more than size, and you should add a case for every real failure.

### Why include questions the document cannot answer?
Without them, an app that invents an answer scores the same as one that says it does not know. These questions catch hallucinations.

### Where is the golden dataset in the Evals Lab?
In the Python IDE, as goldens.csv with the columns input and expected_output. You can also write test cases in the Test cases tab.

Tip: Add one question per real failure you see. A golden set that grows from real failures is worth more than a large one written in an afternoon.

## Related tool pages

- [LLM as a Judge Playground: Grade AI Answers Free](https://datautility.in/llm-as-a-judge-playground): Try LLM as a judge free on your laptop: write a judge prompt or a DeepEval G-Eval metric, run it on every test question and read a score and a reason for each answer.
- [RAG Evaluation Playground: Test Chunking and Retrieval](https://datautility.in/rag-evaluation-playground): Evaluate a RAG app free on your computer: chunk a document into ChromaDB, test retrieval by meaning, grade every answer and compare chunk sizes side by side in MLflow.
- [DeepEval Playground: Try G-Eval Free on Your Laptop](https://datautility.in/deepeval-playground): Learn DeepEval hands-on, free: a Python IDE with a ready G-Eval project, goldens.csv, your own Gemini, Claude or OpenAI key and MLflow tracking. Runs in Docker.
- [Chunk a Document Into ChromaDB: Free Local Vector DB](https://datautility.in/chromadb-playground): Upload a document, pick a chunking method and see every chunk and vector stored in ChromaDB, free in Docker. Then connect your own AI agent to that database. No API key.

## Also try

- [How to evaluate a RAG app](https://datautility.in/blog/how-to-evaluate-rag-app-llm-as-a-judge-free-lab)
- [Can you trust an LLM judge?](https://datautility.in/blog/can-you-trust-llm-as-a-judge-check-your-judge)
- [Free AI Evals Lab](https://datautility.in/blog/free-ai-evals-lab-docker-deepeval-chromadb-mlflow)

## More guides

- [Data Profiler: Check Data Quality Before You Use It](https://datautility.in/blog/data-profiler-check-data-quality)
- [Compare Two CSV or Excel Files: Find Added, Removed and Changed Rows](https://datautility.in/blog/compare-two-csv-files-find-differences)
- [Data Masking: Hide Emails, Phones and Names Before Sharing](https://datautility.in/blog/data-masking-hide-emails-phones-pii)
