Keyword search finds the exact terms, product codes and names; embeddings find the paraphrases. A hybrid search runs both and has to turn two rankings into one.
Scores do not mix
A keyword score and a cosine similarity live on different scales, and their distributions change with every query. Adding them, even with weights, lets whichever has the wider spread decide the result.
Ranks do
Reciprocal rank fusion ignores the scores and uses only the positions: each list gives every document a share that shrinks with its rank, and the shares are summed.
func Fuse(rankings [][]string, k float64) map[string]float64 {
fused := map[string]float64{}
for _, ranking := range rankings {
for rank, id := range ranking {
fused[id] += 1 / (k + float64(rank+1))
}
}
return fused
}
The constant k flattens the curve: the larger it is, the less the very top positions dominate.
What it does not fix
Fusion cannot recover a document that neither list returned. If recall is the problem, it has to be fixed in the retrievers themselves, before the fusion.