← All questions
Retrieval & EmbeddingsMedium· Hybrid Search· Reciprocal Rank Fusion· Normalization

How do you combine BM25 and dense cosine scores into a...

The primary challenge in combining BM25 and dense scores is the ‘units problem’: BM25 is unbounded and corpus-dependent, while cosine similarity is bounded. Normalization techniques like min-max are unreliable because they are sensitive to the retrieval depth. Reciprocal Rank Fusion (RRF) is the preferred solution, as it relies on rank positions rather than raw scores, providing a stable and effective way to merge disparate retrieval signals.

Code playground (Python)