Skip to content

Hybrid Search, Measured Not Assumed

Hybrid search vs semantic search on two public datasets: BM25, dense, fusion and a reranker, where the mix helped, where not, and the time cost.

On this page

Everyone recommends hybrid. I made it show its marks. Hybrid search means running keyword search and semantic search side by side and merging the two rankings, and the usual advice presents it as free improvement. On one of the two datasets I measured, it scored slightly below semantic search alone on recall, MRR and nDCG in the top ten.

The contestants

The measurements come from Axon, a retrieval engine with a benchmark harness, and they use two public test sets from the BEIR benchmark. SciFact has 5183 documents and 300 queries. NFCorpus has 3633 documents and 323 queries. Each document is one chunk, searched in memory with exact cosine, so no index gets to add its own noise.

Four setups run, and each one is a different place to stop on this picture.

flowchart TD
    Q[Query] --> B["BM25: keywords, no stemming"]
    Q --> D["Dense: small embedding model"]
    B --> F["Hybrid: merge by rank"]
    D --> F
    F --> X["Reranker: cross-encoder reorders the top 20"]

BM25 scores lowercased words. Dense is the semantic side, an int8 bge-small with 384 dimensions. Hybrid merges the two, and the last setup lets a small cross-encoder second-guess the head of the merged list.

The merge is reciprocal rank fusion. Every list gives a document 1 / (k + rank), the contributions add up, and the sum sorts the result. The constant is 60, taken from the original paper, whose pilot found it near-optimal but not critical. Both lists carry equal weight and each supplies 50 candidates. I tuned none of this per dataset. A constant tuned on the test queries mostly learns the test queries.

Hybrid search vs semantic search on SciFact

SciFactR@10MRR@10nDCG@10R@100
BM250.7740.6190.6520.873
Dense0.8260.6730.7050.937
Hybrid0.8130.6710.7010.968
Plus reranker0.8240.6540.6880.968

R is recall: the share of relevant documents found within that many results.

Read the first ten results and fusion lost, narrowly: recall down about a point, the two ranking metrics a few thousandths lower. Read the first hundred and fusion won clearly, 0.968 against 0.937.

Both statements are true, and they answer different questions. BM25 is much the weaker ranker here, and merging it with equal weight lets its opinions push into the top ten. Yet it finds relevant documents that the embedding model leaves outside its first hundred, and those show up in the deeper pool. The keyword side is a poor judge and a useful scout.

So which number matters? The one matching what happens next. If a language model reads the top five or ten passages, the top of the list is the product. If a second stage is going to reorder a long candidate list, the pool is what counts.

The second dataset disagrees

NFCorpusR@10MRR@10nDCG@10R@100
BM250.1520.5090.3060.233
Dense0.1610.5340.3430.311
Hybrid0.1680.5650.3520.314
Plus reranker0.1670.5800.3570.314

On NFCorpus fusion beats dense on all four quality columns. The first relevant document arrives earlier, and the ranking is better overall. Meanwhile the gain at depth, the thing that was so clear on SciFact, is nearly absent.

Same code, same constant, same weights. The gains moved from the pool to the top, and one of them changed sign. Anyone who tests on one dataset and announces that hybrid helps, or does not, has measured that dataset.

The reranker sends the bill

A cross-encoder reads the query and a passage together, which is a finer judgement than comparing two vectors made separately. It is also one model call per candidate.

On NFCorpus it earned something: MRR@10 rose from 0.565 to 0.580 and nDCG@10 from 0.352 to 0.357, with recall@10 a hair lower. On SciFact it made the ordering worse. MRR@10 fell from 0.671 to 0.654 and nDCG@10 from 0.701 to 0.688, below dense alone, while recall@10 rose by about a point.

The cost was seconds. Here is the median time per query for all four setups, on both datasets.

xychart-beta horizontal
    title "Median milliseconds per query"
    x-axis ["SciFact BM25 53", "SciFact dense 103", "SciFact hybrid 160", "SciFact reranked 3791", "NFCorpus BM25 28", "NFCorpus dense 68", "NFCorpus hybrid 115", "NFCorpus reranked 4072"]
    y-axis "milliseconds" 0 --> 4500
    bar [53, 103, 160, 3791, 28, 68, 115, 4072]

Six bars are slivers and two are walls. The rerank stage alone had a median of 3.7 seconds on SciFact and 4.0 on NFCorpus for 20 candidates. Fusion itself took about a tenth of a millisecond, so the arithmetic everyone argues about is free. These latencies were taken locally under heavy load, where the same dense stage varied by as much as 1.7 times between setups, so treat small ratios as noise. A gap of more than twenty times is not small.

The BEIR paper found re-ranking models among the best performers across its datasets, at high computational cost. My small int8 reranker confirms the second half on both sets and the first half on one.

Was quantisation to blame on SciFact? A separate run scored the same 20 hybrid candidates with the full precision version of the cross-encoder.

Order of the same candidatesnDCG@10
Left as fusion ranked them0.701
Reranked, full precision0.691
Reranked, int80.688

The paired 95 percent interval on the int8 minus full precision gap includes zero. Shrinking the model is not what sank it. This reranker, on this data, preferred a worse order at both precisions. Its name says it learned on MS MARCO, a web search collection, and scientific claims are a different animal, though that explanation is a suspicion I have not tested.

Chunking changes the vote

A separate run swapped the chunking strategy, stored chunks in Postgres with an approximate vector index, built BM25 over the same chunks and skipped the reranker. nDCG@10:

ChunkerSciFact denseSciFact hybridNFC denseNFC hybrid
Whole document0.7060.7000.3420.350
Recursive0.7130.7010.3480.346
Sentence window0.6810.6520.3510.337
Semantic0.7140.7000.3440.345
LangChain0.7200.7060.3410.347

On SciFact hybrid sits below dense for all five chunkers. On NFCorpus it is above for three and below for recursive and sentence windows. The sentence window row is the instructive one: it is the best dense chunker on NFCorpus and the worst hybrid one. Small chunks change what keyword statistics see, and the fused ranking inherits that. The run was not designed to prove why, so I will leave it at the pattern.

What I would trust

For a sense of scale, a separate paired test in the same project, on a different question, produced a 95 percent interval about 0.017 wide on SciFact nDCG@10, wider than the whole gap between dense and hybrid there.

What survives is modest and useful. Fusion is cheap. It widened the candidate pool where the keyword side had something the vectors lacked. Whether it improves the top ten depends on the data, and the reranker can move it either way while multiplying the latency.

The advice to use hybrid search is fine as a hypothesis. Mine took one command per dataset to test, and one of the two said no thank you.