Vector Hybrid Search
Vector search understands meaning. Keyword search matches exact words. Each method fails in situations where the other succeeds. Hybrid search runs both methods and merges their results into one ranked list.
Where Each Method Struggles
CASE 1: Exact codes
Query: "error E-4502"
Keyword search: finds the page with "E-4502" (strong)
Vector search: returns pages about errors (weak)
CASE 2: Meaning without shared words
Query: "how to make my laptop run faster"
Keyword search: misses a page titled "Improve PC performance" (weak)
Vector search: finds it by meaning (strong)
Product codes, names, abbreviations, and rare terms favor keyword search. Natural questions and paraphrases favor vector search. Real users type both kinds of queries.
Keyword Search in Brief
Keyword search counts how often query words appear in a document and how rare those words are across all documents. The most common scoring formula is BM25. A rare word such as "E-4502" earns a high score because few documents contain it.
The Hybrid Pipeline
HYBRID SEARCH FLOW
User query
/ \
v v
+-------------+ +-------------+
| Keyword | | Vector |
| search | | search |
| (BM25) | | (embeddings)|
+-------------+ +-------------+
\ /
v v
+----------------+
| Fusion step |
| merges lists |
+----------------+
|
v
Final ranked results
Merging Two Result Lists
The two methods produce scores on different scales, so you cannot add them directly. Two common solutions exist.
Reciprocal Rank Fusion
Reciprocal Rank Fusion, or RRF, ignores raw scores and uses only rank positions. Each document earns points based on its rank in each list.
RRF score = 1 / (k + rank) with k = 60
Document X: rank 1 in keyword list, rank 3 in vector list
= 1/(60+1) + 1/(60+3)
= 0.0164 + 0.0159
= 0.0323
Document Y: rank 2 in keyword list, rank 10 in vector list
= 1/(60+2) + 1/(60+10)
= 0.0161 + 0.0143
= 0.0304
Document X ranks above Document Y
Weighted Score Fusion
This method normalizes both score sets to a common range, then applies a weight.
final = (alpha x vector_score) + ((1 - alpha) x keyword_score)
alpha = 0.7 -> favors meaning
alpha = 0.3 -> favors exact words
Choosing the Balance
| Content Type | Suggested Lean |
|---|---|
| Customer support questions | More vector weight |
| Product catalogs with model numbers | More keyword weight |
| Legal and medical documents | Balanced mix |
| Source code search | More keyword weight |
| General knowledge articles | More vector weight |
Worked Example
Query: "reset router model RX-200"
Keyword results: 1. RX-200 Setup Guide
2. RX-200 Reset Steps
3. RX-100 Reset Steps
Vector results: 1. How to restore factory settings on a router
2. RX-200 Reset Steps
3. Fixing connection problems
After fusion: 1. RX-200 Reset Steps (strong in both)
2. RX-200 Setup Guide
3. How to restore factory settings on a router
The document that scores well in both lists rises to the top. That agreement gives hybrid search its reliability.
Implementation Tips
- Check whether your database supports hybrid queries natively before you build your own.
- Retrieve 20 to 50 candidates from each method before fusion.
- Start with RRF because it needs no score tuning.
- Build a test set of real queries and measure results for each balance setting.
- Apply metadata filters to both searches equally.
Hybrid search covers the weaknesses of each method. It handles exact identifiers and natural language in a single system, which makes it a standard choice for production search.
