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.

相关推荐
硅谷秋水13 分钟前
RoboKit:加速机器人学习中的并行可微分优化
人工智能·机器学习·语言模型·机器人
西瓜籽大魔王32 分钟前
Midjourney新手教程:V8.2参数别背,一张头像从选图到改图走一遍
人工智能
EatFan1 小时前
GitHub 热榜 14 个项目 11 个与 AI Agent 相关:Agent Skills 正在成为智能体的新分发层
人工智能·github
秦先生在广东1 小时前
百万字Markdown不卡顿的秘密
人工智能
秦先生在广东1 小时前
别用AI生图,改代码直接出电影级视频
人工智能
秦先生在广东2 小时前
DS-Bot让AI机器人有了永久记忆
人工智能
深海鱼肝油ya2 小时前
LangChain(二)提示词 & 格式化输出
人工智能·大模型·llm·agent·提示词·格式化输出·智能体
云上工程笔记2 小时前
优刻得UCloud技术实践:中立云定位、自建智算中心与AI工厂方案怎么落地
人工智能
Java与AI落地3 小时前
AI 接口日志脱敏:log-prompt 关掉之后,prompt 里的内网地址怎么删
人工智能
逆光重构3 小时前
Amazon 类目属性填充实践:为什么 AI 只该填那些真正空着的必填项
人工智能