Why combining search methods beats picking just one, and how RRF quietly makes that possible.
Picture your users for a second. Some of them know exactly what they want and type it in plain keywords. Others have a vague idea, something they can describe but can't quite name, so they type in full sentences instead. If you've ever built a search bar, you've probably run into this tension already: optimize for one type of user and the other starts complaining that "search doesn't work."
That's really the whole reason hybrid search exists. Instead of betting everything on one retrieval method and hoping it generalizes, you let two (or more) methods work together, each covering for the other's blind spots.
Dense vectors come from neural models trained to understand meaning, not just words. Ask for an "elevator" or a "lift," and the model knows you want to go up a floor, even though the two words share no letters. It might even throw in "escalator" or "stairs," since they solve roughly the same problem.
This is also why dense search tends to work surprisingly well across languages. A multilingual model can connect "elevator" in English with "ascensor" in Spanish or "der Aufzug" in German, because under the hood, it's matching the idea, not the spelling.
Sparse vectors do the opposite job, and that's a good thing. They're built for situations where you need an exact match, not a "close enough" one. Think keyword search, but smarter. If you're shopping for a charger and you know the exact model number of your phone, you don't want a dozen "similar" chargers for other devices. You want that one. That's where sparse, lexical-style search shines and dense search quietly fails.
Here's a scenario that makes the tradeoff obvious: a legal search tool. Lawyers often know exactly which section or paragraph of a law they're after, so lexical search suits them fine. Someone without legal training, though, is more likely to describe their situation in plain language, which is exactly where dense search earns its keep. And then there's the messy middle ground: someone who remembers the name of the act but not the specific clause. No single method handles all three of these people well, which is sort of the whole point.
There isn't one official definition floating around, but loosely, a pipeline counts as "hybrid" the moment it leans on two or more retrieval methods instead of one. A common shape looks like this:
You'll see this retriever-plus-reranker pattern again and again as pipelines get more sophisticated, where a fast, rough method narrows the field first and a slower, sharper method cleans up the order afterward.
Most vector databases support some version of this. I'll be using Qdrant for the code in this post, mainly because its query API makes chaining and fusing methods refreshingly simple in a single call, but none of the ideas here are Qdrant-specific. Swap in whatever search stack you're using and the logic carries over just fine.
Qdrant rolled all of this into something called the Universal Query API back in version 1.10. Before that, you'd be juggling multiple calls; now it's one. Here's what a basic retrieve-then-rerank pipeline looks like in practice.
from qdrant_client import QdrantClient, models
client = QdrantClient(...)
client.query_points(
collection_name="my_collection",
prefetch=[
models.Prefetch(
query=models.Document(
text=query,
model="sentence-transformers/all-MiniLM-L6-v2",
),
using="dense",
limit=20,
),
],
query=models.Document(
text=query,
model="Qdrant/bm25",
),
using="sparse",
limit=20,
)
What's happening here: dense search grabs the first 20 candidates, and sparse scoring then reshuffles just those 20. It never looks beyond that initial shortlist, which is worth keeping in mind, we'll come back to why that matters in a moment.
from qdrant_client import QdrantClient, models
client = QdrantClient(...)
client.query_points(
collection_name="my_collection",
prefetch=[
models.Prefetch(
query=models.Document(
text=query,
model="Qdrant/bm25",
),
using="sparse",
limit=20,
),
],
query=models.Document(
text=query,
model="sentence-transformers/all-MiniLM-L6-v2",
),
using="dense",
limit=20,
)
Here's the catch with running methods one after another: whichever one goes first decides the entire pool of candidates the second one gets to work with. If something is a perfect lexical match but dense search just doesn't rank it highly, and dense search runs first, that document is gone before sparse search ever gets a say. It's not reranked poorly, it's never even considered.
So the question becomes: what if we didn't have to choose an order at all? What if both signals could weigh in from the start?
This is where things get a little tricky. Each method hands back its own scores, and those scores aren't really comparable. Dense cosine similarity tops out at 1. BM25, the typical sparse scoring method, has no upper limit at all. So if dense search gives you a 0.9 and sparse search gives you a 10.7, which one's "better"? There's genuinely no fair way to answer that by just looking at the numbers.
Fusion algorithms exist precisely to dodge this problem, and the one you'll run into most often is Reciprocal Rank Fusion, or RRF.
RRF's trick is simple: ignore the raw scores entirely and look only at where each document landed, its rank, within each method's results. First place, second place, and so on. Then it builds a brand-new combined score out of just those rankings.
Breaking that down: d is the document being scored, n is how many retrieval methods you're combining (two, in our dense-plus-sparse setup), and rank_i(d) is wherever that document ended up in method i's list. You do this for every document, across every method, and add it all up. The constant k, usually set to 60, controls how much weight the top spots get versus everything below them. A smaller k makes the top ranks dominate; a bigger k spreads the influence more evenly down the list.
Let's make this concrete. Say dense search returns:
And sparse search comes back with:
Plug those ranks into the formula with k=60, and here's what falls out:
| Document | Dense Rank | Dense RRF | Sparse Rank | Sparse RRF | Total RRF | Final Rank |
|---|---|---|---|---|---|---|
| D1 | 1 | 0.0164 | 3 | 0.0159 | 0.0323 | 1 |
| D2 | 2 | 0.0161 | 4 | 0.0156 | 0.0317 | 3 |
| D3 | 3 | 0.0159 | 2 | 0.0161 | 0.0320 | 2 |
| D4 | 4 | 0.0156 | n/a | 0 | 0.0156 | 5 |
| D5 | n/a | 0 | 1 | 0.0164 | 0.0164 | 4 |
The nice part is you don't have to do any of that math yourself. It's built right in:
from qdrant_client import QdrantClient, models
client = QdrantClient(...)
client.query_points(
collection_name="my_collection",
prefetch=[
models.Prefetch(
query=models.Document(
text=query,
model="sentence-transformers/all-MiniLM-L6-v2",
),
using="dense",
limit=20,
),
models.Prefetch(
query=models.Document(
text=query,
model="Qdrant/bm25",
),
using="sparse",
limit=20,
),
],
query=models.FusionQuery(fusion=models.Fusion.RRF),
limit=10,
)
This grabs 20 candidates from dense search and 20 from sparse search, fuses the two ranked lists with RRF, and hands you back the top 10 overall. And if you want to get fancier, you can nest prefetch steps inside each other and apply fusion at more than one level.
Fusion isn't the only trick in this space, just a popular one. Some setups go a different route: a handful of fast, "good enough" retrievers feed candidates into one much stronger reranker. That reranker might be a cross-encoder, a heavier dense model that would be too slow to run over an entire collection, a multivector approach like ColBERT, or even hand-written business rules specific to your use case.
"Reranking" is really just the umbrella term for anything that takes a first pass at results and reorders them. Fusion happens to be a clean, well-supported way to do that, but it's one option among several, not the only correct answer.
At the end of the day, hybrid search isn't really about choosing dense over sparse, or the other way around. It's about accepting that your users won't all type the same way, and refusing to force a single tradeoff onto all of them. RRF gives you a tidy, score-agnostic way to let both signals speak at once, and since it's built into tools like Qdrant, you get it almost for free, no manual rank math required.