Note 02 · Benchmarking

Picking a reranker without fooling yourself

Benchmarking / Reranking / Method

A reranker benchmark has a tempting shape: load every candidate model, run every prompt against every dataset, sort by the metric, ship the winner. That shape answers “which model is best” and almost never answers “which configuration will I run”, because the configuration is not a constant. Pool size, sequence length, batch size and the serving path all move the answer.

This note is about the procedure, not the results. The measurements are in the reranker case study. What is here is what each round was allowed to change, why the order mattered, and the two things that did not help.

Validate the metric before the sweep

A sweep produces a ranking. If the metric is wrong, it produces a confident ranking of noise, and the confidence is the expensive part: you now have a table that looks like evidence. The first version of this benchmark was measured against a scoring fault - the one described in the previous note - and the run was thrown away rather than reported.

The rule I use now is narrow and boring: no sweep until the metric has a per-stage table. If every stage reports its own number, a stage that does nothing shows up as doing nothing, and a step that quietly rescales everything - a division the metric was never meant to carry - shows up as a number that never moves. That table costs an afternoon and it decides whether the next two weeks mean anything.

One variable per round

The benchmark ran in rounds, and each round was allowed to move one thing while everything else was held at a fixed, recorded value. Round one compared the candidate models at one serving setup, which answers a clean question: which family wins when nothing is tuned. Round two took the survivors into sequence-length and batch sweeps, which answers a different question: how much of the gap is truncation, and how much is the harness. Round three moved the retrieval cut-off on the two best candidates, which answers the question that decides the bill: where does a wider pool stop paying for itself.

The order is not decoration. A shorter sequence cut-off hides the documents that lose on length; a wider pool makes a weak reranker look flatter than it is. Run everything as one grid and you get the same table with none of the understanding, and the winning cell is simply the best of whatever you happened to include.

Two levers that did not help

A cascade. A cheap first stage to shrink the pool, then a strong model over what remains, is the obvious way to keep latency. It never beat the single strong model on either query set: the first stage’s mistakes are not recoverable by the second stage, and the second stage’s own cost sits on every query whether the first stage was right or not. The shipped answer was one model.

Bigger batches. Large batches are what make a sweep finish, and they looked free because the headline retrieval metric did not move. The ranking metrics did move, and they moved down. A knob that is free for the metric you were optimising is not free for the metrics you report next to it, and the settings that make a benchmark fast are the wrong settings to ship.

How I decide to stop

Three conditions end a sweep, and all three have to hold. First, the gap between the top two candidates is smaller than the spread you get from re-running one configuration unchanged - the noise floor, measured rather than assumed. Second, the only lever left is one that cannot ship: a context length that breaks the latency budget, a batch size that only helps offline. Third, the rejected candidates are written down with the reason they lost.

That last one is not bookkeeping. A benchmark whose only output is a winner cannot be reviewed, because nobody can see what was considered and why it was dropped. The rejected list is what makes the choice defensible six months later, when the model has moved on and someone asks why this one.

What I would do differently

Measure the noise floor first, before comparing anything. Re-run one configuration several times and look at the spread. Some of my early differences were inside run-to-run variation, and I found that out from a repeat I only ran near the end, after I had already given some of those differences an explanation. The explanation was the problem: a story about why a number moved is easy to write and hard to withdraw.