Urgent.News

What's breaking now, across thousands of outlets.

World

My Favorite Constant in Retrieval Is 60. Nobody Tunes It. That's the Point.

Reciprocal rank fusion merges two ranked lists — say, BM25 results and vector-search results over your chargeback cases — into one. It has exactly one parameter, k . And the answer is just... 60. Not tuned per dataset. Not learned. Sixty, from the original paper, works essentially everywhere. The entire algorithm: def rrf ( rankings : list [ list [ str ]], k : int = 60 ) -> list [ tuple [ str ,…

Abstract editorial illustration

In the world of retrieval, one constant reigns supreme: 60. This single parameter in reciprocal rank fusion, a technique that merges two ranked lists, remains unchanged regardless of the dataset. The answer, as stated in the original paper, is simply 60. There's no need for fine-tuning or learning per dataset. It works universally.

The algorithm for reciprocal rank fusion is straightforward: for each ranking, which is a list of document IDs in descending order of relevance, compute the score as the sum of 1/(k + rank) for each document. The constant k is set to 60. The function returns a sorted list of tuples, where each tuple contains a document ID and its corresponding score.

In a practical example, consider two retrievers – BM25 and dense. The BM25 retriever matched cases "CB-1041", "CB-1250", and "CB-1102", while the dense retriever matched "CB-1203", "CB-1041", and "CB-1288". When these two lists are fed into the reciprocal rank fusion function, the resulting ranked list reveals that "CB-1041" topped the list, a joint favorite of both retrievers. Other documents also ranked well, indicating that the algorithm effectively combined the strengths of both retrieval methods.

The magic of 60 lies in its ability to balance the ranks. At k=60, the difference between rank 1 and rank 3 is significant, but the gap between rank 40 and rank 50 is negligible. This balance embodies the trust one should have in any retriever. It's a constant that encodes an epistemic understanding of the retrieval process, not a dataset-specific value.

This constant has been a robust result in information retrieval research for over twenty years, a testament to the wisdom of knowing when not to turn the knobs. Vinicius Fagundes, a principal data engineer and MBA lecturer, emphasizes this point in his work building fraud and risk analytics pipelines for e-commerce.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in World

More from Sunday 2 August →