Skill 3.2.9

Implement reciprocal rank fusion (RRF)

Key Concepts

For each item, RRF adds 1.0 / (k + rank) from every list in which it appears, where rank starts at 1 and k is a constant, commonly 60, that limits the influence of top positions. An item ranked 1st by vector search and 3rd by full-text search scores 1/61 + 1/63; an item found by only one list scores just its own term. Items are ordered by the summed score.

In T-SQL, RRF is a sum over the joined lists, such as COALESCE(1.0 / (60 + ft.rnk), 0) + COALESCE(1.0 / (60 + vs.rnk), 0), ordered descending. Weights can multiply each term to favour one method. A smaller k gives top-ranked items more weight; a larger k flattens differences.