微信扫码
添加专属顾问
我要投稿
大语言模型在各种与语言相关的任务中表现出了显著的零样本泛化能力,包括搜索引擎。然而,现有的工作主要利用LLM的生成能力进行信息检索,而不是直接进行段落排序。这篇EMNLP2023的论文(Outstanding Paper)研究了LLM是否擅长搜索排序的问题。
# Is ChatGPT Good at Search? Investigating Large Language Models as Re-Ranking Agents (https://aclanthology.org/2023.emnlp-main.923/)
两个问题:
对第一个问题,文章提出了permutation generation的方案,让LLM直接输出对一组段落的排序组合。对第二个问题,文章采用蒸馏技术,以在更小的专用排序模型中模仿ChatGPT的段落排序能力。
具体而言,零样本段落重排序的三种指令如下图,灰色和黄色块表示模型的输入输出:
(a) 查询生成:依赖于LLM的对数概率,根据段落生成查询。(b) 相关性生成:指示LLM输出相关性判断。(c) 排序生成:生成一组段落的排序列表。
文章的方案是最后一个,将一组段落输入到LLM,每个段落都有一个唯一的标识符(例如,[1],[2],等)。然后,要求LLM根据段落与查询的相关性生成降序排列的段落顺序。段落使用标识符进行排序,格式如[2] > [3] > [1] > [...]。该方法直接对段落进行排序,而不生成中间的相关性分数,有点类似list-wise的思想。
用于排序的prompt模板如下:
text-davinci-003This is RankGPT, an intelligent assistant that can rank passages based on their relevancy to the query. The following are {{num}} passages, each indicated by number identifier []. I can rank them based on their relevance to query: {{query}} [1] {{passage_1}} [2] {{passage_2}} (more passages) ... The search query is: {{query}} I will rank the {{num}} passages above based on their relevance to the search query. The passages will be listed in descending order using identifiers, and the most relevant passages should be listed first, and the output format should be [] > [] > etc, e.g., [1] > [2] > etc. The ranking results of the {{num}} passages (only identifiers) is:
gpt-3.5-turbo 和 gpt-4system: You are RankGPT, an intelligent assistant that can rank passages based on their relevancy to the query. user: I will provide you with {{num}} passages, each indicated by number identifier []. Rank them based on their relevance to query: {{query}}. assistant: Okay, please provide the passages. user: [1] {{passage_1}} assistant: Received passage [1] user: [2] {{passage_2}} assistant: Received passage [2] (more passages) ... user Search Query: {{query}}. Rank the {{num}} passages above based on their relevance to the search query. The passages should be listed in descending order using identifiers, and the most relevant passages should be listed first, and the output format should be [] > [], e.g., [1] > [2]. Only response the ranking results, do not say any word or explain.
考虑到LLM的输入token长度限制,论文采用滑动窗口策略对更多的文档进行排序。直接看示例:
第一步先对第5-8位排序,p8和p5胜出;然后第二步对第3-6位排序,p8和p3胜出;最后对第1-4位排序,得到最终排序。
滑动窗口的方案简单,不过笔者认为从全局来看,该方案不太公平,因为不同段落之间的排序未必存在偏序传递关系:图中p4和p5未必比p6和p7更优。不过今天来看这个滑动窗口策略也没有太大意义了,LLM的长度限制已经不再是个问题。
另一方面,考虑到成本问题,用GPT-4做排序还是太贵。因此,将GPT-4的搜索排序能力蒸馏到更小的模型是很自然的做法。论文从MS MARCO中抽取了10,000个查询,并使用BM25为每个查询检索到20个候选段落。蒸馏的目标在于减少学生模型和ChatGPT对它们排序输出之间的差异。
上表展示了从TREC和BEIR数据集中获得的评估结果,可以得出几个结论:
上表展示了在TREC数据集上的消融实验,有如下发现:
53AI,企业落地大模型首选服务商
产品:场景落地咨询+大模型应用平台+行业解决方案
承诺:免费POC验证,效果达标后再合作。零风险落地应用大模型,已交付160+中大型企业
2025-12-18
2026 开年AI对谈:the year of R | 对谈真格基金戴雨森
2025-12-18
再论Skill:Agent 落地第一性原理
2025-12-18
Gemini 3 Flash闪电来袭:智力竟反超Pro!速度快3倍,全球免费
2025-12-18
Gemini 3 Flash 可能是 Google 最狠的一步棋
2025-12-18
Cursor 又“危险”了?谷歌深夜祭出 Gemini 3 Flash!编码能力反超 Gemini 3 Pro,价格还更低
2025-12-17
腾讯大模型「变阵」:成立 AI Infra 部,姚顺雨出任首席 AI 科学家
2025-12-17
OpenAI发布了其实时API的新模型
2025-12-17
有人逆向拆解了ChatGPT 的记忆功能
2025-09-19
2025-10-26
2025-10-02
2025-09-29
2025-10-07
2025-09-30
2025-11-19
2025-10-20
2025-11-13
2025-10-02
2025-12-16
2025-12-15
2025-12-14
2025-12-12
2025-12-12
2025-12-11
2025-12-09
2025-12-08