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.

相关推荐
用户519149584845几秒前
CitrixBleed 2 内存泄漏漏洞利用框架 (CVE-2025-5777)
人工智能·aigc
Asher阿舍技术站1 分钟前
【AI基础学习系列】八、机器学习常见名词汇总
人工智能·学习·机器学习·常见名词
勾股导航2 分钟前
蚁群优化算法
人工智能·pytorch·python
SmartBrain4 分钟前
FastAPI实战(第三部分):浏览历史的接口开发详解
数据库·人工智能·aigc·fastapi
skywalk816310 分钟前
解决opencode报错:Error: Failed to spawn OpenCode Server
人工智能
极客先躯44 分钟前
高级java每日一道面试题-2025年7月15日-基础篇[LangChain4j]-如何集成国产大模型(如通义千问、文心一言、智谱 AI)?
java·人工智能·langchain·文心一言·异常处理·密钥管理·参数调优
阿星AI工作室1 小时前
我搭了一个 AI 写作机器人,每天自动写文章发到公众号草稿箱
人工智能·程序员
陈天伟教授1 小时前
人工智能应用- 材料微观:04.微观结构:金属疲劳
人工智能·神经网络·算法·机器学习·推荐算法
未来之窗软件服务1 小时前
AI人工智能(五)天猫精灵部署开发自己服务—东方仙盟练气期
人工智能·仙盟创梦ide·东方仙盟
用户579854769711 小时前
03:多 LLM 提供商统一接入:Provider 模式与 LiteLLM 实践
人工智能