juppiter journal juppiter.com RSS

Retrieval and context

Hybrid Search vs Semantic Search vs Keyword Search: What Each One Finds

Hybrid search vs semantic search: keyword search finds exact terms, semantic search finds meaning, and hybrid search pools both. What each finds.

Dark title card reading Hybrid search vs semantic search with two ranked lists merging into one.

Hybrid search combines two kinds of search and merges the results into one list: keyword search, which finds the exact words you typed, and semantic search, which finds text that means the same thing even when the words differ. Semantic search alone can miss exact names, codes and identifiers. Keyword search alone can miss a passage that says the same thing in different words. Hybrid search runs both, then fuses and often reranks the results, so a question can be answered by either kind of match.

This post is written for the COOs, CTOs, heads of data and research, portfolio managers and analysts at hedge funds, family offices and private equity funds. Knowledge Graph vs Vector Database for AI compares knowledge graphs and vector databases. This post covers the search methods that sit underneath retrieval for AI. What the model finally sees is the subject of What Is Context Engineering?, our full guide to the topic. For the basics of retrieval over documents, see What Is RAG?.

Keyword search, also called lexical search, matches the words in a query against the words in documents. The most widely used ranking function for it is BM25. Anthropic describes BM25 as "a ranking function that uses lexical matching to find precise word or phrase matches", and as "particularly effective for queries that include unique identifiers or technical terms."

BM25 builds on an older idea, TF-IDF, which measures how important a word is to a document within a collection. As Anthropic and Weaviate both explain, BM25 refines it by accounting for document length and by making sure that repeating a word many times does not let common words dominate. A rare word that appears in a few documents counts for more than a common word that appears in all of them.

Keyword search is fast, predictable and easy to explain: a document matched because it contains the term. Its weakness is the same property. If the document uses a different word for the same idea, the match does not happen.

Semantic search vs keyword search: examples

Semantic search works on meaning. An embedding model turns text into a list of numbers so that passages with similar meanings end up close together. The query gets the same treatment, and the system returns the passages whose numbers are closest.

Weaviate gives a clean example: the query "How to catch an Alaskan Pollock." Dense vectors can tell that "catch" means fishing, not baseball or an illness, while keyword matching on its own would only match the phrase "Alaskan Pollock." Anthropic gives the opposite example. For a query such as "Error code TS-999", an embedding model "might find content about error codes in general, but could miss the exact 'TS-999' match", whereas BM25 looks for that specific string.

Here are three illustrative cases, one for each kind of firm. They are made-up examples for explanation, not real queries or results.

  • Where keyword search wins (hedge fund). An analyst searches for a ticker, a deal code name or a document reference number, such as "Project Larkspur" or "IC-0417." The exact string is the whole point. A semantic search might return thoughtful passages about other names, because a code name carries little meaning an embedding can use.
  • Where semantic search wins (family office). The office asks which manager letters discuss slower distributions. The letters never use that phrase. They say "extended wind-down timeline" or "revised realization schedule." There is no word overlap to match, but the meaning is the same.
  • Where you need both (private equity). A partner asks which past memos raised concerns about customer concentration, and wants the ones for a named portfolio company. The memos say "a small number of accounts drive most of the revenue," which is a meaning match, while the portfolio company's name is an exact match. Either method alone returns half of what the partner wants.

Neither failure is a defect. Each method is built for one kind of match. That is the case for using both.

Diagram. Three cases: keyword search wins for exact strings like a project code name, semantic search wins when wording differs such as slower distributions versus extended wind-down timeline, and some questions need both.

The terms are often used interchangeably, and some sources do. Weaviate, for instance, writes "semantic search (vector search)" for retrieval by embedding. A useful way to separate them: semantic search names the goal, finding by meaning, while vector search names the usual mechanism, comparing embeddings by distance. Pinecone describes that mechanism as approximate nearest neighbor search, where the main trade-off is between accuracy and speed.

For a buyer, the practical point is that "we use vector search" says how the system matches, not how good the results will be. The quality depends on the embedding model, on how documents are split into segments, and on what is done with the results afterward.

What is hybrid search and how does it work?

Weaviate defines hybrid search as a technique that combines multiple search algorithms, using the best features of keyword-based search and vector search. In its implementation, a vector search and a keyword search run in parallel, and a fusion algorithm combines the two ranked lists into a single list.

Two families of fusion are in common use, and Weaviate describes both:

  • Rank-based fusion, such as reciprocal rank fusion. It uses only each result's position in each list and discards the scores. A document ranked high in both lists rises to the top.
  • Score-based fusion. It keeps the scores, normalizes each list to a common scale, and adds the weighted results. This preserves information about whether result one beat result two by a mile or by a hair.

The reason to fuse by position or by normalized score is that the two searches speak different languages. A keyword score and a similarity distance are not on the same scale, so they cannot simply be added.

Anthropic's description of a RAG system with both is a good summary of the pipeline: break documents into chunks, use BM25 to find top chunks by exact match, use embeddings to find top chunks by meaning, combine and deduplicate the results with rank fusion, and pass the top chunks to the model. In Anthropic's own tests, embeddings plus BM25 was better than embeddings alone, across the datasets it tried.

Diagram. A question splits into keyword search for exact terms and semantic search for meaning. The results are fused into one list, reranked, and the top passages go to the model.

Hybrid search reranking

Fusion produces one list. Reranking decides its final order.

A reranker takes the query and each candidate passage together and scores how relevant the passage is to that specific query. The first-stage searches are built to cover everything quickly. Reranking adds work at query time, so it is usually applied to a shortlist. Anthropic's recommended steps: retrieve an initial set of candidates, pass them with the query through a reranking model, score each, and select the top ones for the model. Anthropic found that reranking beat no reranking in its tests. It also notes that reranking adds some latency and cost, so there is a trade-off between reranking more candidates and reranking fewer.

Order matters because a language model does not use its input evenly. In "Lost in the Middle," Liu and colleagues found that performance is often highest when the relevant information sits at the beginning or the end of the input, and degrades significantly when it sits in the middle of a long context. A reranked list puts the best evidence where the model is most likely to use it, and keeps weak passages from crowding the context.

Hybrid search vs semantic search: which should you use?

Use semantic search alone when your questions are about ideas, your documents vary widely in wording, and exact identifiers rarely decide the answer. Use keyword search alone when people search by known terms and need predictable, explainable matches. Use hybrid search when both kinds of question occur, which is common with a firm's documents.

Firm documents are an easy fit for hybrid. They mix names, tickers, deal code names and reference numbers, where exact matching matters, with analysis and commentary, where meaning matters. A single method forces a choice, and hybrid search lets each question be answered by whichever match fits. Think of the hedge fund analyst's ticker, the family office's manager letters and the deal team's memos all being searched in the same system.

Hybrid search for RAG over internal documents

In RAG, retrieval sets the ceiling on answer quality. If the passage that holds the answer is never retrieved, no model can use it, and if the right passage is buried under near misses, the model may rely on the wrong one. Hybrid search lifts the ceiling by giving the system two ways to find the passage. Reranking then decides which passages the model actually sees, and in what order.

A few things are worth checking in any hybrid system over internal documents:

  • How documents are split. A chunk that says "revenue grew by 3% over the previous quarter" with no company or period is hard to retrieve by either method. Anthropic's Contextual Retrieval work adds a short explanation of where each chunk comes from before it is indexed, for this reason.
  • What the keyword arm searches. Plain BM25 over all text is one choice. Searching over structured entities is another.
  • How results are fused and reranked. Ask what happens to a result found by only one of the two searches.
  • How many results go to the model. More is not better. That question belongs to context engineering.

How hybrid retrieval works in a knowledge engine

juppiter is a knowledge engine that securely organizes your firm data for fast and efficient access for your AI workflows. Its Features page describes its hybrid retrieval this way: graph search over the relevant entities runs alongside a semantic search of the embeddings, and the results are pooled and reranked, then returned as context.

The Features page describes the lexical side differently from the usual setup of BM25 over the text. It calls it an ontology-based lexical search over a relevant subgraph, meaning the entities and connections that matter to the question. That is the knowledge graph from part 1 put to work in the search itself. The Features page also describes four query effort levels, low, standard, high and max. Low is a single quick pass, and the higher levels plan the question more carefully and run more retrieval loops when the question is harder. Tied back to the cases above:

  • Exact terms and meaning in one question. "Graph search over the relevant entities runs alongside a semantic search of the embeddings," so the portfolio company's name and the concentration wording can both count.
  • The order the model sees. "The results are pooled and reranked, then returned as context," so the best evidence is not left to chance.
  • Names that vary. "Different references to the same company land on one entity," so a search on a ticker is not defeated by a trade name or a former name.
  • Speed against depth. Four effort levels let a question trade speed for depth.

Choosing a search approach

If you are evaluating tools, ask three questions: can it find an exact identifier, can it find a passage that uses different words, and what decides the final order of results? A demo with your own examples shows more than a feature list. Before connecting any tool to firm data, the questions to ask about data handling are in AI Vendor Due Diligence Questionnaire: What to Ask Before Connecting Firm Data.

Related: Knowledge Graph vs Vector Database for AI, AI for Hedge Funds, and the full guide, What Is Context Engineering?.

Request a demo

juppiter is a knowledge engine that securely organizes your firm data for fast and efficient access for your AI workflows.

Tell us about your firm, the sources your team relies on and the questions that are hardest to answer today, and we'll build the walkthrough around them.