An enterprise search system may need to find both an exact regulatory citation and a passage that answers a conversational question using different words. Keyword retrieval protects exact matches; dense retrieval reaches conceptually related passages. Hybrid search combines the two so neither kind of query depends on one retrieval method alone. section 2.1.6 section 2.4.1
A typical design keeps a lexical path, such as BM25 over an inverted index, alongside a path that compares query and document embeddings. At query time, both paths produce results; rank fusion can merge their lists before a more precise reranker scores the survivors. This adds infrastructure and tuning work, so it is not automatically better than a well-matched single retriever. section 2.0 section 1.5.2
Choose the starting point by the queries you expect:
- Use keyword retrieval for precise legal terms, regulatory citations, API names, or function calls; it can be faster and less expensive than semantic search. section 2.1.6
- Use dense retrieval when conversational queries have little vocabulary overlap with relevant documents. section 2.1.6
- Start with hybrid retrieval when query logs are unavailable or the collection mixes technical and general documents. Check whether the added path earns its cost. section 2.1.6 section 1.5.2
Fusing an expanded query with exact matches
A HyDE-generated passage can supply an embedding for semantic search while the original query runs through BM25. Reciprocal rank fusion merges the two ranked lists. The semantic path can find relevant wording the user did not supply; the lexical path preserves matches on a part number, statute reference, or drug name. section 7.6.2
Hybrid does not always mean BM25 plus vectors. A graph-based variant routes specific entity keywords to indexed entity profiles and abstract themes to vector similarity, then synthesizes an answer from the combined context. The shared design principle is to give different query needs different retrieval paths. section 12.4.3
Table 14.3 Question-context taxonomy for RAG evaluation datasets
|
Class
|
Description
|
Example query
|
Retrieval difficulty
|
|
fact_single
|
Answer is one unit of information, directly stated in
context
|
"What supply voltage should I use?"
|
Easiest: direct lexical/semantic match
|
|
summary
|
Answer requires multiple pieces from context
|
"Summarize the key findings."
|
Medium: must retrieve the broad context
|
|
reasoning
|
Answer must be inferred, not directly stated
|
"Has consumption increased over 5 years?"
|
Hardest: context doesn't contain the answer verbatim
|
|
unanswerable
|
Answer cannot be derived from the context
|
"Is a tomato a fruit or a vegetable?" (asked of
a coffee machine patent)
|
Tests negative rejection
|
Use the question-context taxonomy to test more than direct fact lookup. Summary and reasoning questions need different context, and a benchmark dominated by single-fact questions can favor the wrong lexical-versus-semantic weighting. section 14.4














