How it works · 7 of 37 Core
What is hybrid search, and why combine keywords with vectors?
Meaning + exact words
Hybrid search: Combine meaning search with keyword search; each catches what the other misses.
Loading the animation…
Say it like this Hybrid search runs meaning search and keyword search together and merges the results, so a question finds the right page whether it quotes an exact code or uses its own words.
Under the hood — for builders
- The merge: Reciprocal Rank Fusion
- Each list gives a page 1 ÷ (60 + its rank); add the votes. Customer 1 (“Checkout shows error E-4012”), with this card's real ranks (right page in green):
- Real impact
- Anthropic's Contextual Retrieval tests (2024). Share of missed searches removed, higher is better:
- Keyword side: BM25
- The standard word-matching score: rewards pages sharing the question's rare words. Elasticsearch's default.
- Tune the mix
- Weaviate's alpha: 1 = pure meaning, 0 = pure keyword. Pick it with recall@k on your test questions.
- Tools
- Elasticsearch, OpenSearch, Weaviate, or Postgres full-text search plus pgvector.
- Watch out
- Some tokenizers split “E-4012” into pieces; check codes stay whole. Two searches cost more per question.
- Sources
- Cormack, Clarke & Büttcher, Reciprocal Rank Fusion (SIGIR 2009) · Anthropic, Contextual Retrieval (2024) · Elasticsearch docs.
What happens in the hybrid search animation, step by step?
- Two customers have the same problem. One quotes the exact error code; the other describes it in their own words. The right page for both: "E-4012: card declined".
- Meaning search understands customer 2. But a code like E-4012 carries little meaning, so for customer 1 the right page ranks only 4th: not in the top 3.
- Keyword search matches exact words, so it finds E-4012 for customer 1. But customer 2 never says "declined": it only matches "payment" and returns the wrong page.
- Hybrid search runs both and merges the lists. A page ranked high in either list rises, so both customers get the right page in their top 3.
- Your turn: switch between the three methods and compare the two customers.
What everyday example explains hybrid search?
Two librarians, one who gets what you mean, one who knows every catalogue number.
Why should a team care about hybrid search?
Product codes, names, laws and IDs need it.