K
is a constant set to 60
.
If a result appears in both the dense and sparse indexes, its mapped scores are
added together. If it appears in only one of the indexes, its score remains unchanged.
After all scores are processed, the results are sorted by their combined scores,
and the top-K results are returned.
RRF effectively combines rankings from different sources, making use of their strengths,
while keeping the process simple and focusing on the order of results.
By default, hybrid indexes use RRF to fuse dense and sparse scores. It can be explicitly
set for queries as follows:
s
is the score.μ
is the mean of the scores.σ
is the standard deviation.(μ − 3 * σ)
represents the minimum value (lower tail of the distribution).(μ + 3 * σ)
represents the maximum value (upper tail of the distribution).