RRF
A multi-source retrieval result fusion algorithm that computes a weighted sum of reciprocal ranks from different retrieval systems without requiring score normalization. Its simplicity and robustness make it a common choice for merging results in hybrid retrieval pipelines.
Core Facts
混合检索(Hybrid Search)将向量检索与BM25关键词检索的结果通过RRF(倒数排名融合)等算法合并,兼顾语义理解与精确匹配
Hybrid retrieval typically merges results from two retrieval pipelines using a weighted combination via the RRF (Reciprocal Rank Fusion) algorithm.
RRF is a tuning-free rank fusion algorithm that uses only rank positions, accumulating scores as 1/(k+rank), with the constant k typically set to 60.
Timeline (last 90 days)
In a freeCodeCamp course, Beau Carnes demonstrated combining BM25 keyword search with vector search inside PostgreSQL and merging the two result sets using reciprocal rank fusion (RRF).
The execution plan of the hybrid query in the course shows: 20 rows from keywords and 20 rows from vectors, which after aggregation deduplicate 40 records into 32 articles, i.e. 8 articles were found by both methods.
For the E4012 query, BM25 ranks the correct page 1st (score 1/61) and vector search ranks it 14th (1/74); after RRF fusion the correct page scores about 0.030 while the E4021 page scores about 0.016, nearly doubling the correct page's score.
In hybrid retrieval, about 50 candidates should be taken from each side rather than 5, otherwise if the correct document ranks 14th in one list, fusion will never see it.
On a self-built test set (120 real queries, 38 of which contain identifiers), pure vector retrieval hit 21/38 identifier queries, pure BM25 (with an identifier-preserving tokenizer) hit 36/38, and hybrid + RRF hit all 38.
RRF relies only on rankings rather than raw scores, so it is unaffected by inconsistent score scales across channels and does not require tuning parameters for each channel.
Elastic's RRF fusion has a default smoothing constant k of 60.
RRF uses only the rank in each list rather than the raw scores, so it is immune to differences in score scale between BM25 and vector similarity.
The role of the constant k=60 in RRF is to smooth, narrowing the gap between 1st and 2nd place, so that appearing in multiple channels matters more than being first in a single channel.
Elasticsearch uses k=60 as the default value of rank_constant in its RRF documentation.
26 more timeline events
All Facts (20)
混合检索(Hybrid Search)将向量检索与BM25关键词检索的结果通过RRF(倒数排名融合)等算法合并,兼顾语义理解与精确匹配
90%VerifiedHybrid retrieval typically merges results from two retrieval pipelines using a weighted combination via the RRF (Reciprocal Rank Fusion) algorithm.
80%VerifiedRRF is a tuning-free rank fusion algorithm that uses only rank positions, accumulating scores as 1/(k+rank), with the constant k typically set to 60.
65%VerifiedThe core formula of RRF is RRF_score(d) = Σ 1 / (k + rank_i(d)), where k is a smoothing constant commonly set to 60.
65%VerifiedPostgreSQL can support vector retrieval via pgvector.
65%VerifiedRRF (Reciprocal Rank Fusion) weights and sums the results of two retrieval streams by the reciprocal of their ranks, requiring no score normalization, and is simple to implement with strong robustness.
65%VerifiedRRF does not require normalization of raw scores from different retrievers and relies only on rank information, but when multiple retrievers systematically make the same type of error, RRF only amplifies the mistakes
65%VerifiedHybrid retrieval, which fuses BM25 keyword scores with vector similarity scores through weighted combination (typically using the RRF reciprocal rank fusion algorithm), has become the mainstream paradigm for RAG systems.
65%VerifiedHybrid retrieval combines BM25 sparse retrieval with dense vector retrieval, merging ranking results via RRF or linear weighting.
65%VerifiedRRF (Reciprocal Rank Fusion) uses only the ranking position information from each retrieval path (formula RRF(d)=Σ1/(k+rank_i(d)), where k is typically set to 60), is insensitive to score distribution, and bypasses the cross-modal score alignment problem
65%VerifiedThe Reciprocal Rank Fusion (RRF) algorithm was proposed by Cormack et al. in 2009, with a core formula of Score = Σ 1/(k + rank_i), where k typically takes the value 60 as a smoothing constant.
65%UnverifiedRRF对各路检索的原始分数分布不敏感,相比简单的线性加权在混合检索场景中更加鲁棒
85%UnverifiedThe execution plan of the hybrid query in the course shows: 20 rows from keywords and 20 rows from vectors, which after aggregation deduplicate 40 records into 32 articles, i.e. 8 articles were found by both methods.
50%UnverifiedIn hybrid retrieval, about 50 candidates should be taken from each side rather than 5, otherwise if the correct document ranks 14th in one list, fusion will never see it.
50%UnverifiedOn a self-built test set (120 real queries, 38 of which contain identifiers), pure vector retrieval hit 21/38 identifier queries, pure BM25 (with an identifier-preserving tokenizer) hit 36/38, and hybrid + RRF hit all 38.
50%UnverifiedFor the E4012 query, BM25 ranks the correct page 1st (score 1/61) and vector search ranks it 14th (1/74); after RRF fusion the correct page scores about 0.030 while the E4021 page scores about 0.016, nearly doubling the correct page's score.
50%UnverifiedRRF relies only on rankings rather than raw scores, so it is unaffected by inconsistent score scales across channels and does not require tuning parameters for each channel.
50%UnverifiedElastic's RRF fusion has a default smoothing constant k of 60.
50%UnverifiedRRF uses only the rank in each list rather than the raw scores, so it is immune to differences in score scale between BM25 and vector similarity.
50%UnverifiedElasticsearch uses k=60 as the default value of rank_constant in its RRF documentation.
50%