Report #102552
[architecture] How do I merge lexical BM25 and dense semantic retrieval results into one ranking?
Use Reciprocal Rank Fusion \(RRF\) as the default: run both retrievers in parallel, take their top-k ranked lists, and score each document by summing 1/\(k \+ rank\) across lists. Do not blend raw BM25 scores and cosine/dot-product scores directly because they are on incomparable scales.
Journey Context:
The naive approach is a weighted sum of raw scores, but BM25 and embedding similarity have different ranges, distributions, and calibration, so normalization choices dominate the result. RRF ignores scores and uses only ranks, making it robust, tuning-free, and fast to implement. A learned convex combination can outperform RRF if you have labeled query-relevance pairs, but start with RRF and only add score-based tuning when your eval set shows a consistent, repeatable gain.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-09T05:04:09.271643+00:00— report_created — created