NLP Bi-Encoder和Re-ranker

Retrieve & Re-Rank

https://www.sbert.net/examples/applications/retrieve_rerank/README.html

Bi-Encoder vs. Cross-Encoder

https://www.sbert.net/examples/applications/cross-encoder/README.html

Bi-Encoder会用BERT对输入文本编码,再根据cosine相似度分数筛选文本。Cross-Encoder会直接计算两个句子的相关性分数。

如何将BI和Cross Encoder配合使用?可以先用BI-Encoder选出top 100个候选项,再用Cross-Encoder挑选最佳选项。

Combining Bi- and Cross-Encoders

Cross-Encoder achieve higher performance than Bi-Encoders, however, they do not scale well for large datasets.

Here, it can make sense to combine Cross- and Bi-Encoders, for example in Information Retrieval / Semantic Search scenarios:

First, you use an efficient Bi-Encoder to retrieve e.g. the top-100 most similar sentences for a query.

Then, you use a Cross-Encoder to re-rank these 100 hits by computing the score for every (query, hit) combination.

相关推荐
撸码猿9 分钟前
《Python AI入门》第9章 让机器读懂文字——NLP基础与情感分析实战
人工智能·python·自然语言处理
二川bro13 分钟前
多模态AI开发:Python实现跨模态学习
人工智能·python·学习
张彦峰ZYF15 分钟前
AI赋能原则1解读思考:超级能动性-AI巨变时代重建个人掌控力的关键能力
人工智能·ai·aigc·ai-native
love530love30 分钟前
【笔记】ComfUI RIFEInterpolation 节点缺失问题(cupy CUDA 安装)解决方案
人工智能·windows·笔记·python·插件·comfyui
Lucky小小吴37 分钟前
Google《Prompt Engineering》2025白皮书——最佳实践十四式
人工智能·prompt
AI科技星39 分钟前
为什么变化的电磁场才产生引力场?—— 统一场论揭示的时空动力学本质
数据结构·人工智能·经验分享·算法·计算机视觉
青瓷程序设计39 分钟前
昆虫识别系统【最新版】Python+TensorFlow+Vue3+Django+人工智能+深度学习+卷积神经网络算法
人工智能·python·深度学习
咩图42 分钟前
C#创建AI项目
开发语言·人工智能·c#
深蓝海拓1 小时前
opencv的模板匹配(Template Matching)学习笔记
人工智能·opencv·计算机视觉
美林数据Tempodata1 小时前
李飞飞最新论文深度解读:从语言到世界,空间智能将重写AI的未来十年
人工智能·ai·空间智能