Skip to content
For the first version of the evaluation set, don't wait for annotation—sample two hundred retrieval logs first

For the first version of the evaluation set, don't wait for annotation—sample two hundred retrieval logs first

What often stalls the first evaluation set is the annotation guideline

A common scenario: the team is about to ship a retrieval QA feature, and in the review meeting someone says “we need an evaluation set first.” The next two weeks turn into writing annotation guidelines: what counts as correct, how to score partially correct, whether a wrong citation with a correct conclusion counts as correct, what to do when a question has multiple correct answers, whether the model saying “cannot be determined from the documents” counts as a correct answer. By the third revision of the guideline, the outsourced annotation hasn’t even started, and the evaluation set has zero items.

This order is backwards. The guideline is not a prerequisite for the evaluation set; it is a byproduct of spot-checking.

The only question that really needs answering during cold start is: where is this approach wrong right now, and is it worth continuing to invest in? This question doesn’t need golden answers, and it doesn’t need inter-annotator agreement checks. It needs enough real inputs, plus someone making a rough judgment on each output.

Spot-checking and annotation are not the same thing

These two things often get conflated into one, and then get stuck on the same process.

Spot-checking is taking a real query, looking at the system output, judging “is this usable,” and jotting down where it went wrong. One person can get through dozens per hour, no training needed, no arbitration needed.

Annotation is producing a standard answer for a given query, having multiple people label the same item, computing agreement, and routing disagreements to arbitration. This is engineering that costs money, time, and management overhead.

Cold start only needs spot-checking. Spot-checking gives you an error distribution, not a precise score. And an error distribution is enough to decide whether the next step is fixing retrieval, fixing chunking, fixing the prompt, or switching data sources.

Precise scores are only needed when you have to make an external commitment, or when you need to compare two approaches that differ by just a few points. Doing this step early means spending money on a number you don’t even believe in, before you’ve figured out where things are wrong.

Real queries come from logs, but sample them by strata

The biggest problem with human-written queries isn’t that they’re unrealistic—it’s that they’re too tidy. The person writing the query knows how the system should answer, and unconsciously fills in all the conditions, scope, and intent. Real users don’t.

Sources can be prioritized: online retrieval logs, better than zero-result and no-click queries, better than customer service tickets and user feedback, better than human-written. The earlier in the list, the more real, and the easier to sample cases that make you uncomfortable.

Don’t sample purely at random from logs. Random is representative of “average experience,” not of “a first evaluation set.” My approach is to stratify into four layers:

  • Stratify by frequency, roughly 5:3:2 for head, torso, and long tail. The head determines everyday experience; the long tail determines when things break.
  • Stratify by result status, sampling some from each of: has results, zero results, has clicks, no clicks. Zero results and no clicks hide the most real problems.
  • Stratify by session position, looking at first-turn queries and multi-turn follow-ups separately. Coreference and ellipsis in multi-turn are a different class of error, and mixing them in gets them buried by first-turn samples.
  • Stratify by business line or intent category, ensuring no important scenario has zero items.

Here’s a very common pitfall: only sampling queries that have results. Because when exporting logs, someone casually added a filter condition, and “has results” is the easiest to query. But the portion where users search and then leave is often exactly what the product most needs to fix.

Two hundred items is enough to locate problems, not to compare approaches

The sample size question needs to be split into two separate questions.

To locate error types, one or two hundred items is enough. After a certain number, new error types basically stop appearing, and the shape of the error distribution stabilizes. At that point you can clearly state: the main problem is insufficient recall, wrong chunk granularity, or the model making things up when there’s no answer. This conclusion directly affects next week’s schedule.

To compare two approaches, it’s far from enough. For proportion-type metrics, at a sample size of one hundred, the 95% confidence interval width is roughly plus or minus 10 percentage points; to get to plus or minus 5 percentage points, you need about four hundred items. If two approaches differ by 3 points, a hundred-item sample simply can’t tell them apart—using this to make decisions is like using noise as votes.

So the first evaluation set is for qualitative localization, not quantitative ranking. If you want to compare approaches, either increase the sample size, or switch to a more sensitive metric—for example, the absolute count of a certain type of hard error, rather than overall accuracy.

The spot-checking loop looks roughly like this; note there are two back-edges: one goes back to re-sample if error types haven’t converged, and one goes back to the guideline for disputed cases.

flowchart LR
  A[检索日志] --> B[分层抽样]
  B --> C[人工抽检]
  C --> D[错误分类]
  D --> E{新错误类型还在出现}
  E -->|是| B
  E -->|否| F[定修改优先级]
  D --> G[争议 case]
  G --> H[补规范条款]
  H --> C

These columns are enough for one case

The most common mistake in a spot-checking table is too many fields. The first time I designed such a table, I listed over twenty columns; the people filling it in only used the first three, and the rest were all empty. Later I cut it down to this:

YAML8 lines
1
2
3
4
5
6
7
8
case_id: q-0142
query: 原始用户输入,错别字和口语都保留
source: search_log / ticket / manual
bucket: head / mid / tail
system_output: 系统当时的输出,含引用片段
verdict: usable / partial / unusable
error_type: retrieval_miss / wrong_answer / over_refusal / bad_citation / format
note: 一句话,写清楚为什么这么判

A few details are worth mentioning.

query must be preserved verbatim. Some people habitually fix typos and convert colloquial speech to formal writing—after that, the case no longer represents that real failure.

verdict keeps only three levels. Five-level ratings have no discriminative power during cold start; the disagreement between two people over “3 or 4” is much larger than over “usable or not usable,” and that disagreement doesn’t help decision-making at all.

error_type shouldn’t be fully written out in the first version. Leave a other, run it for two days to see what piles up in other, then split it into new categories. This way the taxonomy grows out of the data, not out of someone’s head.

A few types of cases must be forced in

Log sampling has a natural gap: low-frequency but high-cost scenarios don’t get sampled. So the first evaluation set needs a few types added by hand—the proportion doesn’t need to be high, but not a single one can be missing.

Questions with no answer. The user asks about something that isn’t in the documents at all, and the system should say it doesn’t know. These are a small proportion in logs, but once the model makes things up, the cost is the entire user base.

Questions with negation and exclusion conditions. “What else besides A,” “solutions that don’t include B.” The model’s error rate on these structures is noticeably higher, and in logs these queries are scattered everywhere, so random sampling easily misses them.

Time-sensitive questions. The documents have been updated but the index hasn’t, or the answer changes by version. These need to be recorded along with the index time, otherwise you can’t judge right or wrong two weeks later.

Multi-hop questions. The answer requires stitching together two documents. Single-document retrieval looks solid, but falls apart the moment stitching is involved, and stitching failures often get misrecorded as “incomplete answer” during spot-checking.

Domain terms and internal abbreviations. Users ask using the company’s internal terminology, and the model doesn’t recognize it. These cases are the most persuasive to the business side, and are also the most likely to be completely absent from general evaluation sets.

The guideline is a byproduct of spot-checking, not a prerequisite

After the first round, you’ll have a batch of unusable items. Then do two things.

First, lay out cases with the same error_type side by side and look for commonalities. For example, “wrong citation but correct conclusion”—is it that retrieval pulled the wrong paragraph, or that the model rewrote the quoted content itself? These two must be treated differently in the guideline, but you can’t think of this fork when writing the guideline; you only discover it when you see specific cases.

Second, pull out disputed cases separately. During spot-checking, if two people disagree on the same item, that item exposes a hole in the guideline. Holes don’t need to be filled all at once—first mark “tentatively handled this way,” and once you’ve accumulated a dozen or so, converge them together.

The order then becomes: spot-check, accumulate disputes, add clauses, spot-check again. The guideline is a patch, not a foundation.

One more organizational detail: try not to assign the first round of spot checks to the designer of the solution. This is not a question of doubting honesty; it is a question of perspective. When designers look at a failure, they easily think, “This one actually retrieved the right thing, the model just didn’t use it,” or “The user’s question itself wasn’t clearly phrased.” Half of these thoughts are correct, but putting them into the spot-check process will make verdict systematically too lenient. When there aren’t enough people, require at least one thing: for every unusable item, write “why this is a problem,” not “why the system isn’t to blame.”

When you must stop and move to formal annotation

Everything above is about getting things running first. But there are a few lines that, once crossed, will cause trouble. Outside these lines, I lean toward running first and talking later.

When you need to commit to metrics for a client or externally. If the contract specifies accuracy, you cannot hand in numbers from a rough spot check of two hundred items; neither the sample size nor the definition will hold up.

When you need legal or compliance evidence. These scenarios require traceable annotation records, annotator identities, and an arbitration process. Spot-check records do not count.

When you need to decide whether an A/B test can go to full rollout. The decision criteria must fix the sample size and metric definitions in advance; you cannot pick a good-looking slice from the spot check after the fact.

When multiple people across teams share one dataset. If more than a few people use it at the same time, without consistency checks everyone will be speaking a different language. At that point you need to build an annotation process; the consistency coefficient is only a byproduct.

Once the business is actually running, you will have a clearer idea of which type of error is worth spending money on for high-quality annotation. Conversely, if you spend two months doing high-quality annotation before launch, the problems you annotated precisely often are not the ones you actually encounter online.

Shelf life, and don’t turn it into an asset that only grows

The distribution of retrieval logs drifts. Add a batch of new documents, change the chunking once, run one operational campaign, and the query distribution changes. For the first version of the evaluation set, my default is not to set a fixed cycle, but to re-sample once with each major change, and at minimum review the distribution once a quarter.

One very useful signal: when the share of other in spot checks starts to rise, it means real users are using the product in ways you did not anticipate, and it is time to re-sample.

Another thing: don’t treat the evaluation set as an asset that only grows. Some people like to keep adding cases until there are thousands, so one evaluation run takes half a day and changing one prompt means waiting two hours to see the result. In the end nobody runs it anymore. In the cold-start stage, a few dozen representative cases are more useful than thousands of messy ones. If you want to expand, first expand coverage of error types, so that every type of error has a few samples that can be reproduced reliably, rather than piling two hundred samples onto the same error type.

Back to the team that was stuck at the beginning. What was really blocking them was not annotation resources, but treating “evaluation” as “high-quality annotation” by default. The task for the first version of the evaluation set is very light: take real logs, stratify and sample two hundred items, have someone who did not participate in the solution do a rough judgment, and see which categories the errors cluster in. This round takes about a week, which is much faster and more useful than continuing to revise the fourth version of the annotation guideline.

About this Post

This post is written by Lu's Blog, licensed under CC BY-NC 4.0.

#Annotation #Cold Start #Evaluation

Comments