S6-16 · 进阶 S6-16 · Advanced

混合检索 · 两路召回怎样合成一路 Hybrid Retrieval · Turn Two Recall Paths into One

dense candidates + sparse candidates → fusion rank

混合检索(Hybrid Retrieval)融合稠密与稀疏结果,兼顾语义相关和精确匹配。它不是简单“两个都开”,还必须定义分数或名次怎样合成。 Hybrid retrieval fuses dense and sparse results to balance semantic relevance with exact matching. It is not merely turning both on; scores or ranks still need a fusion rule.

01 · 一个查询有两种“相关” 01 · One query, two kinds of relevance

“ZX-42 设备出问题”既要找故障语义,也不能漏掉精确编号;两路结果谁先谁后? “ZX-42 device acting up” needs troubleshooting semantics without losing the exact ID. How should the two result lists combine?

02 融合调音台:给两路检索分配话语权 Fusion Mixer: Give Each Retriever a Voice

融合权重 fusion weight
语义覆盖 Semantic coverage
D2 · troubleshooting
精确覆盖 Exact coverage
D1 · ZX-42
Top-3 覆盖 Top-3 coverage
2/2
目标意图 target intents

03 融合不是把列表拼接起来 Fusion Is Not List Concatenation

归一化 · 合并 · 去重 normalize · merge · dedupe
DENSE

稠密路找近义 Dense finds paraphrases

D2“常见故障排查”没有查询原词,却语义最接近。 D2 “common troubleshooting” lacks the query wording but is semantically closest.

SPARSE

稀疏路抓编号 Sparse catches the ID

D1 因精确包含 ZX-42 获得高词项分数。 D1 earns a strong lexical score by containing ZX-42 exactly.

NORMALIZE

不同分数先对齐 Align incompatible scores

相似度与 BM25 尺度不同,不能直接裸相加。 Similarity and BM25 use different scales and cannot be added raw.

FUSE

合并后去重排序 Merge, dedupe, rerank

同一文档可能两路都出现,最终只保留一项综合排名。 A document can appear in both paths but receives one fused rank.

04 最小机制:融合分数或融合名次 Minimal Mechanism: Fuse Scores or Fuse Ranks

αD + (1−α)S
weighted = αD + (1−α)S
RRF = Σ 1 / (k + rank)
加权融合依赖可比分数;RRF 只使用各路名次。切换规则时,即使权重不变,排序也可能改变。 Weighted fusion needs comparable scores; RRF uses ranks only. Switching rules can change the order even when the balance stays fixed.
两路召回 Two recalls 语义 + 词项 semantic + lexical
按规则融合 Apply fusion rule 分数或名次 scores or ranks
统一候选表 Unified candidates 同时覆盖两种意图 cover both intents

05 边界实验:把稀疏路权重归零 Boundary Test: Zero Out the Sparse Path

主动制造失败 Create a failure

只保留稠密检索 Keep dense retrieval only

语义故障文档仍会靠前,但精确含 ZX-42 的 D1 可能掉出 Top-3。两路都“开启”也不够,权重为零等于没有话语权。 Semantic troubleshooting remains high, but D1 containing exact ZX-42 can drop from the Top 3. A path with zero weight has no voice even if technically enabled.

尚未执行。当前 Top-3 同时覆盖语义与编号。 Not run yet. The current Top 3 covers both semantics and the identifier.
混合检索就是两路都开。 Hybrid retrieval just turns both paths on. → ✓ 还要定义归一化、权重与融合规则。 It also needs normalization, weighting, and a fusion rule.
两个原始分数可直接相加。 Two raw scores can be added directly. → ✓ 不同检索器的分数尺度可能完全不同。 Retriever score scales may be entirely different.
50/50 一定最公平。 50/50 is always fairest. → ✓ 配比要用代表性查询集评测。 Tune the balance on a representative query set.
06 · 一句话带走 06 · One line to keep

混合检索把稠密语义召回与稀疏精确召回归一化、去重并按规则融合;真正决定覆盖的是融合方式与配比,不是“两个都开”。 Hybrid retrieval normalizes, deduplicates, and fuses dense semantic recall with sparse exact recall; coverage depends on the rule and balance, not merely enabling both.