Sub topic 9
Hybrid Retrieval: Combining Both Signals
What hybrid retrieval combines
Assume you already understand traditional search results, basic SEO, and the idea that semantic retrieval uses embeddings to compare meaning.
Hybrid retrieval combines two kinds of search:
- Lexical retrieval matches words or phrases. It rewards exact terms, rare terms, and often the location of those terms in a document. BM25 is a common lexical ranking method.
- Semantic retrieval compares the meaning of a query with the meaning of a passage. It can match related wording even when the exact words differ.
Each method covers a weakness in the other. Lexical retrieval is good at exact product names, model numbers, prices, and technical terms. Semantic retrieval is good at paraphrases and natural-language questions.
For example, a search for “TrailPro X2 waterproof hiking boot” needs the exact product name. A search for “boots that keep feet dry during long mountain walks” may use different words from the page but express a similar need.
caption: How hybrid retrieval creates a candidate set
alt: A query is sent to lexical and semantic retrievers, whose results are combined before reranking.
flowchart TD
Q[User question] --> L[Lexical retrieval]
Q --> S[Semantic retrieval]
L --> F[Lexical candidates]
S --> G[Semantic candidates]
F --> H[Combine candidates and scores]
G --> H
H --> R[Rerank passages]
R --> A[Answer generation]How the signals are combined
The two retrievers usually produce separate ranked lists or scores. A system can combine them in several ways:
| Combination method | How it works | Main consideration |
|---|---|---|
| Weighted score fusion | Scales and adds lexical and semantic scores | The scores must be comparable |
| Rank fusion | Combines the positions of documents in each list | Less dependent on raw score scales |
| Candidate union | Keeps results from both systems, then reranks them | The reranker must remove weak matches |
A simple weighted model might look like this:
def hybrid_score(lexical_score, semantic_score,
lexical_weight=0.4, semantic_weight=0.6):
"""Illustrative score fusion, not a production search algorithm."""
return (
lexical_weight * lexical_score
+ semantic_weight * semantic_score
)
pages = {
"product_page": (0.95, 0.55),
"guide_page": (0.45, 0.90),
"unrelated_page": (0.20, 0.25),
}
ranked = sorted(
pages.items(),
key=lambda item: hybrid_score(*item[1]),
reverse=True,
)
for page, scores in ranked:
print(page, round(hybrid_score(*scores), 3))This example is only a model of the decision. Real systems may normalize scores, use different weights for different queries, apply filters, and use a separate machine-learning reranker.
What hybrid retrieval rewards in content
For marketers, hybrid retrieval creates two content requirements:
- Use the words that identify the topic clearly. Include product names, audience terms, attributes, units, and important alternatives.
- Explain the topic naturally and completely. Cover the underlying problem, comparisons, use cases, constraints, and related questions.
Do not treat this as permission to repeat keywords. Repetition can help neither meaning nor usability. Instead, make each passage answer a specific question with concrete details.
A product page should identify the product exactly, then explain who it suits, how it compares with alternatives, and what limitations apply. This gives lexical retrieval recognizable terms and gives semantic retrieval useful context.
Common mistakes and trade-offs
A page may fail lexical retrieval when it uses only vague marketing language such as “high-performance comfort.” It may fail semantic retrieval when it lists keywords without explaining how the product solves the reader’s problem.
A very high lexical weight favors exact matches but can miss useful paraphrases. A very high semantic weight may retrieve broadly related pages while overlooking an exact answer. Search systems therefore tune the balance by query type, and outsiders usually cannot know the exact settings.
Exercise
Exercise
A page uses the exact phrase “noise-cancelling headphones,” but says nothing about commuting, battery life, or airplane use. Which retrieval signal might find it, and what should you add?
Show answer
Lexical retrieval may find it because of the exact phrase. Add clear, useful passages about commuting, battery life, airplane use, and relevant limitations so semantic retrieval can also connect the page to those needs.