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.

相关推荐
圣殿骑士-Khtangc几秒前
MoE 混合专家模型深度解析:DeepSeek-V3 和 Qwen-MoE 的工程奥秘
人工智能
IT_陈寒1 分钟前
Python列表的+=操作符坑了我一整天
前端·人工智能·后端
高洁011 分钟前
用知识图谱重构搜索引擎
人工智能·python·数据挖掘·virtualenv·知识图谱
广州灵眸科技有限公司2 分钟前
3Tops NPU + 4核高性能架构:灵眸科技EASY-EAI-PI2开发板,为边缘AI开启“easy模式”
服务器·前端·人工智能·python·科技·深度学习·架构
小e说说3 分钟前
海同科技可信吗?16年IT教育品牌深度实测解析
大数据·人工智能
apcipot_rain5 分钟前
计科八股20260609——10分钟速通《线性代数》,知识点极简版
人工智能·线性代数·机器学习
步步为营DotNet5 分钟前
Semantic Kernel 在.NET AI 开发中的深度探索与实践
人工智能·.net
安全指北针7 分钟前
AI检测 vs 传统SIEM:2026年安全运营效率实测对比
人工智能·安全
SilentSamsara7 分钟前
模型评估与超参调优:交叉验证、Optuna 与模型选择策略
人工智能·python·深度学习·机器学习·青少年编程