文章摘要
ZeroEntropy团队通过引入国际象棋ELO评分机制,训练了一种新的重排序模型zerank-1和zerank-1-small,显著提升了检索系统的准确性。该模型已在HuggingFace和API上发布,适用于RAG和AI代理等系统,结合了关键词搜索和语义搜索的优势,旨在优化搜索结果的相关性。
文章总结
文章总结:通过ELO评分提升RAG检索效果
标题:通过ELO评分提升RAG检索效果
来源:ZeroEntropy博客
发布时间:2025年7月16日
主要内容:
ZeroEntropy团队由数学家和竞赛程序员组成,致力于提高搜索的准确性。他们最近发布了最新的重排序模型zerank-1和zerank-1-small,并通过HuggingFace和API提供。本文介绍了他们如何利用国际象棋中的ELO评分概念来训练一个优于其他测试模型的重排序模型。
关键点:
重排序器(Reranker)的作用:
- 重排序器是一种交叉编码器神经网络,通过重新评分和排序来优化搜索结果。它能够同时查看查询和文档的完整文本,因此比第一阶段的检索方法更具上下文感知能力。
现有解决方案的局限性:
- 目前最先进的解决方案依赖于人工标注的正负样本对,但这种方法存在“假阴性”问题,即某些被标注为负样本的文档实际上可能比正样本更相关。
ELO评分的引入:
- ZeroEntropy团队放弃了传统的人工标注方法,转而采用ELO评分来生成更细致和全面的评分。ELO评分通过成对比较文档的相关性,并将其转换为绝对评分,从而避免了噪声问题。
训练流程:
- 三元组采样:通过BM25关键词搜索和向量搜索获取候选文档,并使用大型语言模型(LLM)决定哪个文档更相关。
- 成对重排序器训练:使用标记的三元组训练一个轻量级的成对重排序器,以估计成对相关性评分。
- ELO评分计算:通过成对比较推断文档的ELO评分,确保每个文档参与大约四次比较。
- 点式重排序器训练:在ELO评分数据集上训练点式重排序器,直接预测文档相关性。
- 强化学习微调:在初始监督训练后,使用强化学习进一步优化重排序器。
跨查询偏差调整:
- 为了解决不同查询之间的评分偏差,团队引入了跨查询对,并通过最大似然估计计算每个查询的理想偏差。
模型效果:
- 通过这种训练流程,ZeroEntropy团队成功训练出了zerank-1和zerank-1-small模型,显著提升了重排序的效果。
图片:
结论:
ZeroEntropy团队通过引入ELO评分和成对比较的训练流程,成功提升了重排序模型的效果。他们的方法不仅在准确性上优于现有模型,还显著降低了推理成本和延迟。
评论总结
正面评价与认可:
- 评论1和评论3对内容表示赞赏,认为其“很酷”(Really cool stuff!),并分享了类似的应用经验。
- 引用1: "Really cool stuff! Just want to let you know you forgot to link to the evals at the end."
- 引用3: "Cool stuff! We use a similar process internally to rerank and filter our cold outbound lists."
- 评论7对竞争表示欢迎,并祝愿产品成功。
- 引用7: "Happy to see competition in rerankers! Good luck with your product."
- 评论1和评论3对内容表示赞赏,认为其“很酷”(Really cool stuff!),并分享了类似的应用经验。
技术细节与改进建议:
- 评论2建议标题改为“Improving ranking...”,并提到与
sentence_transformers的兼容性。- 引用2: "I would have titled it 'Improving ranking...' I like that it works with
sentence_transformers."
- 引用2: "I would have titled it 'Improving ranking...' I like that it works with
- 评论9询问为何使用ELO而非其变体,并提供了相关链接。
- 引用9: "Out of curiosity, is there a reason why you are using ELO proper, rather than one of the ELO variants that doesn't make assumptions about the distribution of results?"
- 评论2建议标题改为“Improving ranking...”,并提到与
性能与成本问题:
- 评论3提到该过程“不便宜也不快”,但效果不错。
- 引用3: "It's not cheap and it's not fast, but it definitely works pretty well!"
- 评论4询问了重新排序带来的额外延迟。
- 引用4: "What’s the expected additional latency due to running this re-ranker?"
- 评论3提到该过程“不便宜也不快”,但效果不错。
相关研究与替代方案:
- 评论6分享了类似的研究,并提供了论文和HuggingFace空间的链接。
- 引用6: "Interesting work. For a slightly different take using a similar intuition, see our paper at ACL 2024 on ranking LLMs which may be of interest."
- 评论8提出使用2AFC排序替代ELO,并提供了代码和会议链接。
- 引用8: "I have a paper that got denied but it was about using 2AFC sorting to do this instead of elo. It has a defined end unlike elo scores."
- 评论6分享了类似的研究,并提供了论文和HuggingFace空间的链接。
应用场景与扩展:
- 评论11讨论了该技术在招聘中的应用,并提出了文档级别检索的改进建议。
- 引用11: "So this is for recruitment? I like the pairwise approach but in the field I'm interested in, at the document level there can be a lot of relevance."
- 评论11讨论了该技术在招聘中的应用,并提出了文档级别检索的改进建议。
ELO的命名与发音:
- 评论5和评论12提醒ELO是发明者的名字,而非缩写,并纠正了发音。
- 引用5: "Fun fact about ELO. It's natural to think that it is some kind of initialism, but in fact ELO doesn't stand for anything. It's the name of the guy who invented the system."
- 引用12: "Little reminder that Elo is a guy, not an acronym :)"
- 评论5和评论12提醒ELO是发明者的名字,而非缩写,并纠正了发音。
总结:评论中对内容的认可度较高,主要集中在技术细节、性能成本、相关研究和应用场景等方面。同时,也提出了一些改进建议和替代方案,并纠正了关于ELO的常见误解。







