Lesson 2.4
Hybrid Retrieval
Vector search finds meaning; keyword search finds exact terms. Hybrid retrieval uses both, because each catches what the other misses.
Two readers with opposite habits.
Imagine two people helping you search a manual. One reads for the gist: tell her what you mean and she finds the passage that is about that, even if it uses none of your words. The other has a photographic memory for exact strings: give him a part number and he finds every line that contains it, character for character. Each is brilliant at what the other is hopeless at. Hybrid retrieval is simply hiring both.
The gist reader is vector search (everything in this unit so far): it matches by meaning. The exact-string reader is keyword search, the old-school approach that scores a passage by how well its actual words overlap with the query (the classic version is called BM25). Most of this unit has been about the first. This lesson is about why you still want the second.
Vector search matches meaning; keyword search matches exact terms. Hybrid retrieval runs both and merges their results, so a passage wins if either reader flags it.
Where vectors quietly miss.
Vector search smooths everything into meaning, and that smoothing is exactly its blind spot. Some things have no "meaning" to generalize, they just are what they are, and the model never saw them often enough to place them well. When a query hinges on one of those, the closest-by-meaning passage can be the wrong one.
Keyword wins when the query is:
An exact code or id: error TS2304, part #A1-9920. The digits carry the whole meaning.
A proper name: the Vasquez account. Two names can mean nearly the same thing to a vector yet point at different people.
Rare jargon or an acronym the model barely saw: it has no good point for it, so similarity is noisy.
For all of these, an exact string match is dead simple and dead reliable. The word is either there or it is not.
Where keywords quietly miss.
The reverse is just as real. Keyword search is literal, so it only finds passages that share your actual words. The moment the answer is phrased differently, it is blind to it.
Vectors win when the query is:
A paraphrase: you ask how do I get my money back and the passage says refund policy. No shared words, same meaning.
A synonym: car vs automobile, laptop vs notebook. Keyword search treats them as unrelated.
A concept stated in plain language that the docs phrase formally, or in another register entirely.
This is exactly what vectors are good at. They put "money back" and "refund" near each other in meaning-space, so the right passage scores high even with zero word overlap.
Combining the two scores.
So you run both searches and you get two ranked lists: one by meaning, one by word overlap. Hybrid retrieval merges them into a single shortlist. The plain way to do it is to blend the scores: give each passage a combined score that is part vector score and part keyword score, then sort by that.
combined = (weight × vector score) + (1 − weight) × keyword score
The weight is a dial: lean toward vectors when your queries are conversational, toward keywords when they are full of codes and names. A passage that both readers like rises to the top; a passage only one of them caught still makes the list instead of being dropped. That is the whole payoff: you stop losing the exact-match hits and the paraphrase hits at the same time.
Blend the two scores into one, with a weight you tune to your queries. The point is coverage: a passage survives if either search found it, so neither blind spot sinks the result.
Key takeaways
Vector search matches meaning; keyword search (BM25) matches exact words. Each fails where the other is strong.
Keywords catch exact codes, names, and rare jargon; vectors catch paraphrases and synonyms with no shared words.
Hybrid retrieval blends both scores with a tunable weight, so a passage survives if either search found it.