Book a free call

Hybrid Search Best Practices for Accurate Retrieval

Hybrid search blends keyword matching with vector similarity so retrieval catches terms and meaning at once. These practices cover scoring, tuning and measurement.

Hertiv engineering teamReviewed by a senior engineer
7 min read
Hybrid Search Best Practices for Accurate Retrieval
On this page

Short answer

Hybrid search is a retrieval method that runs a keyword search and a vector search over the same content, then merges the two result lists into one ranked list. It works because keyword search catches exact terms such as product codes and names, while vector search catches meaning when the wording differs. Results come from tuning the mix on your own data and measuring recall on a fixed test set.

Hybrid search is a retrieval method that combines keyword matching with vector similarity in a single query, so the same question is answered by two different kinds of matching at once. Keyword search scores documents by the exact terms they contain, while vector search scores them by how close their meaning is to the question.

Each method on its own has a blind spot. Keyword search misses documents that say the same thing in different words, and it ranks a document full of a repeated term above a more useful one. Vector search handles wording differences well, but it can miss exact codes, names and numbers that matter more than meaning. Hybrid search exists to cover both gaps.

MethodWhat it matchesStrengthWeakness
Keyword searchExact terms and codesPrecise on names and numbersMisses reworded content
Vector searchMeaning and phrasingFinds reworded contentWeak on exact codes
Hybrid searchBoth at onceBest overall recallNeeds tuning and testing

The combination only helps when the two result lists are merged well. A simple merge that favours one side will behave like that side alone. For the basics of the method, see what hybrid search is.

When does hybrid search help most?

Hybrid search helps most when your content mixes exact identifiers with natural language, and when users ask questions in words that differ from the documents. Support knowledge bases, product documentation and legal collections are the usual cases.

It pays off when queries include part numbers, error codes, regulation references or person names alongside a plain-language question. A vector search alone may return a well-written page about a different product, while a keyword search alone may miss the page that explains the idea in other words. The merged list keeps both kinds of hit in play.

It helps less when the content is short and uniform, such as a FAQ set where every answer uses the same terms, or when one method already returns the right document nearly every time. In that case the extra machinery adds tuning work without changing the answers. Check your baseline first: if keyword search alone already answers most test questions, hybrid search is a refinement, not a fix.

How do you combine keyword and vector scores?

You combine keyword and vector scores by turning each method's ranking into a shared scale and then adding the two, because raw scores from different methods cannot be added directly. The standard approach is reciprocal rank fusion, which scores a document by its position in each list rather than by its raw score.

Reciprocal rank fusion gives each document a score based on one divided by a constant plus its rank in each list, then adds the two scores. A document ranked first by both methods scores highest, while a document ranked well by only one method still appears. The constant, usually around 60, controls how much the top ranks dominate.

Alternatives include normalising both score ranges to zero-to-one and adding them with a weight, or taking the union of the top results from each side and re-ranking the combined set with a cross-encoder model. Normalised addition is simpler to explain, while re-ranking usually gives the best final order at the cost of more compute. A step-by-step build is in how to implement hybrid search.

How do you tune the mix for your data?

You tune the mix by testing different weights on a fixed set of real questions with known good answers, and keeping the weight that returns the most correct documents in the top results. Guessing the weight from intuition is the most common way to get a worse system than either method alone.

Start with an even split, then move the weight in steps: try keyword-heavy, even and vector-heavy mixes and record recall at five and at ten results for each. The right balance depends on your content. Collections full of codes and names usually need more keyword weight, while collections of prose usually need more vector weight.

Keep the test set fixed while you tune, and keep it separate from any examples you used while building the system. If the test questions change every time you try a new weight, you cannot tell whether the weight or the questions caused the change. The practices in semantic search best practices apply here too, since the vector side of the mix is a semantic search.

What should your chunks and indexes look like?

Your chunks and indexes should be built so both methods see the same content in the same pieces, because a keyword hit and a vector hit on different chunks of the same page cannot be merged cleanly. Split documents into chunks of a few hundred words, keep headings and context with each chunk, and index both representations from the same chunk.

Chunk size matters more than most teams expect. Chunks that are too small lose the context that makes a passage useful, while chunks that are too large dilute the vector score with unrelated text. A practical starting point is 300 to 500 words with a small overlap between neighbours, then adjust based on your test results.

On the index side, keep the keyword index and the vector index in step: when a document changes, update both. A stale vector index that still points at an old version of a page will return answers that no longer exist, and the keyword side cannot fix that. For the vector side, see what a vector database is.

How do you measure whether hybrid search works?

You measure hybrid search by recall and precision on a fixed test set of real questions with known good answers, comparing the hybrid results against each method alone. If the hybrid mix does not beat both baselines, the fusion or the weights need work.

Recall at five is the most useful single number: the share of test questions for which a correct document appears in the top five results. Also track precision at five, which is the share of the top five results that are actually relevant, and watch both numbers as you change weights. A mix that raises recall but fills the top five with near-misses is not an improvement.

Build the test set from real user questions, not from questions you invent to fit the system. Log failed queries from production, label the correct document for each, and add them to the set. The measurement habits in advanced RAG techniques carry over directly, since hybrid search is usually the retrieval step of a RAG system.

Example (hypothetical): a support search that misses product codes

Example (hypothetical): a support team runs a search over 4,000 help articles. Users often ask questions such as "how do I reset the ZX-400", where the model code matters more than the words around it. Vector search alone returns a well-written reset guide for a different model, because the wording is similar. Keyword search alone finds the ZX-400 page but misses the troubleshooting article that explains the reset in other words.

The team builds a hybrid search with reciprocal rank fusion and a fixed test set of 120 real questions with known good answers. Keyword search alone answers 74 of the 120 in the top five, vector search alone answers 81, and the hybrid mix answers 102. That is recall at five of 62 percent, 68 percent and 85 percent.

The team then tries three weights. A keyword-heavy mix answers 96, an even mix answers 102, and a vector-heavy mix answers 99. They keep the even mix and add the 18 still-failing questions to a review queue, where they find that 11 of them need a missing article rather than better search. The fix is new content, not more tuning.

What are the common mistakes?

The most common hybrid search mistakes are adding raw scores from two different scales, tuning without a fixed test set, and splitting content differently for each index. Each one silently makes the merged list worse than a single method.

  • Adding raw scores. A keyword score and a vector score use different scales, so adding them directly lets one method dominate. Use rank fusion or normalised scores instead.
  • No fixed test set. Tuning weights by trying live queries and judging by feel produces a mix that works for the queries you tried and fails on the rest.
  • Different chunking per index. If the keyword index and the vector index split documents differently, the same page competes with itself and the merge becomes noise.
  • Skipping the baseline. If you never measure each method alone, you cannot tell whether the hybrid mix actually helps.
  • Ignoring freshness. An index that lags behind the documents returns answers that no longer exist, whatever the fusion method.

Fix the measurement first, then the weights. The operating habits in RAG best practices are a good checklist for the retrieval step as a whole.

Key takeaways

  • Hybrid search merges keyword and vector results so exact terms and meaning both count
  • Rank fusion beats adding raw scores, because the two methods use different scales
  • Tune the mix on a fixed test set of real questions, and keep the set unchanged while you tune
  • Chunk once and index both representations from the same chunks
  • Measure recall at five against each method alone before calling the mix an improvement

Frequently asked questions

What is hybrid search in simple terms?

Hybrid search runs a keyword search and a vector search over the same content, then merges the two ranked lists into one. Keyword search catches exact terms such as product codes and names, while vector search catches meaning when the wording differs. The merged list keeps the strengths of both.

Is hybrid search better than vector search alone?

It usually is when your content mixes exact identifiers with natural language, such as support articles with product codes. Vector search alone can miss exact codes, and keyword search alone misses reworded content. Test both on your own questions before deciding, since the gain depends on your data.

What is reciprocal rank fusion?

Reciprocal rank fusion is a way to merge two ranked lists by position rather than by raw score. Each document gets a score based on one divided by a constant plus its rank in each list, and the two scores are added. A document ranked well by both methods scores highest.

How do you pick the keyword and vector weights?

Try a few mixes, such as keyword-heavy, even and vector-heavy, and measure recall at five on a fixed test set of real questions. Keep the weight that returns the most correct documents in the top five. Collections full of codes usually need more keyword weight.

Do you need a vector database for hybrid search?

You need a store that can run both a keyword index and a vector index over the same chunks, and keep both in step when documents change. That can be a search engine with vector support or a vector database with keyword filtering. The choice matters less than keeping the two indexes aligned.

What is the most common hybrid search mistake?

Adding raw keyword and vector scores together is the most common mistake, because the two scores use different scales and one method ends up dominating the merge. Use rank fusion or normalised scores instead, and always measure the mix against each method alone.

Found this useful? Share it.
Hertiv engineering team

Written from projects we build for clients: AI and agent systems in production. Every post is reviewed by a senior engineer before publishing and updated when practice changes.

About HertivHow we work

Building a hybrid search that actually beats keyword search alone? Talk to Hertiv.

A senior engineer replies within one business day. Or see our RAG Development service.

Book a free call

Keep reading

All posts

Tell us what you want to build

A senior engineer reads every request and replies within one business day with questions, a rough range, or a call link.

  • NDA on request before any details
  • You own all code, models and IP
  • US, UK and EU time-zone overlap

Your email app should open with your message ready to send. If it does not, write to contact@hertiv.com.

Prefer email? Write to contact@hertiv.com
Estimate costBook a call