怎么给检索结果重排How to Rerank Retrieval Results
微型指南 · 约 7 分钟Guide · about 7 min · 引用核验 2026-11-03(仅引用链接与日期) · refs checked 2026-11-03 (reference links and dates only)
检索先取回候选,重排再调整顺序。它能否改善最终结果,要看候选是否包含答案、排序质量和延迟预算。Retrieval returns candidates; reranking changes their order. Benefits depend on answer coverage, ranking quality and latency budget.
粗筛多取:向量检索先取回几十条候选,别只取前三。
精筛换模型:重排模型逐条比对查询与候选,比向量距离更细。
重排有成本:候选越多越慢越贵,按延迟预算定候选数。
看重排模型的语种支持:不是所有重排模型都支持中文。
调 top-k:最终喂给模型的条数宁少勿滥,无关块会带偏回答。
评测两阶段分别量:粗筛召回率和精筛排序分开看,才知道哪阶段拖后腿。
Coarse pass retrieves wide: pull dozens of candidates, not just the top three.
Fine pass switches models: a reranker compares query and candidate item by item, finer than vector distance.
Reranking has a cost: more candidates means slower and pricier; set the candidate count by your latency budget.
Check language support of the reranker: not every reranking model handles Chinese.
Tune top-k: fewer final items beats more — irrelevant chunks drag the answer off course.
Measure the two stages separately: coarse recall and fine ranking are scored apart, so you know which stage drags.
例子与判断Example and interpretation
以下是教学情境,不是本站运行或实测记录。A teaching scenario, not a measured or executed site test.
问题是“2025 版报销上限”。候选里同时有 2023、2025 版和讨论帖。先确认正确版本已被召回,再看重排是否把它放到前面;正确文档根本没进候选时,换重排器不能补回它。For “2025 reimbursement limit,” candidates include 2023 and 2025 policies plus discussion posts. Confirm that the correct version was retrieved before assessing its rank. A reranker cannot restore an absent candidate.
联网 / 检索增强Retrieval-Augmented Generation, RAG 向量 / 嵌入Embedding / Vector 分块Chunking
怎么给文档做分块How to Chunk Documents for Retrieval · 怎么做混合检索How to Do Hybrid Search · 怎么挑 embedding 模型How to Choose an Embedding Model · 怎么评测 RAG 的效果How to Evaluate a RAG System