{"slug": "one-query-six-ranked-lists-one-answer-tuning-rank-fusion-for-multilingual-search", "title": "One Query, Six Ranked Lists, One Answer: Tuning Rank Fusion for Multilingual Search", "summary": "A developer building SpotRecall, a private on-device browser recall extension, tuned weighted Reciprocal Rank Fusion to merge six ranked lists — three query language variants (English, Japanese, Chinese) each searched by BM25 and a local int8 multilingual-e5-small embedding model — into a single ordering. The release, version 1.3.1, lowers the RRF constant from the conventional k=60 to k=3, arguing that correlated lists (translations of the same query) repeat one opinion rather than provide independent evidence, so a steep curve that rewards a confident top match fits better. Measured on 54 real queries against a 1088-page personal history, the changes bring mean reciprocal rank to 0.828.", "body_md": "*How one constant in Reciprocal Rank Fusion lets a confident top match stand out — and why the right value depends on how correlated your retrievers are.*\n\nWhen you type a query into SpotRecall, my private on-device browser recall extension, it does not run one search. It runs six.\n\nThe query is first searched as typed. Then Chrome's on-device Translator turns it into the other two languages SpotRecall covers — English, Japanese, and Chinese — because, as I wrote earlier in this series, translating the query beats shipping a model four times larger. Each of those three variants is searched twice: once by BM25 keyword search and once by a small multilingual embedding model (`multilingual-e5-small`, int8, running locally).\n\nThree variants times two retrievers gives six ranked lists. The user sees one result page.\n\nVersion 1.3.1 is about the step in between: how those six lists become one ordering, and how to make the page you are actually looking for land at the top. Measured on 54 real queries against a 1088-page personal history, the full set of changes in this release brings mean reciprocal rank (MRR) to **0.828**. This post covers the fusion stage at the center of it.\n\nSpotRecall merges its lists with weighted Reciprocal Rank Fusion (RRF), the standard technique for hybrid search. Every document receives, from every list it appears in, a contribution based only on its rank:\n\n```\nscore(doc) = Σ over lists   weight(list) / (k + rank(doc in list))\n```\n\nRRF is popular for good reasons. It needs no score calibration between retrievers — a BM25 score and a cosine similarity live on unrelated scales, but ranks are always comparable. It is a few lines of code. And it rewards agreement: a page that several retrievers like rises.\n\nThe interesting part is the constant `k`.\n\n`k` sets how steeply the reward falls with rank. In other words, it decides how much a confident first place is worth compared with a place further down the list.\n\nThe value you see in tutorials and libraries is `k = 60`, from the original RRF paper. Here is what it does to a single list (ranks start at 1):\n\n```\nk = 60:   rank 1 → 1/61 ≈ 0.0164    rank 20 → 1/80 ≈ 0.0125    (#1 is worth 1.3× #20)\nk = 3:    rank 1 → 1/4  = 0.25      rank 20 → 1/23 ≈ 0.0435    (#1 is worth 5.75× #20)\n```\n\nWith `k = 60` the curve is almost flat: being first is barely better than being twentieth. That shifts the weight of the decision onto *how many lists* a page appears in.\n\nA worked example makes the difference concrete. Take a page that is the clear first result of one list, and another page that sits at rank 10 in three lists (unweighted, for simplicity):\n\n```\nscenario              k = 60              k = 3\n#1 in one list        1/61 ≈ 0.016        1/4  = 0.25\n#10 in three lists    3/70 ≈ 0.043        3/13 ≈ 0.23\nwinner                consensus (2.6×)    confident #1\n```\n\nNeither answer is universally right. It depends on what agreement between lists *means*.\n\n`k = 60` was designed for fusing many **independent** systems — different engines, different models, different teams. When independent systems agree on a document, that agreement is strong evidence, and a flat curve that rewards it makes sense.\n\nSpotRecall's six lists are not independent. A query and its translation describe the same intent; their embeddings sit close together; BM25 over a Japanese translation and BM25 over the Chinese one often retrieve overlapping pages. When correlated lists agree, they are largely repeating one opinion.\n\nSo for this pipeline, a steeper curve fits better. `k = 3` lets a strong first place in one list compete on equal terms with moderate agreement across several, which matches what a user means by \"the page I was looking for.\"\n\nThe second piece concerns the embedding retriever. Nearest-neighbour search always returns the number of results you ask for. It never says \"nothing here is really similar.\"\n\nWith e5-small, cosine similarities for real pages cluster in a narrow band, roughly 0.75 to 0.9. The top few hits of a vector list are usually meaningful; by rank 18 the score difference from rank 3 can be tiny, and the content often is not related.\n\n1.3.1 therefore keeps only vector hits within a fixed margin of the best one:\n\n```\nkeep hit  if  score ≥ topScore − 0.06     (and rank ≤ 20)\n```\n\nWhen the model is confident, several close matches pass. When one page stands out, the list becomes short and decisive. Either way, the vector retriever contributes what it is sure about, and BM25 handles the rest.\n\nTwo more weights round out the stage:\n\nThe whole stage is a small pure function, shared by the extension and the offline evaluation so that tuning measures exactly what ships:\n\n``` js\nexport const FUSION_PARAMS = {\n  bm25Weight: 1.2,\n  vecWeight: 1.0,\n  rrfK: 3,\n  translationWeight: 0.7,\n  vecMargin: 0.06,\n  vecDepth: 20,\n  contentlessWeight: 0.5,\n};\n```\n\nEach behaviour is pinned by a test. For example, when the original query and a translation each produce a page at the same rank, the original's page must come first; and a weak vector hit (0.7 next to a 0.9) must not reach the fused list at all.\n\nAll of these numbers were tuned against 54 labeled queries — Chinese, Japanese, English, and cross-lingual — replayed offline against a real 1088-record backup, with the offline ranking verified to be identical to the live extension.\n\nWith so few queries, it is easy to find parameters that fit them perfectly and help nobody else. A grid search proposed other values. When I tuned on half of the queries and tested on the other half, those values did not beat the shipped ones, so they did not ship. The values above are the ones that kept their gains on held-out queries.\n\nFor reference, an early configuration with textbook `k = 60`, equal weights, and untrimmed vector lists scored around 0.30 MRR on the first 32 queries. After this release, the full 54-query set sits at 0.828, and the worst-case configuration (simulating bookmark-heavy profiles) at 0.826. Those two figures are not on the same query set, so read them as direction rather than a precise delta. The next posts cover the other contributors and the evaluation loop in detail.\n\nRank fusion constants are not magic numbers. They encode an assumption about your retrievers: how independent they are, and how much a confident first place should be worth.\n\nIf your hybrid search fuses a keyword list, a vector list, and a few query rewrites, those lists are probably correlated. Measure `k` rather than copying 60 — and give each retriever the chance to contribute only what it is genuinely confident about.\n\nThe honest caveat: `k = 3` is right for *this* pipeline — few lists, strongly correlated, a personal corpus of about a thousand pages. The general advice is to measure, not to use 3.\n\nSpotRecall is open source under AGPL-3.0. [spotrecall.com](https://spotrecall.com/) · [source on GitHub](https://github.com/dqj1998/SpotRecall) · [install from the Chrome Web Store](https://chromewebstore.google.com/detail/lfdjmifmmmimonedmclkpckjebmcabcg).\n\nThis is Post 11 in *Building SpotRecall*, and the first post in Season 3: sharper, measured search.", "url": "https://wpnews.pro/news/one-query-six-ranked-lists-one-answer-tuning-rank-fusion-for-multilingual-search", "canonical_source": "https://dev.to/dqj1998/one-query-six-ranked-lists-one-answer-tuning-rank-fusion-for-multilingual-search-oaf", "published_at": "2026-11-16 15:12:14+00:00", "updated_at": "2026-11-16 15:22:02.601728+00:00", "lang": "en", "topics": ["ai-search", "ai-tools", "natural-language-processing", "machine-learning"], "entities": ["SpotRecall", "Chrome", "multilingual-e5-small", "BM25"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/one-query-six-ranked-lists-one-answer-tuning-rank-fusion-for-multilingual-search", "markdown": "https://wpnews.pro/news/one-query-six-ranked-lists-one-answer-tuning-rank-fusion-for-multilingual-search.md", "text": "https://wpnews.pro/news/one-query-six-ranked-lists-one-answer-tuning-rank-fusion-for-multilingual-search.txt", "jsonld": "https://wpnews.pro/news/one-query-six-ranked-lists-one-answer-tuning-rank-fusion-for-multilingual-search.jsonld"}}