RAG Evaluation Datasets
In this article
- Write one RAG eval case with a query, an expected answer, gold evidence stored as document offsets, an answerable flag, slice tags and a dataset version.
- Explain why gold stored as chunk ids breaks when documents are cut again, and how offsets resolved per index avoid it.
- Add unanswerable queries with an empty gold list and an abstention as the correct reply.
- Record a change to an expected answer or a gold label as a new dataset version, and refuse to compare scores across versions.
- Terms defined here: qrels, unanswerable query.
Overview
A teammate re-cuts the help pages into smaller chunks and says the support assistant got better. To check that claim stage by stage, you need saved questions where two things are already known: the right answer, and the exact place in your documents that holds it. Without the second, you can only grade the final reply, and a bad search hides behind a lucky answer.
The map is short. A RAG eval set is a list of cases. Each case stores a query, an expected answer, the gold evidence as positions in documents, a flag that says whether the documents answer it at all, slice tags for grouping, and the version of the set.
The example is invented, with made-up pages and numbers. Brightline, a home-internet provider, runs a support assistant that puts the top 3 chunks of its help pages and router manuals into each request. The team checks it against a saved set called support-rag-evals, version 1, with 60 cases: 30 answered from help pages, 20 from router manuals, and 10 that no Brightline document answers. Eight of the 50 answerable cases are tagged multi-part, because their answer needs more than one passage. Microsoft's guide to preparing a RAG system asks for the same core per question: the query, the text in the documents that addresses it together with where it sits, and a valid answer. [1]
Sign in to keep reading
The rest of this article opens with an account. An account also keeps your progress and quiz results on every device, and lets you follow news for up to five topics.
Still to read in this article
- What one case holds
- Where the gold points
- Gold evidence as qrels
- Rows from the set
- Queries the documents cannot answer
- Slices that look like real traffic
- When the right answer changes
- Common mistakes
- Sources
- Check yourself, 13 questions