Retrieval
A golden question set for RAG: real questions first
Build a RAG golden question set from real questions, check synthetic ones before you trust them, and know what 30 questions can and cannot tell you.
By Rose Donaldson, Context Retrieval team · Published
This article was drafted with AI assistance from the sources listed below and edited and published by the Context Retrieval team.
- Real questions first: Take them from logs, support tickets or experts, not from the pages themselves.
- Check synthetic ones: Compare their length and specificity with the real questions.
- Label URL and section: Record where the answer lives, not only which page.
- Measure at your k: If the pipeline passes 10 chunks, measure recall@10.
- Know the set's size: With 30 questions, one question is 3.3 points of recall.
- Version everything: Pin the corpus snapshot and how labels were made.
Every tuning decision in a RAG pipeline rests on one asset: a list of questions with known answers. Our retrieval guide starts with 30 to 50 of them, written by hand. The obvious next step is to let a model write a few thousand more from the indexed pages, because that is fast and the labels come for free. This post explains why the real questions should come first, how to check generated ones before they enter the set, and what a set of 30 can and cannot tell you.
Three ways to get questions
A golden question set is a fixed list of queries, each labeled with the documents that answer it. Qdrant's evaluation guide names the usual sources.1 Domain experts can judge relevance, either as relevant or not, or on a graded scale such as 0/1/2. That gives good labels, but expert time limits it to a small set of high-value queries. Production logs give real query-document pairs, using clicks or explicit feedback as the signal. The guide adds a warning there: a click is rarely a good relevance judgment, and click-based labels favor the ranking that produced the logs. The third source is an LLM that writes plausible queries for documents sampled from the corpus. The document it was shown becomes the label for every query it writes.
For a web-sourced index, "real questions" usually means search logs from your own app, support tickets, or questions that the team behind the source pages hears every week. If none of these exist yet, ask three people who will use the system to write ten questions each without looking at the pages. That is slower than generation, and it is the point.
Why generated questions score too well
Qdrant's guide is direct about the weakness of synthetic queries: models tend to mirror the wording of the source document, so the queries are easier to retrieve than real user input, and offline scores come out inflated.1
A study from September 2026 measured the gap on one system. Kucia and Gawlik compared 1,851 synthetic questions with 322 authentic queries from a student survey, both aimed at a university faculty information system.2 The authentic queries averaged 6.8 words against 15.7 for the synthetic ones, and drew on only 53 unique sources against 165. Real users clustered on a few administrative and procedural topics, while generation spread its questions evenly across the corpus. Configurations that looked strong on the synthetic set lost substantial performance on the authentic one. Tuning on synthetic questions also picked a hybrid retriever whose sparse component helped the long synthetic questions but not the short real ones. That is one corpus and one generator, so treat it as an example of how the two sets can disagree, not as a general size of the effect. The authors themselves treat the two kinds of set as complements: synthetic questions probe how much the retriever can find, authentic ones test how it copes with short, underspecified input.
Checking generated questions before you keep them
Generated questions are still useful for coverage, especially for pages no user has asked about yet. Qdrant suggests two checks.1 First, instruct the model to write as a user who has not seen the source document. Second, compare the synthetic and real question distributions on length and specificity. If your real questions average a handful of words and the generated ones are three times longer, the generated set measures a different task.
Two more checks follow from how the labels are made. The source page is the only label, but on a site with overlapping pages another page may answer the question just as well, and a retriever that finds it would be scored as wrong. Read a sample of generated questions and add those second labels by hand. Also keep real and synthetic questions in separate files and report their scores separately, so a gain on one never hides a loss on the other.
Label the section, not only the page
For web pages, a label of "this URL" is often too coarse. A long docs page can hold a dozen sections, and recall at the page level counts a hit when the retriever returned the changelog section instead of the one with the answer. Record the final URL and the heading of the section that answers the question, and map your chunk IDs to that pair when you score. A JSON Lines file is enough:
{"qid": "q01", "question": "how do I rotate the signing key", "source": "real", "labels": ["https://example.com/docs/keys#rotate-a-key"]}
{"qid": "q02", "question": "what happens to old tokens after key rotation", "source": "synthetic", "labels": ["https://example.com/docs/keys#rotate-a-key", "https://example.com/docs/tokens#expiry"]}
Measure at the k you actually pass
Qdrant's guide makes a point that is easy to skip: set k to match actual usage.1 If the pipeline passes 10 chunks to the model, measure recall@10. Reporting recall at 100 for a pipeline that passes 10 makes retrieval look better than what the model receives. The ranx library computes the standard metrics from two dictionaries, the labels (qrels) and your retriever's scored results (run):3
import json
from ranx import Qrels, Run, evaluate
qrels_dict = {}
with open("golden.jsonl") as f:
for line in f:
q = json.loads(line)
qrels_dict[q["qid"]] = {label: 1 for label in q["labels"]}
# run.json: {"q01": {"https://example.com/docs/keys#rotate-a-key": 0.91, ...}, ...}
# written by your retriever, with chunk IDs mapped to "URL#section"
with open("run.json") as f:
run_dict = json.load(f)
print(evaluate(Qrels(qrels_dict), Run(run_dict), ["recall@10", "mrr"]))
One detail when mapping chunks to sections: if three chunks of the same section come back, keep only the best-scored one in the run, or the section counts once while filling three slots of your k.
What 30 questions can and cannot show
With 30 questions, each question is worth 1/30 of recall, about 3.3 percentage points. A move from 24 to 25 hits, 80% to 83.3%, is one question changing sides, and the next change to the prompt or the index can move it back. Qdrant's guide puts the scale plainly: a few hundred labeled pairs to detect large metric differences, and substantially more for small ranking differences or per-slice analysis.1
So the small hand-written set has a different job. It is for finding and reading misses: was the right section never indexed, was it split badly, or was it there and ranked too low? Each of those has a different fix, and 30 questions you can read in one sitting will show you which one dominates. It is not for choosing between two rerankers that differ by two points. For that, grow the set, and use a paired significance test before you believe the gap. ranx's compare() runs a paired Student's t-test by default, with Fisher's randomization test and Tukey's HSD as alternatives.3
Keep the set honest over time
Qdrant recommends versioning the whole setup: the corpus snapshot, how the labels were produced, and any preprocessing thresholds.1 Otherwise a later drop in score cannot be told apart from drift in the data. Web pages drift by themselves: a section gets renamed, a page moves, an answer changes. Store the fetch time of the page each label was checked against, and regenerate or re-check labels after material changes to the corpus, which Qdrant also advises. Then re-run the set whenever the retrieval stack changes, and fail the build when the metric you chose drops below your target. When misses trace back to pages that changed after indexing, look at RAG index freshness before the retriever.
Footnotes
-
Qdrant documentation, "Measuring Retrieval Relevance". ↩ ↩2 ↩3 ↩4 ↩5 ↩6
-
Kucia and Gawlik, "Beyond Benchmark Scores: How Synthetic and Authentic Query Distributions Diverge in RAG Evaluation", arXiv 2609.14579 (September 2026). ↩
-
ranx, README on GitHub (metrics,
compare()and its statistical tests). ↩ ↩2
Frequently asked questions
What is a golden question set in RAG?
It is a fixed list of questions, each labeled with the document or section that answers it. You run every question through your retriever and score how often, and how high, the labeled answer comes back, for example with recall at k or mean reciprocal rank.
Can I use LLM-generated questions for RAG evaluation?
Yes, as a supplement. Generated questions tend to reuse the source page's wording, which makes them easier to retrieve and inflates scores. Ask the model to write as a user who has not seen the page, then compare their length and specificity with real questions.
How many questions do I need to evaluate RAG retrieval?
Qdrant's guidance suggests a few hundred labeled pairs to detect large differences between settings, and substantially more for small differences or per-slice results. A set of 30 to 50 questions is still useful for reading misses one by one.
At which k should I measure recall?
At the k your pipeline actually uses. If it passes 10 chunks to the model, measure recall at 10. A much larger k makes recall look better than what the model receives.