当检索增强生成(RAG)应用即使在文档中包含正确答案的情况下仍给出错误回答时,检索环节往往是罪魁祸首。向量搜索在查找相关主题的文本块方面表现出色,但它经常会被“近失”案例误导,例如当用户询问的是 Growth 计划时,系统却提取了 Enterprise 计划的存储桶限制信息。RAG 中的重排序(Reranking)通过解决这一问题:它将向量搜索的前 30 个候选结果传入一个专用的交叉编码器模型,直接针对问题对每个文本块重新评分。
在包含 274 个问题的基准测试中,使用 google/gemini-embedding-2 的标准向量搜索有 81% 的时间将正确的文本块排在首位。加入 voyageai/rerank-3-lite 对前 30 个结果进行重排序后,这一比例提升至 97%,而每 1,000 次查询的成本仅为约 0.10 美元。请注意,这是在小型合成数据集上进行的测试,因此实际收益将取决于您的文档情况,但以下工作流程将帮助您测量自身的基线水平。
TL;DR(摘要)
检索约 30 个候选结果,对其进行重排序,并将前 3 个发送给大语言模型(LLM)。
voyageai/rerank-3-lite 和 voyageai/rerank-3 是最准确的专用重排序模型,也是所有 11 种重排序器中最便宜的,价格分别为每 1,000 次查询 0.10 美元和 0.26 美元。
LLM 重排序器(openai/gpt-6-luna)在 99.6% 的问题中将正确的文本块排在首位,但每次调用耗时 4.0 秒,而专用重排序模型仅需 1.3 秒。
廉价的 voyageai/voyage-4-lite 加上 voyageai/rerank-3-lite 达到了 96.7% 的 Top-1 精度(precision@1),相比之下,仅使用更昂贵的 google/gemini-embedding-2 时该指标为 81.0%。
在嵌入调用中设置 input_type 参数。若忽略此参数,会导致 Top-1 精度下降 7 到 12 个百分点。
cohere/rerank-v3.5 仅读取文档的前 4,096 个令牌(4K),且不会报错。
为什么 RAG 会检索到错误的文本块?
标准向量搜索之所以困难,是因为嵌入模型在查看用户问题之前,会将整个文本块压缩为单个向量。如果一个 130 词的文本块解释了存储桶限制,那么具体的计划名称在整个文本块中仅占一两个词。结果,Starter、Growth、Scale 和 Enterprise 计划的向量在向量空间中紧密聚集在一起,检索器很容易将错误的计划排在首位。
为了在不依赖主观评分的情况下测试检索准确性,我们为一个名为 Fernbank 的虚构存储服务构建了受控数据集。该语料库包含 274 个文本块,涵盖文档、错误代码、SDK 指南、更新日志以及噪声数据(包括旨在陷阱朴素关键词和向量匹配方法的未回答论坛帖子和支持工单)。我们使用 anthropic/claude-sonnet-5.5 从一组固定事实生成每个文本块,并通过脚本进行检查。另一个独立的模型 openai/gpt-6.1-sol 负责编写问题。由于每个问题都对应一个正确的文本块,我们可以无需主观判断地对检索进行评分。
在完整测试集中,问题是“在 Growth 计划下,我可以在单个 Fernbank 账户中创建多少个存储桶?”。google/gemini-embedding-2 将 Starter、Enterprise 和 Scale 计划的文本块分别排在第 1、2 和 3 位。一个未回答的论坛帖子排在第四位,而实际的 Growth 计划答案则位于第五位。如果您的 RAG 管道仅将其前三个候选结果发送给 LLM,模型甚至根本看不到正确的文档。
重排序器通过采用交叉编码器架构来解决这一问题。它不是孤立地评估文档,而是将用户的问题与每个候选文本块一起处理。在数千份文档上运行交叉编码器对于实时查询来说太慢了,因此向量搜索充当快速检索器,在重排序器对其进行排序之前,将范围缩小到短名单中。
如何将重排序器添加到您的 RAG 管道
您无需替换现有的嵌入搜索。将其保留为第一阶段检索,增加其返回的候选数量,并在将最终结果传递给 LLM 之前添加一个重排序调用。
使用嵌入检索 30 个文本块,对其进行重排序,并将前 3 个发送给 LLM。
以下 Python 示例使用了我们的嵌入(embeddings)和重排(rerank)API。它通过余弦相似度检索候选文本块,使用 voyageai/rerank-3-lite 对它们进行重排,并返回排名最高的三个结果。
你需要设置 OPENROUTER_API_KEY 环境变量,并安装 numpy 和 requests 库。
Python
import os
import numpy as np
import requests
API = "https://openrouter.ai/api/v1"
HEADERS = { "Authorization" : f "Bearer { os.environ[ 'OPENROUTER_API_KEY' ] } " }
def embed (texts, input_type, model = "google/gemini-embedding-2" ):
r = requests.post( f " {API} /embeddings" , headers = HEADERS , timeout = 120 ,
json = { "model" : model, "input" : texts,
"input_type" : input_type})
r.raise_for_status()
data = sorted (r.json()[ "data" ], key =lambda d: d[ "index" ])
v = np.array([d[ "embedding" ] for d in data])
return v / np.linalg.norm(v, axis = 1 , keepdims = True )
def retrieve (question, chunks, chunk_vectors, n = 30 ):
sims = chunk_vectors @ embed([question], "search_query" )[ 0 ]
return [(sims[i], chunks[i]) for i in np.argsort( - sims)[:n]]
def rerank (question, candidates, top_n = 3 , model = "voyageai/rerank-3-lite" ):
r = requests.post( f " {API} /rerank" , headers = HEADERS , timeout = 120 ,
json = { "model" : model, "query" : question,
"documents" : candidates, "top_n" : top_n})
r.raise_for_status()
data = r.json()
ranked = [(res[ "relevance_score" ], candidates[res[ "index" ]])
for res in data[ "results" ]]
return ranked, data.get( "usage" , {}).get( "cost" )
chunks = [
"Starter plan limits: an account on the Starter plan can create up to "
"10 buckets." ,
"Scale plan limits: accounts on the Scale plan can hold up to "
"2,500 buckets." ,
"Enterprise plan limits: Enterprise accounts can create up to "
"40,000 buckets." ,
"Growth plan limits: an account on the Growth plan can hold up to "
"150 buckets." ,
"Q: What's the bucket cap on the Growth plan? Reply: I think it "
"changed recently, check the docs." ,
"Growth plan object size: a single object on the Growth plan can be "
"up to 50 GB." ,
]
chunk_vectors = embed(chunks, "search_document" )
question = ( "How many buckets can I create in a single account "
"on the Growth plan?" )
retrieved = retrieve(question, chunks, chunk_vectors)
print ( "Vector search:" )
for sim, text in retrieved:
print ( f " { sim :.3f } { text[: 60 ] } " )
ranked, cost = rerank(question, [text for _, text in retrieved])
print ( f "Reranked ($ { cost :.7f } ):" )
for score, text in ranked:
print ( f " { score :.3f } { text[: 60 ] } " )
输出
Vector search:
0.832 Growth plan limits: an account on the Growth plan can hold u
0.758 Starter plan limits: an account on the Starter plan can crea
0.741 Scale plan limits: accounts on the Scale plan can hold up to
0.737 Enterprise plan limits: Enterprise accounts can create up to
0.717 Growth plan object size: a single object on the Growth plan
0.695 Q: What's the bucket cap on the Growth plan? Reply: I think
Reranked ($0.0000038):
0.922 Growth plan limits: an account on the Growth plan can hold u
0.793 Q: What's the bucket cap on the Growth plan? Reply: I think
0.727 Starter plan limits: an account on the Starter plan can crea
对于这些简短的单句文本块,向量搜索已将正确的 Growth 计划限制信息排在首位。余弦相似度得分范围从 0.695 到 0.832,因此多个候选结果彼此接近。重排后,正确的文本块获得了 0.922 的相关性得分。未回答的论坛帖子以 0.793 的得分升至第二位,超过了 Starter 计划的条目。
第二个结果说明了一个重要的局限性:相关性并不等同于正确性。该论坛帖子提出了相同的问题,因此重排器认为它是相关的,尽管它并没有回答问题。在这个简化的示例中,由于第一个结果已经是正确的,重排器没有对其进行修正。在完整的基准测试中,使用130词的分块,向量搜索将错误的分块排在第一位的情况占问题的19%,其中包括Growth计划的问题,而使用voyageai/rerank-3-lite进行重排修复了其中大部分问题。
实际的教训是,应向大语言模型(LLM)发送几个强有力的候选结果,而不是依赖单一的结果。你还应该考虑过滤掉未回答的讨论以及其他提及问题但未解决的内容。
代码中还有两个其他细节值得正确处理:
首先,input_type参数告诉嵌入模型它正在编码的是搜索查询还是文档。某些模型对这些输入的处理方式不同,因此省略该参数可能会损害检索效果。在我们的测试中,省略该参数导致Gemini的precision@1从81.0%降至74.1%,voyageai/voyage-4-lite从64.6%降至52.9%。请参阅嵌入API参考文档,其中将其作为字符串处理,并将search_query和search_document记录为其值。
其次,top_n控制重排器返回的结果数量,而不是它评估的数量。模型仍然会对发送给它的每个候选者进行评分,因此候选者的数量会影响成本和延迟。
你如何知道重排带来了帮助?
重排可以改善结果排序,而不一定改善用户收到的答案。要确定是否有必要添加重排,请在更改前后测量检索准确性,然后评估最终答案。
从precision@1开始:即第一个检索到的分块包含正确答案的问题百分比。你不需要庞大的评估集即可开始。来自应用程序日志的50个真实问题,每个都标记了其正确的答案分块,可以为你提供初始基线。《从生产流量构建黄金评估数据集指南》解释了如何组建这样一个数据集。
不要仅依赖recall@5:它衡量的是正确答案是否出现在前五名中的任何位置,无论其具体位置如何。在我们的测试中,Gemini的recall@5达到了98.2%,但precision@1仅为81.0%。正确的信息通常位于结果中的某个位置,但并不总是在顶部。
我们还测试了对最终答案的影响。我们使用anthropic/claude-haiku-5.5回答所有274个问题,使用的是每个检索配置返回的分块,然后将响应与已知事实进行比较。
发送给LLM的分块 答案正确率 上下文中有正确的分块
voyage-4-lite top 5, no rerank 93.1% 93.1%
gemini-embedding-2 top 5, no rerank 97.1% 98.2%
gemini-embedding-2 top 3, no rerank 95.6% 96.0%
gemini-embedding-2 top 30, reranked to 3 99.3% 100%
voyage-4-lite top 30, reranked to 3 99.3% 99.6%
我们于2026年10月8日进行的运行包含274个问题。重排使用了voyageai/rerank-3-lite。
结果表明,重排帮助LLM使用更少的分块回答了更多的问题。大多数错误答案归结为信息缺失。在正确答案分块未进入前三名的案例中,有十分之九的情况模型回应称提供的段落不包含答案。换句话说,应用程序告诉用户它不知道某些其自身文档可以回答的内容。
重排通过改善哪些分块能够到达模型来解决这一问题。它还让我们发送三个分块而不是五个,将LLM的回答成本从每1,000个问题0.22美元降低到0.16美元。重排调用增加了0.10美元的成本,因此在我们的设置中,重排每1,000个问题的净成本增加了0.04美元。
重排是否为你节省资金取决于你的模型、文档大小和查询量,因此请测量从检索到最终答案的整个管道的成本和准确性。
哪个重排序模型最适合 RAG?
我们使用相同的 30 个候选项(由 google/gemini-embedding-2 检索得到)对 11 个重排序器进行了比较,针对的是 274 个问题中的每一个。这为我们比较它们的准确性、延迟和成本提供了一致的基础。
在我们测试的专用重排序模型中,Voyage 的重排序器提供了最佳的性能与价格组合。
重排序精度@1 中位秒数(我们的设置)每 1,000 次查询费用
无(仅嵌入) 81.0% n/a n/a
voyageai/rerank-3 97.8% 1.27 $0.26
voyageai/rerank-3-lite 97.1% 1.26 $0.10
voyageai/rerank-2.5-lite 96.7% 1.50 $0.10
voyageai/rerank-2.5 96.4% 1.30 $0.26
cohere/rerank-4-pro 95.3% 1.54 $2.50
qwen/qwen3-reranker-8b 92.3% 1.51 $1.49
cohere/rerank-4-fast 92.0% 1.25 $2.00
cohere/rerank-v3.5 90.5% 1.47 $1.00
openai/gpt-6-luna (LLM) 99.6% 4.01 $0.70
anthropic/claude-haiku-5.5 (LLM) 98.9% 4.44 $0.87
google/gemini-3.8-flash (LLM) 100% 3.25 $4.14
我们的运行时间为 2026 年 10 月 8 日。费用是每个响应的使用成本,与 GET /api/v1/generation 匹配。中位时间中约有 0.9 秒是测试机器的网络开销。
在这个数据集上,voyageai/rerank-3 有 97.8% 的情况将正确的文本块排在第一位,而 Lite 版本达到了 97.1%。这 0.7% 的差异仅相当于我们 274 个问题测试中的两个问题,因此差异太小,不足以证明更昂贵的模型始终更好。建议从 voyageai/rerank-3-lite 开始,并在你自己的评估集上与 voyageai/rerank-3 进行比较。两者都使用相同的 /rerank 端点,因此切换模型只需更改模型标识符即可。
价格差异主要反映了各提供商的计费方式,如我们重排序模型页面上所列。Voyage 和 Qwen 按令牌计费(每百万个令牌 $0.02 至 $0.20),而 Cohere 针对最多 100 个文档的每次搜索收取 $0.001 至 $0.0025 的费用,无论文档长度如何。由于我们的 30 个候选项包含大约 5,000 个 Voyage 令牌,Voyage 模型的成本特别低。在这些短文本块上,Cohere 的重排序器成本大约是 Voyage 选项的 4 到 25 倍,具体取决于所比较的模型。在我们的测试中,向 Cohere 发送 101 个文档也触发了第二次搜索费用。
对于涉及特定错误代码(如 FB-2411)的问题,重排序带来的差异尤为明显。仅使用嵌入搜索时,voyageai/voyage-4-lite 只有 25% 的情况将正确条目排在第一位,google/gemini-embedding-2 为 53.6%。所有 11 个重排序器在该子集上都达到了 100% 的准确率。由于错误代码条目往往讨论类似的错误,它们的嵌入可能看起来相似。交叉编码器可以将问题中的确切代码与每个候选项中的代码进行比较,并区分出正确的条目。
如果你感兴趣的是开发者正在使用哪些模型,我们的重排序模型排名提供了另一个有用的参考。截至 2026 年 10 月 20 日,voyageai/rerank-2.5 以截至 10 月 18 日的一周内 468 万次请求领先,在我们的测试中得分为 96.4%。使用流行度值得考虑,但它不应取代针对你自己的文档对模型进行测试。模型性能、价格和提供商延迟可能会发生变化。重排序模型集合列出了可用选项及其当前详细信息。
你应该重排序多少文档?
首先重排序大约 30 个候选项,然后根据评估结果调整数量。
为了查看候选项数量如何影响性能,我们使用 voyageai/voyage-4-lite 检索的不同数量的候选项测试了 voyageai/rerank-3-lite:
重排序候选项数 候选项中包含正确文本块的比例 重排序后 Precision@1 每 1,000 次查询费用
10 97.1% 94.5% $0.035
20 98.9% 96.4% $0.070
30 99.6% 96.7% $0.104
50 100% 97.1% $0.174
100 100% 97.1% $0.348
我们的运行时间为 2026 年 10 月 8 日,使用了 274 个问题,voyageai/voyage-4-lite 作为第一阶段。
将候选数量从10增加到30,使Precision@1从94.5%提升至96.7%。再次将其增加到50,使精度达到97.1%,仅多解决了一个问题,但重排成本增加了约三分之二。候选数从50增加到100并未提升精度。
重排存在局限性,因为它只能将相关片段提升到前面,前提是第一阶段检索已将其包含在候选集中。如果向量搜索完全遗漏了答案,任何重排器都无法将其召回。
对于更大的知识库,请使用你的评估集来找到这样一个点:在此点之后,检索更多候选者不再能实质性地提升问题的正确率百分比
When a RAG (Retrieval-Augmented Generation) app gives wrong answers even though the right information is in your documents, retrieval is often the cause. Vector search is great at finding chunks on the right topic, but it often falls for near misses, like pulling the bucket limit for the Enterprise plan when the user asked about the Growth plan. Reranking in RAG fixes this by taking your vector search’s top 30 candidates and passing them through a dedicated cross-encoder model that re-scores each chunk directly against the question.
On a 274-question benchmark, standard vector search with google/gemini-embedding-2 landed the exact right chunk at the top 81% of the time. Adding voyageai/rerank-3-lite to rerank the top 30 pushed that to 97% for roughly $0.10 per 1,000 queries. Keep in mind this was tested on a small synthetic dataset, so your real-world gains will depend on your documents, but the workflow below will help you measure your own baseline.
TL;DR
Retrieve about 30 candidates, rerank them, and send the top 3 to the LLM.
voyageai/rerank-3-lite and voyageai/rerank-3 were the most accurate dedicated rerank models and the cheapest of all 11 rerankers, at $0.10 and $0.26 per 1,000 queries.
An LLM reranker (openai/gpt-6-luna) put the right chunk first for 99.6% of questions, but each call took 4.0 seconds against 1.3 for a rerank model.
The cheap voyageai/voyage-4-lite plus voyageai/rerank-3-lite reached 96.7% precision@1, against 81.0% for the more expensive google/gemini-embedding-2 alone.
Set input_type on embedding calls. Leaving it out costs 7 to 12 points of precision@1.
cohere/rerank-v3.5 reads only the first 4,096 tokens (4K) of a document and gives no error.
Why does RAG retrieve the wrong chunks?
Standard vector search struggles because embedding models compress an entire chunk into a single vector before seeing the user’s question. If a 130-word chunk explains bucket limits, the specific plan name is only one or two words out of that entire block. As a result, the vectors for the Starter, Growth, Scale, and Enterprise plans cluster right on top of each other in vector space, and the retriever can easily rank the wrong plan first.
To test retrieval accuracy without relying on subjective scoring, we built a controlled dataset for a fictional storage service named Fernbank. The corpus contains 274 chunks spanning documentation, error codes, SDK guides, changelog entries, and noise, including unanswered forum posts and support tickets designed to trap naive keyword and vector matches. We generated each chunk from a fixed set of facts with anthropic/claude-sonnet-5.5 and checked it with a script. A separate model, openai/gpt-6.1-sol, wrote the questions. Because every question maps to one correct chunk, we can score retrieval without judgment calls.
In the full test set, the question was “How many buckets can I create in a single Fernbank account on the Growth plan?”. google/gemini-embedding-2 ranked the Starter, Enterprise, and Scale plan chunks 1, 2, and 3. An unanswered forum post ranked fourth, and the actual Growth plan answer sat at fifth. If your RAG pipeline only sends its top three candidates to the LLM, the model never even sees the right document.
A reranker fixes this by using a cross-encoder architecture. Rather than evaluating documents in isolation, it processes the user’s question alongside each candidate chunk. Running a cross-encoder across thousands of documents is too slow for real-time queries, so a vector search serves as a fast retriever, narrowing the field to a shortlist before the reranker sorts it.
How to add a reranker to your RAG pipeline
You don’t need to replace your existing embedding search. Keep it as the first retrieval stage, increase the number of candidates it returns, and add a reranking call before passing the final results to your LLM.
Retrieve 30 chunks with embeddings, rerank them, and send the top 3 to the LLM.
The following Python example uses our embeddings and rerank APIs. It retrieves candidate chunks using cosine similarity, reranks them with voyageai/rerank-3-lite, and returns the three highest-ranked results.
You’ll need an OPENROUTER_API_KEY environment variable, along with numpy and requests installed.
Python
import os
import numpy as np
import requests
API = "https://openrouter.ai/api/v1"
HEADERS = { "Authorization" : f "Bearer { os.environ[ 'OPENROUTER_API_KEY' ] } " }
def embed (texts, input_type, model = "google/gemini-embedding-2" ):
r = requests.post( f " {API} /embeddings" , headers = HEADERS , timeout = 120 ,
json = { "model" : model, "input" : texts,
"input_type" : input_type})
r.raise_for_status()
data = sorted (r.json()[ "data" ], key =lambda d: d[ "index" ])
v = np.array([d[ "embedding" ] for d in data])
return v / np.linalg.norm(v, axis = 1 , keepdims = True )
def retrieve (question, chunks, chunk_vectors, n = 30 ):
sims = chunk_vectors @ embed([question], "search_query" )[ 0 ]
return [(sims[i], chunks[i]) for i in np.argsort( - sims)[:n]]
def rerank (question, candidates, top_n = 3 , model = "voyageai/rerank-3-lite" ):
r = requests.post( f " {API} /rerank" , headers = HEADERS , timeout = 120 ,
json = { "model" : model, "query" : question,
"documents" : candidates, "top_n" : top_n})
r.raise_for_status()
data = r.json()
ranked = [(res[ "relevance_score" ], candidates[res[ "index" ]])
for res in data[ "results" ]]
return ranked, data.get( "usage" , {}).get( "cost" )
chunks = [
"Starter plan limits: an account on the Starter plan can create up to "
"10 buckets." ,
"Scale plan limits: accounts on the Scale plan can hold up to "
"2,500 buckets." ,
"Enterprise plan limits: Enterprise accounts can create up to "
"40,000 buckets." ,
"Growth plan limits: an account on the Growth plan can hold up to "
"150 buckets." ,
"Q: What's the bucket cap on the Growth plan? Reply: I think it "
"changed recently, check the docs." ,
"Growth plan object size: a single object on the Growth plan can be "
"up to 50 GB." ,
]
chunk_vectors = embed(chunks, "search_document" )
question = ( "How many buckets can I create in a single account "
"on the Growth plan?" )
retrieved = retrieve(question, chunks, chunk_vectors)
print ( "Vector search:" )
for sim, text in retrieved:
print ( f " { sim :.3f } { text[: 60 ] } " )
ranked, cost = rerank(question, [text for _, text in retrieved])
print ( f "Reranked ($ { cost :.7f } ):" )
for score, text in ranked:
print ( f " { score :.3f } { text[: 60 ] } " )
Output
Vector search:
0.832 Growth plan limits: an account on the Growth plan can hold u
0.758 Starter plan limits: an account on the Starter plan can crea
0.741 Scale plan limits: accounts on the Scale plan can hold up to
0.737 Enterprise plan limits: Enterprise accounts can create up to
0.717 Growth plan object size: a single object on the Growth plan
0.695 Q: What's the bucket cap on the Growth plan? Reply: I think
Reranked ($0.0000038):
0.922 Growth plan limits: an account on the Growth plan can hold u
0.793 Q: What's the bucket cap on the Growth plan? Reply: I think
0.727 Starter plan limits: an account on the Starter plan can crea
With these short, one-sentence chunks, vector search already places the correct Growth plan limit first. The cosine similarity scores range from 0.695 to 0.832, so several candidates are relatively close. After reranking, the correct chunk receives a relevance score of 0.922. The unanswered forum post moves into second place with a score of 0.793, ahead of the Starter plan entry.
The second result illustrates an important limitation that relevance isn’t the same as correctness. The forum post asks the same question, so the reranker considers it relevant even though it doesn’t answer the question. In this simplified example, the reranker doesn’t fix the first result because it was already correct. In the full benchmark, with 130-word chunks, vector search put the wrong chunk first for 19% of questions, including the Growth plan question, and reranking with voyageai/rerank-3-lite fixed most of them.
The practical lesson is to send the LLM a few strong candidates rather than relying on a single result. You should also consider filtering out unanswered discussions and other content that mentions a question without resolving it.
There are two other details worth getting right in the code:
First, the input_type parameter tells the embedding model whether it’s encoding a search query or a document. Some models treat these inputs differently, so omitting the parameter can hurt retrieval. In our tests, leaving it out reduced precision@1 for Gemini from 81.0% to 74.1%, and for voyageai/voyage-4-lite from 64.6% to 52.9%. See the embeddings API reference , which takes it as a string and documents search_query and search_document as its values.
Second, top_n controls how many results the reranker returns, not how many it evaluates. The model still scores every candidate you send it, so the number of candidates affects both cost and latency.
How do you know reranking helped?
A reranker can improve result ordering without necessarily improving the answers your users receive. To determine whether it’s worth adding, measure retrieval accuracy before and after the change, then evaluate the final answers.
Start with precision@1: the percentage of questions for which the first retrieved chunk contains the correct answer. You don’t need a huge evaluation set to begin. Fifty real questions from your application logs, each labeled with its correct answer chunk, can give you an initial baseline. The guide to building a golden evaluation dataset from production traffic explains how to put one together.
Don’t rely on recall@5 alone: It measures whether the correct chunk appears anywhere in the top five, regardless of its position. In our test, Gemini achieved 98.2% recall@5 but only 81.0% precision@1. The right information was usually somewhere in the results, but it wasn’t always at the top.
We also tested the effect on the final answers. We used anthropic/claude-haiku-5.5 to answer all 274 questions using the chunks returned by each retrieval configuration, then compared the responses with the known facts.
Chunks sent to the LLM Answers correct Right chunk in context
voyage-4-lite top 5, no rerank 93.1% 93.1%
gemini-embedding-2 top 5, no rerank 97.1% 98.2%
gemini-embedding-2 top 3, no rerank 95.6% 96.0%
gemini-embedding-2 top 30, reranked to 3 99.3% 100%
voyage-4-lite top 30, reranked to 3 99.3% 99.6%
Our October 8, 2026 run had 274 questions. Reranking used voyageai/rerank-3-lite.
The results show that reranking helped the LLM answer more questions correctly while using fewer chunks. Most incorrect answers came down to missing information. In nine out of ten cases where the correct chunk wasn’t among the top three, the model responded that the supplied passages didn’t contain the answer. In other words, the application told users it didn’t know something that its own documentation could answer.
Reranking addressed that problem by improving which chunks reached the model. It also let us send three chunks instead of five, reducing the LLM answering cost from $0.22 to $0.16 per 1,000 questions. The rerank call added $0.10, so in our setup reranking cost a net $0.04 more per 1,000 questions.
Whether reranking saves money for you depends on your models, document sizes, and query volume, so measure cost and accuracy across the whole pipeline, from retrieval through the final answer.
Which reranker model is best for RAG?
We compared 11 rerankers using the same 30 candidates retrieved by google/gemini-embedding-2 for each of the 274 questions. That gave us a consistent basis for comparing their accuracy, latency, and cost.
The Voyage rerankers offered the best combination of accuracy and price among the dedicated reranking models we tested.
Reranker Precision@1 Median seconds (our setup) $ per 1,000 queries
None (embeddings only) 81.0% n/a n/a
voyageai/rerank-3 97.8% 1.27 $0.26
voyageai/rerank-3-lite 97.1% 1.26 $0.10
voyageai/rerank-2.5-lite 96.7% 1.50 $0.10
voyageai/rerank-2.5 96.4% 1.30 $0.26
cohere/rerank-4-pro 95.3% 1.54 $2.50
qwen/qwen3-reranker-8b 92.3% 1.51 $1.49
cohere/rerank-4-fast 92.0% 1.25 $2.00
cohere/rerank-v3.5 90.5% 1.47 $1.00
openai/gpt-6-luna (LLM) 99.6% 4.01 $0.70
anthropic/claude-haiku-5.5 (LLM) 98.9% 4.44 $0.87
google/gemini-3.8-flash (LLM) 100% 3.25 $4.14
Our run on October 8, 2026. Costs are the usage cost per response, which matches GET /api/v1/generation. About 0.9 seconds of each median is network overhead from our test machine.
On this dataset, voyageai/rerank-3 ranked the correct chunk first 97.8% of the time, while the Lite version reached 97.1%. That difference amounts to only two questions in our 274-question test, so it’s too small to establish that the more expensive model is consistently better. Start with voyageai/rerank-3-lite and compare it with voyageai/rerank-3 on your own evaluation set. Both use the same /rerank endpoint, so switching models only requires changing the model identifier.
The price differences largely reflect how providers charge, as listed on our rerank model pages . Voyage and Qwen bill by token ($0.02 to $0.20 per million), while Cohere charges $0.001 to $0.0025 per search of up to 100 documents, regardless of document length. Because our 30 candidates contained around 5,000 Voyage tokens, the Voyage models were particularly inexpensive. On these short chunks, Cohere’s rerankers cost roughly 4 to 25 times as much as the Voyage options, depending on the models compared. Sending 101 documents to Cohere also triggered a second search charge in our test.
Reranking made a particularly noticeable difference for questions about specific error codes, such as FB-2411. Embedding search alone put the correct entry first only 25% of the time with voyageai/voyage-4-lite and 53.6% with google/gemini-embedding-2. All 11 rerankers achieved 100% on this subset. Since error-code entries tend to discuss similar errors, their embeddings can look alike. A cross-encoder can compare the exact code in the question with the code in each candidate and distinguish the right entry.
If you’re interested in which models developers are using most, our rerank model rankings provide another useful reference. As of October 20, 2026, voyageai/rerank-2.5 led with 4.68 million requests in the week to October 18, and it scored 96.4% in our test. Usage popularity is worth considering, but it shouldn’t replace testing a model against your own documents. Model performance, prices, and provider latency can change. The reranking model collection lists the available options and their current details.
How many documents should you rerank?
Start by reranking around 30 candidates, then adjust the number based on your evaluation results.
To see how candidate count affects performance, we tested voyageai/rerank-3-lite with different numbers of candidates retrieved by voyageai/voyage-4-lite:
Candidates reranked Right chunk among candidates Precision@1 after rerank $ per 1,000 queries
10 97.1% 94.5% $0.035
20 98.9% 96.4% $0.070
30 99.6% 96.7% $0.104
50 100% 97.1% $0.174
100 100% 97.1% $0.348
Our run on October 8, 2026, used 274 questions, voyageai/voyage-4-lite as the first stage.
Increasing the candidate count from 10 to 30 improved precision@1 from 94.5% to 96.7%. Increasing it again to 50 brought precision to 97.1%, fixing just one more question while increasing reranking cost by about two-thirds. Going from 50 to 100 candidates didn’t improve precision.
Reranking has limits, as it can promote a relevant chunk only if the first retrieval stage includes it in the candidate set. If vector search misses the answer entirely, no reranker can bring it back.
For a larger knowledge base, use your evaluation set to find the point where retrieving more candidates stops meaningfully improving the percentage of questions for whic
| 刊期 | 得分 | 排名 | 结果 |
|---|---|---|---|
| 2026-12-01 | 8.4 | 40 | 未入选 |
| 2026-11-23 | 8.4 | 18 | 入选 |
| 2026-11-22 | 8.4 | 23 | 未入选 |
| 2026-11-14 | 9.95 | 28 | 入选 |