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.

相关推荐
IT_陈寒7 小时前
JavaScript项目实战经验分享
前端·人工智能·后端
vanuan9 小时前
两个AI智能体第一次对话-A2A双Agent协作实战
人工智能
kfaino10 小时前
码农的AI翻身(四)你好,我叫 Attention
人工智能·后端
雨落Re13 小时前
如何设计一个高质量Skill
人工智能
Token炼金师13 小时前
大模型权重文件全指南:从格式选择到优化实战
人工智能
阿牛哥_GX13 小时前
CDP 浏览器操控原理:让脚本接管你的浏览器
人工智能
ThreeS13 小时前
手搓MiniVLA全实战教程-一步一步用pytorch解释原理与思路
人工智能·python
米小虾14 小时前
Loop Engineering —— 循环的设计与自主执行
人工智能·agent
米小虾14 小时前
Harness Engineering —— 系统的安全护栏
人工智能·agent
火山引擎开发者社区14 小时前
积分当钱花,火山引擎开发者激励计划首月消费双倍回馈
人工智能