Skip to main content
InterviewHubPRO
Section Overview
Q17

Question 17 of 50

Part 2: Core Architecture & Implementation (Mid-Level)

34%
Vector DBs & RAG (50 Qs)•Part 2: Core Architecture & Implementation (Mid-Level)

How does Reciprocal Rank Fusion (RRF) merge hybrid search results?

senior LevelSystem Design

In Simple Words: RRF combines ranked lists without needing to normalize disparate raw score scales (BM25 scores vs Cosine similarity scores): $$RRF_Score(d) = \sum_{m \in Models} \frac{1}{k + r_m(d)}$$

  • $r_m(d)$ is the 1-based rank position of document $d$ in system $m$.
  • $k$ is a smoothing constant (typically 60).
  • Documents appearing near the top of both keyword and semantic searches receive exponentially higher combined scores.