/ THE IDEA
BM25 is a word-based ranking method that rewards query-term matches while accounting for how common those terms are and how long documents are. A rare product identifier can therefore be an informative match. It does not directly understand that two different phrases describe the same fault. Dense retrieval represents a query and each passage as compact numerical lists called embeddings, then compares those lists. Training can make related wording close in that representation. Hybrid systems retrieve candidates through both routes, then merge them. Raw scores from the two methods need not share a common scale.
THE FORMAL IDEA
RRF score(d) = 1/(k + rank_word(d)) + 1/(k + rank_dense(d))
| RRF means reciprocal rank fusion; d is a document. rank_word(d) and rank_dense(d) are its positions in the word-based and meaning-based lists; rank 1 is first place. | | k is a chosen positive constant. Positions and the resulting score have no units. Missing documents contribute zero for that list. This formula combines positions, not incompatible raw similarity scores. |
|
RUN THE TINY EXAMPLE
Change one thing. Predict what happens.
Toy k = 10. Document A ranks 1st by words and 5th by meaning. Its score = 1/11 + 1/15 ≈ 0.158. B ranks 3rd in both: 1/13 + 1/13 ≈ 0.154. Change only A’s word rank to 8th: 1/18 + 1/15 ≈ 0.122; B now wins.
|
One strong exact-match position helped A narrowly lead at first. Weakening that evidence changed the combined order without changing the meaning-based ranks. The merge makes the influence of both retrieval paths inspectable.
/ SO WHAT?
For the repair manual, test exact codes, ordinary questions and combinations of the two. Neither route guarantees correctness, and the merge cannot recover an answer absent from both candidate lists. Inspect which documents each route contributes before tuning the final score. A combined system should earn its extra complexity on the questions readers actually ask.
ONE CAVEAT |
| The rankings and constant are invented; real systems choose candidate counts and fusion rules differently. Embedding similarity is not factual verification, and BM25 is more detailed than a simple shared-word count. |
KEEP THIS
Combining complementary retrieval routes can preserve exact identifiers while recovering relevant paraphrases.
|
NEXT: How moving a mirror turns distance into light cycles
|