What Is Hybrid Search, and How Does It Work?
Hybrid search mixes keyword search with vector search, then ranks the combined results. Learn how the two methods work together and when the mix wins.
On this page
Short answer
Hybrid search is a search method that combines keyword search with vector search and merges the two result lists into one ranking. Keyword search finds documents that contain the exact words in the query, while vector search finds documents that mean the same thing even when they use different words. By combining both, hybrid search catches exact matches and meaning matches in a single query.
What is hybrid search?
Hybrid search is a search method that runs a keyword search and a vector search for the same query, then merges the two result lists into one ranking. Keyword search matches the exact words in the query, while vector search compares the meaning of the query with the meaning of each document, using number lists called embeddings.
Keyword search is precise. If you search for an invoice number, a product code or a person's name, keyword search finds the exact document. Vector search is flexible. If you search for "how do I change my plan", it can find a help page titled "switching your subscription" even though none of the words match.
Each method misses things the other catches. Keyword search misses documents that use different words for the same idea. Vector search can miss exact terms such as codes, names and numbers, and it can return documents that sound related but do not contain the answer. Hybrid search runs both and combines the scores, so a document that ranks well in either method can reach the top.
| Method | What it matches | Best for |
|---|---|---|
| Keyword search | Exact words and phrases | Codes, names, numbers |
| Vector search | Meaning and synonyms | Questions in plain words |
| Hybrid search | Words and meaning together | Mixed queries in real systems |
Hybrid search is now the usual choice for search inside products, help centres and AI assistants. For the retrieval pattern it often supports, retrieval-augmented generation explains how search results feed an AI answer.
How does keyword search work?
Keyword search works by indexing the words in each document and scoring documents by how often and how prominently the query words appear. A common scoring method is BM25, which gives more weight to rare words and to words that appear in the title or headings, and less weight to words that appear everywhere.
The strength of keyword search is control. You can search for an exact phrase, a code or a name, and you know why a document matched: the words are there. The weakness is vocabulary. A user who writes "refund" will not find a document that only says "repayment", and a user who writes "laptop won't start" will not find a page titled "boot failure".
Keyword search also struggles with long questions. A ten-word question contains words that pull in different directions, and the scoring can favour a document that happens to contain several of them over the document that actually answers the question.
How does vector search work?
Vector search works by turning the query and each document into embeddings, which are lists of numbers that capture meaning. Documents with similar meanings have embeddings that sit close together, so the search finds the nearest ones even when the words differ.
The strength of vector search is that it understands intent. A query about "changing my plan" can match a page about "switching subscriptions", and a query about "slow app" can match a page about "performance problems". It also handles synonyms and different phrasings without any manual rules.
The weakness is precision. Vector search can return documents that are topically close but do not contain the answer, and it can miss exact terms such as invoice numbers, product codes and people's names. It also needs an embedding model, which adds cost and a step that can go stale when content changes.
How does hybrid search combine the two?
Hybrid search combines the two methods by running both searches and merging their scores into one ranking. There are two common ways to merge: weighted scoring and reciprocal rank fusion.
Weighted scoring adds the keyword score and the vector score together, each multiplied by a weight. If keyword matches matter more for your data, you give keyword search a higher weight; if meaning matters more, you weight vector search higher. The weights are set by testing on real queries, not by guessing.
Reciprocal rank fusion ignores the raw scores and works from the rank of each document in each list. A document that ranks third in keyword search and fifth in vector search gets a combined score from both ranks, so a document that does well in both lists rises to the top. This method is popular because it needs no tuning of weights and works even when the two scores are on different scales.
| Step | What happens | What to check |
|---|---|---|
| Run keyword search | Find exact word matches | Codes and names rank first |
| Run vector search | Find meaning matches | Synonyms and paraphrases rank first |
| Merge the lists | Combine scores or ranks | Top results cover both kinds |
| Re-rank if needed | Score the top results again | Best answer is first, not just close |
Some systems add a re-ranking step, where a second model scores the top ten or twenty results in more detail and reorders them. Re-ranking costs more, so it is usually applied only to the shortlist, not to the whole index.
When should you use hybrid search?
Hybrid search fits when your users mix exact terms and plain-word questions, which is most real search. Help centres, product search, internal wikis and AI assistants all see both kinds of queries, so the mix usually beats either method alone.
It is most useful when the content is messy: documents written by different teams, with different terms for the same thing, plus codes, names and numbers that must match exactly. If your users only search by code or only ask questions in plain words, one method may be enough, and the extra complexity is not worth it.
Cost is the main trade-off. Hybrid search needs both an index and an embedding model, and it runs two searches per query. For a small site with a few hundred pages, keyword search alone is often fine. For a large help centre or a product with thousands of documents, the better results are usually worth the extra work.
How do you build hybrid search in 5 steps?
Building hybrid search is a small project, not a single setting. The steps below give a workable order.
- Index the content for keywords. Store titles, headings and body text in a search index, and decide which fields matter most, such as title over body.
- Generate embeddings. Turn each document, or each chunk of a long document, into an embedding with a model, and store the vectors alongside the text.
- Run both searches per query. For each query, run keyword search and vector search, and return the top results from each, usually the top twenty.
- Merge and tune the weights. Combine the lists with weighted scoring or rank fusion, then test on real queries and adjust the weights until exact terms and meaning both rank well.
- Measure and keep the index fresh. Track which results users click and which queries return nothing, and rebuild embeddings when content changes.
Start with a small set of real queries from your logs, and test the merge on those before you tune for the whole system. If you are building an AI assistant on top of search, how to build an AI proof of concept covers how to test the idea cheaply first.
Example (hypothetical): a support team tests hybrid search
Example (hypothetical): a support team has 200 common questions and a help centre with 400 articles. It tests three search methods on the same 200 questions and counts how many return the right article first.
Keyword search alone returns the right article first for 128 of the 200 questions, which is 64%. It does well on questions with product names and error codes, but poorly on questions asked in plain words. Vector search alone returns the right article first for 140 of the 200, which is 70%. It does well on plain-word questions, but misses questions that contain an exact code or name.
Hybrid search, using rank fusion, returns the right article first for 164 of the 200 questions, which is 82%. The gain comes from questions where one method found the article and the other did not. The team keeps the hybrid setup and adds a re-ranking step for the top ten results, which lifts the score to 172 of 200, or 86%.
What are the common mistakes?
The most common mistakes with hybrid search are skipping the tuning step, letting embeddings go stale, and judging the system by feel instead of by measurement.
- Using default weights. The right balance between keyword and vector search depends on your content. Test on real queries and adjust.
- Stale embeddings. If the text changes and the vectors do not, search returns old answers. Rebuild embeddings when content changes.
- Chunks that are too long. A long document chunk mixes several topics, so its embedding matches nothing well. Split content into focused chunks.
- No measurement. Without a test set of real queries, you cannot tell whether a change helped. Keep a fixed test set and score every change against it.
- Ignoring exact terms. If your users search by codes and names, keyword search must carry enough weight, or those queries will fail.
Key takeaways
- Hybrid search runs keyword and vector search together and merges the results
- Keyword search wins on exact terms such as codes and names; vector search wins on meaning
- Rank fusion merges the two lists without needing tuned weights
- Test the merge on real queries from your logs before you tune
- Rebuild embeddings when content changes, or search returns stale answers
Frequently asked questions
Is hybrid search better than vector search alone?
Usually yes for mixed queries, because vector search can miss exact terms such as codes and names. Hybrid search adds keyword matching, so both kinds of query work. If your users only ask plain-word questions, vector search alone can be enough.
What is reciprocal rank fusion?
Reciprocal rank fusion is a way to merge two search result lists by rank instead of by score. A document that ranks well in both lists rises to the top, and the method needs no weight tuning. It is a common choice for hybrid search.
Does hybrid search need an embedding model?
Yes, for the vector part. The embedding model turns queries and documents into number lists that capture meaning. You can use a hosted model or run one yourself, and you must rebuild embeddings when the content changes.
How do I choose the weights for hybrid search?
Start with equal weights and test on real queries from your logs. If exact-term queries fail, raise the keyword weight. If plain-word questions fail, raise the vector weight. Keep a fixed test set so you can measure each change.
Is hybrid search expensive to run?
It costs more than keyword search alone, because you pay for embeddings and run two searches per query. For most products the cost is small next to the value of better results, but for a small site keyword search alone may be enough.
Can hybrid search work with an AI assistant?
Yes. Hybrid search is the usual retrieval step behind AI assistants that answer from company documents. The search finds the right passages, and the model writes the answer from them, which keeps the answer grounded in your content.