Skip to content

AI Glossary · Concepts

What is Hybrid Search?

Hybrid Search

Hybrid search combines retrieval methods, commonly keyword search and vector similarity, into one ranked result set. It can help a system find both exact identifiers and passages that express the same idea in different words.

· Updated · Chain of Thought

RAG & Retrieval

  • 2 explainers
  • 3 episodes
  • 2 sources

A support question can contain an exact error code and an informal description of a symptom. Keyword search is useful for the code; semantic search can find a differently worded explanation. Combining the candidate lists can cover both needs.

The implementation must decide how to merge rankings or scores, deduplicate results, and apply filters. A weight favoring one retrieval path is a tuning choice, rather than a universal recipe. Compare performance on queries with identifiers as well as queries that require paraphrase matching.

Example: if an error-code question returns a generic troubleshooting article ahead of the specific fix, inspect the fusion and filters before replacing the answer model. A larger answer model does not repair that missing retrieval evidence.

Hybrid search selects candidates from multiple retrieval paths. Reranking scores an already retrieved candidate set more closely; it can follow hybrid retrieval. RAG then supplies selected evidence to a model that writes an answer. Test retrieval quality separately from the quality of that answer.

Fuse two short lists by rank

Keyword scores and vector similarities are not on a shared scale, so fusion either normalizes them or uses ranks alone. In Weaviate, relativeScoreFusion normalizes each search’s scores and rankedFusion uses positions; the effective weighting can depend on client and server version, so set it explicitly. Elastic’s reciprocal rank fusion adds 1 / (k + rank) from each list that contains a document, with ranks starting at 1 and nothing added when a document is absent. Elastic’s default k is 60; k = 10 keeps the arithmetic readable.

Keyword search returns A then B. Vector search returns B then C:

DocumentKeyword rankVector rankRRF score
A1none1/11 ≈ 0.0909
B211/12 + 1/11 = 23/132 ≈ 0.1742
Cnone21/12 ≈ 0.0833

B comes first because both lists found it, and the score orders documents without saying how likely any of them is to be relevant. Cut each list to its top result and A and B tie at 1/11, so the tie rule decides; a passage neither list returned cannot be fused back in. When an exact error code goes missing, read the two input lists, the window sizes and the filters before the fused order.

Sources

Go deeper

  • Elastic: Reciprocal rank fusion docs

    Work through the keyword and vector rankings to recalculate their fused order. Reading needs no cluster; running the requests requires Elasticsearch.

From the conversation