DEV Community

My reranker's +2 was noise. Four lines of aliases weren't.

Two posts ago, I reported that a reranker added 2 right answers on 30 real developer questions, against 7 on 22 questions I wrote myself.

In the comments, @kamalmosadegh pointed out the problem: with 30 questions, one question is more than 3 points. Is +2 even real? So the evaluation in docs-rag-mcp now answers that.

The bootstrap

The idea is simple. Take the 30 questions, draw 30 of them at random with replacement (some twice, some not at all), and count how many get the right page first. Do that 10,000 times. The middle 95% of those counts is the interval.

To compare two search modes, each resample uses the same questions for both, so the difference is measured question by question. That matters: a question that is hard for hybrid search is usually hard for reranking too.

No new searches are needed. The evaluation already knows the rank of the right page for every question, so the 10,000 resamples cost nothing next to the searches themselves.

The results

Question set Reranking's gain (right page first) 95% interval
22 questions I wrote +7 +2 to +12
30 real questions +2 -2 to +6

On my written questions, the gain holds: even the low end of the interval is +2. On the real questions, the interval includes zero. Reranking might help there, or it might not; 30 questions can't tell.

In the details, the +2 is three questions moving to first place and one moving down. Two questions' worth of difference was never going to be a finding.

What did hold up

The alias file from my last post took the same 30 questions from 21 to 25 right pages first, and from 27 to 30 in the top 20. That isn't a statistical claim: it fixed three specific questions that no search mode found at all, because they use words the docs don't ("middleware" for filters, "in-proc" for the in-memory transport).

The evaluation now lists those questions by itself: the answerable questions that no mode finds in the top 20. That's the list to write aliases from.

What I'd tell anyone measuring RAG with a small test set

  • Report an interval. With 20 to 30 questions, a difference of 2 or 3 is usually inside it.
  • Pair the comparison by question. Two unpaired intervals overlap much more and hide real differences.
  • Look at the questions that are never found. They are usually a vocabulary problem, and no ranking change fixes those.

The evaluation script and the question sets are in the repo under samples/eval/.

Read on DEV Community ↗ ← Back to News

Comments

No comments yet. Start the discussion.