Hybrid Search, How Keyword and Vector Retrieval Work Together and When to Use Each

A support engineer types “PRN-2041 paper jam” into the help search box. The right page is the PRN-2041 troubleshooting guide, which never says “paper jam” in its title and calls the fault a “feed error” instead.
What follows is the full working picture. How the two methods work, how their lists are merged with real arithmetic, what the setup costs on a worked month, and how to measure whether the merge helped.
hybrid search is one query that runs keyword search and vector search side by side and merges the two ranked lists into a single ranking. Keyword search, usually scored with BM25, catches exact codes, names and part numbers. Vector search catches meaning, so a question phrased in different words still finds the right page.
If you would rather have this built and run as a service, let us discuss your project. Write to sales@denebly.com or call +1 (214) 896-2906.
What keyword plus vector search is, and what it is not
It is one query with two retrieval legs and a merge step. The keyword leg matches the words typed. The vector leg matches the meaning behind them. The merge step turns two ranked lists into one.
| What people think it is | What it actually is |
|---|---|
| Semantic search under a new name | Keyword search plus vector search, fused, with the keyword leg kept |
| Full-text search with better ranking | Two different indexes read at once, an inverted index and a vector index |
Google uses reciprocal rank fusion to merge semantic and keyword output, and its search service held a 91.31 percent market share in July 2026, according to StatCounter figures quoted by Meilisearch.
Keyword search alone, and where it fails
Keyword search matches the words in the query against an index of the words in each document, and scores each match with BM25. It is exact, fast and cheap. It fails the moment the searcher uses different words from the document.
BM25 scores a document on three things. How often the query term appears in it, how rare the term is across the whole collection, and how long the document is. Matching “2041” counts for far more than matching “the”.
| Query type | What goes wrong | Example |
|---|---|---|
| Synonym | The document uses a different word for the same thing | Searcher types “bill”, the page says “invoice” |
| Paraphrase | The question shares almost no words with the answer | “Printer eats paper” against a page about a “feed error” |
One quiet failure deserves a line of its own. If the analyzer at index time differs from the one at query time, a term can be indexed one way and searched another, and the match never happens.
Vector search alone, and where it fails
Vector search turns the query and each document into lists of numbers called embeddings, then returns the documents whose numbers sit closest to the query. It understands meaning. It fails the moment the answer turns on one exact string.
An embedding model is trained to place text with similar meaning near each other in a shared space, whatever words were used. Closeness is usually measured by cosine similarity, which looks at the angle between two vectors. The search runs over an approximate nearest neighbour index such as HNSW, which trades a little accuracy for speed.
The failure is the mirror image of keyword search. To an embedding model, two codes that differ by one digit look almost identical. A search for one product version returns pages about that product family in general, and the page about the exact version sits in the middle of the list.
| Query type | What goes wrong | Example |
|---|---|---|
| Product code | Near-identical codes sit next to each other in embedding space | PRN-2041 returns pages about PRN-2014 as well |
| Version number | Versions blur together | A search for v2.4.1 returns v2.4.2 pages |
Domain jargon makes it worse, because a model maps words it never saw in training poorly.

How the two lists become one ranking
The merge step is where the method earns its name. Each leg returns its own ranked list, and reciprocal rank fusion turns the two lists into one score per document, using rank positions only.
The formula is short. For each document, take 1 divided by 60 plus its rank in each list, and add the contributions together. The constant 60 comes from the original 2009 paper by Cormack, Clarke and Buttcher.
Ranks are used instead of scores because a BM25 score and a cosine similarity live on different scales and cannot be added. OpenSearch showed the problem plainly, with keyword scores of 8.002 to 11.999 against vector scores of 0.014 to 0.016 in one test. Microsoft Learn documents the same structure for its own search service, one query carrying a full-text part and a vector part, merged with reciprocal rank fusion.
Here is the arithmetic on a fictional support site, for the query “PRN-2041 paper jam”.
| Document | Keyword rank | Vector rank | RRF score |
|---|---|---|---|
| B, paper jam troubleshooting guide | 3 | 1 | 0.032266 |
| A, PRN-2041 user manual | 1 | 4 | 0.032018 |
| C, PRN-2041 driver download | 2 | 5 | 0.031514 |
| D, printer maintenance tips | 5 | 2 | 0.031514 |
| E, PRN-2041 warranty page | 4 | 3 | 0.031498 |
Doc B wins with 1 divided by 63 plus 1 divided by 61, which is 0.015873 plus 0.016393, giving 0.032266. Doc A is second at 0.032018. The manual won the keyword list outright, but the guide was liked by both legs.
Docs C and D tie at 0.031514, and the tie is broken by keyword rank, so C sits above D. The margin between first and second is small, 0.000248. That is the point of the constant 60. It rewards documents that show up steadily across lists. In the original TREC tests, reciprocal rank fusion beat the best single system by 4 to 5 percent on average.
Weighted score fusion, the dial you can turn
Weighted fusion keeps the raw scores, rescales each list to a 0 to 1 range, then takes a weighted sum. It gives you a dial, called alpha, and it costs you a tuning job.
The usual rescaling is min-max. Subtract the lowest score in the list, then divide by the range between the highest and lowest. The combined score is alpha times the vector score plus 1 minus alpha times the keyword score.
Take three documents with BM25 scores of 14.2, 9.8 and 6.1, and cosine similarities of 0.81, 0.62 and 0.45. Min-max turns the BM25 scores into 1.00, 0.46 and 0.00. With alpha at 0.5 the combined scores are 0.91, 0.54 and 0.23.
The weakness is fragility. Min-max depends on the highest and lowest score in the current result set, so one extreme outlier squashes everyone else. The right alpha also differs between query types, so it needs a labelled set of queries to tune on.
| Property | Reciprocal rank fusion | Weighted score fusion |
|---|---|---|
| Uses | Rank positions | Normalised scores |
| Tuning | Almost none, only the constant k | Weight alpha and the normalisation method |
| Keeps score size | No | Yes |
Start with reciprocal rank fusion, and move to weighted fusion only when you have at least 50 labelled queries and a reason to believe one leg should win more often.
Reranking, the second pass that sharpens the top results
Reranking is a separate stage after fusion. Fusion decides which 50 documents get considered. A cross-encoder then reads the query together with each candidate document and reorders them, and the top 5 go on to whatever consumes them.
Fusion is a recall stage. Its job is to make sure the right document is somewhere in the pile. Reranking is a precision stage. Its job is to put the best document first. A cross-encoder is accurate and slow, so scoring 50 is viable while scoring a whole collection is not.
You can ship without a reranker on a small corpus, and add one once the top 50 fills with near-duplicates. Measure precision at 5 before and after, and keep it only if the number moves.

When to use each method, and when to use one leg only
The choice turns on your query log. If it holds both exact strings and natural language questions, run both legs. If it holds only one kind, one leg is cheaper and just as good.
| Query type | Best method | Why |
|---|---|---|
| Error code pasted in full | Keyword only | Only an exact match answers it |
| Product code or SKU | Keyword only | Near-identical codes blur in vector space |
| How-to question in plain words | Vector only | The answer uses different words from the question |
| Mixed, code plus a question | Both legs | Each leg catches what the other misses |
Amazon gives the cleanest real example. Asked about the leased square footage for physical stores in North America as of December 31st 2023, the combined method retrieved the chunk holding the answer, 22,871 thousand square feet, while semantic search alone missed it.
Our LLM visibility work shows the same two-legged logic from the content side. Pages that qualify through both legs are the ones that get retrieved and cited, so exact names and clear meaning both belong on the page.
What it costs to run
The vector leg is the only part with a real bill. Embedding is measured in cents, storage in cents, and the monthly minimum is usually the number that decides the invoice.
Take a fictional docs site with 50,000 chunks of 500 tokens each, which is 25 million tokens to embed. At 0.02 dollars per million tokens, the one-time embedding bill is 0.50 dollars. Writing the vectors costs about 1.40 dollars one time, about 350,000 write units at 4 dollars per million.
| Line item | Arithmetic | Amount |
|---|---|---|
| Embedding, one time | 25 million tokens at 0.02 dollars per million | 0.50 dollars |
| Writes, one time | About 350,000 write units at 4 dollars per million | About 1.40 dollars |
| Storage, monthly | 0.3 GB at 0.33 dollars per GB | 0.10 dollars |
| Reads, monthly | 100,000 queries at 0.3 read units, at 16 dollars per million | 0.48 dollars |
| Metered monthly total | Storage plus reads | 0.58 dollars |
| Bill on the Standard plan | 50 dollar monthly minimum applies | 50 dollars |
The lesson is in the last two rows. The metered cost is 0.58 dollars a month, but the Standard plan bills a 50 dollar minimum, so 50 dollars is what you pay. At this size the free Starter tier covers the same load at zero, up to 2 GB of storage and 1 million reads a month.
One licensing trap is worth knowing before you pick an engine. On Elasticsearch, the reciprocal rank fusion retriever is gated to the Enterprise tier, and a Basic tier query with it returns a 403. OpenSearch ships the same features under an Apache 2.0 licence at no extra cost.
Check the price on the day you buy.
Measuring quality, recall, precision and nDCG
Measure on real queries with known good answers. Recall at 10 is the share of the known good documents in the top 10. Precision at 10 is the share of the top 10 that is actually good. nDCG at 10 also grades the order, so a good document at rank 1 counts for more than at rank 9.
Here is nDCG worked on five results with relevance grades of 3, 2, 3, 0 and 1. Each grade contributes 2 to the power of the grade minus 1, divided by the log base 2 of its rank plus 1. That gives 7.00 plus 1.89 plus 3.50 plus 0 plus 0.39, a discounted gain of 12.78. The ideal order of the same grades, 3, 3, 2, 1 and 0, gives 13.35. Divide the two and nDCG is 0.96.
Published benchmarks agree. OpenSearch ran the combined method against BM25 alone on seven datasets and measured nDCG at 10. The average gain over BM25 was 8.12 percent, and the gain over neural search alone was 15 percent. Trec-Covid rose from 0.6789 to 0.7376 and Quora from 0.789 to 0.8649, while latency rose 6 to 8 percent.
Run the test yourself before you tune anything. Collect 50 to 100 real queries with known good results, then compute recall at 10 for each leg alone and the fused result. If the fused result does not beat the best single leg on your data, the added index is not earning its cost. Anthropic found the same in its 2024 retrieval tests, where embeddings plus BM25 beat embeddings on their own.
Our AI overview tracking guide covers the same measurement habit on the visibility side. Pick the metric first, record the baseline, and judge the change against it rather than against a feeling.
The build plan, from first index to first live query
A working setup takes a week of part-time work for a small corpus. The steps below are in order.
- Read your query log and sort 100 real queries into exact strings and natural language. Output – counts by kind.
- Pick the corpus and cut it into chunks of 300 to 500 tokens, keeping headings with their text. Output – a chunk count and 10 chunks read.
- Embed the chunks with one model and store the vectors. Output – one vector per chunk.
- Build the keyword index on the same chunks, with the same analyzer at index and query time. Output – a keyword search that answers a pasted error code.
- Wire the fusion, reciprocal rank fusion with the constant at 60, and a window of 100 per leg. Output – one merged ranking for a test query.
- Add metadata filters for language, permission and publication state. Output – a query that cannot return a draft.
- Evaluate on 50 labelled queries and record recall at 10 for each leg and the merge. Output – a one-page table with the three numbers.
Filters deserve emphasis, because neither score understands correctness. A filter is a hard condition on the candidate set. Only documents in French, only documents the requesting user may see, only documents currently published. That only works if language, status and product line live as typed fields. Our structured outputs guide shows how typed fields make that half of the work tractable.
Go live only when the checklist is all true. The query log sorted, ten chunks read by a person, the same embedding model on both sides, the same analyzer at index and query time, a fusion window of 100 per leg, filters that block drafts, recall at 10 measured for each leg and the merge, and a reranker decision recorded.
Mistakes that sink retrieval quality
Most failed setups share the same five mistakes, each with its fix below.
- A weak leg dragged in. If the embedding model is a poor fit for your domain, fusing it in can drag down a keyword ranking that was already good. Fix – measure each leg alone first.
- A window size that is too small. A document ranked 40th by one leg and 3rd by the other never gets fused when the window is 20. Fix – start with a window of 100 per leg.
- No filters. Relevance ranking cannot express language, permission or publication state. Fix – typed fields and hard filters before fusion.
- Chunks cut in the wrong place. A chunk that splits a procedure in half answers neither half well. Fix – keep headings with their text and keep procedures whole.
- Never measuring. Teams ship the merge, feel good about it, and never learn it made things worse on their data. Fix – recall at 10 on 50 real queries, before and after.
Who should use it, and who should skip it
It fits teams whose users type both codes and questions, and it is the wrong spend for a search box that only ever sees one kind of query.
Use it for documentation and support search, where codes and questions arrive in the same queue. Use it for ecommerce, where SKUs sit next to descriptive queries. Use it for retrieval-augmented generation, where a miss on recall becomes a wrong answer.
Skip it when the content is short and always queried in natural language, because vector search alone may be enough. Skip it when users type only exact product IDs. The honest test is the test set, not the architecture diagram.
How Denebly builds it
Denebly builds retrieval as one connected system. The work starts with your query log and your content.
The deliverables are fixed before work starts. The sorted query log, the chunking rules, the embedding model choice, the fusion configuration, the reranker decision, and the 30-day numbers, recall at 10 on your own 50 queries, before and after.
The rule to work by
Count the exact strings in your query log, run the 50-query test, and let the numbers pick the method.
If you would rather hand the build and the first month of tuning to a team, let us discuss your project. Write to sales@denebly.com or call +1 (214) 896-2906.
Frequently asked questions
What is hybrid search
It is a retrieval method that runs a keyword query and a vector query on the same request and fuses the two result lists into one ranking. The keyword leg catches exact strings such as codes and names, the vector leg catches meaning.
Is it the same as semantic search
No. Semantic search usually means vector search alone, which understands meaning but can miss one exact identifier. The combined method keeps the keyword leg, so exact-term matching is retained.
What is reciprocal rank fusion
Reciprocal rank fusion, usually shortened to RRF, merges ranked lists by position instead of by score. Each document gets 1 divided by 60 plus its rank from every list it appears in, and the contributions are added up.
Do I need a reranker as well
Not always. Fusion improves recall, and a reranker improves the order within the top results. Many systems start with fusion only and add a cross-encoder when precision at the top matters.
How much does it cost to run
On the worked month in this article, embedding cost 0.50 dollars one time, storage 0.10 dollars a month and reads 0.48 dollars a month. The bill was still 50 dollars, because the Pinecone Standard plan has a 50 dollar monthly minimum.
When should I skip it
Skip it when your query log holds only one kind of query. If users type only exact product codes, keyword search alone is cheaper. If they type only natural language questions about a narrow topic, vector search alone is simpler.
Sources
- OpenSearch blog, search relevance benchmarks across seven datasets, read 27 November 2026.
- Microsoft Learn, Foundry IQ search overview, read 27 November 2026.
- AWS Machine Learning Blog, Bedrock Knowledge Bases, read 27 November 2026.
- Cormack, Clarke and Buttcher, SIGIR 2009, the reciprocal rank fusion paper.
- Anthropic, Contextual Retrieval write-up, 2024.
- Pinecone pricing page, serverless rates and plan minimums, read 27 November 2026.
- OpenAI pricing page, embedding rates, read 27 November 2026.
- StatCounter, Google Search market share, July 2026, quoted by Meilisearch.

WRITTEN BY
Arslan Mushtaq
Founder, Denebly
Arslan founded Denebly in 2018 and leads its AI development work for startups and mid-size businesses, across AI chatbots, agentic workflows, RAG systems, machine learning and automation. Denebly has delivered 100+ projects from Dallas, Texas.
Ready to Solve Your Business Problems With AI?
Tell us what you are trying to build, automate or fix. You will get an honest assessment within one business day, not a sales pitch.