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.

相关推荐
霍格沃兹测试开发学社测试人社区2 分钟前
源码解读:我如何设计一个“可插拔”的测试Skills引擎,支持热加载与隔离执行
人工智能
-山中问答-3 分钟前
【AI智能体工程化实战03】智能体工程化开发环境
人工智能·开发环境·智能体·trae·claude code
寻道码路3 分钟前
LangChain4j Java AI 应用开发实战(十四):手写 RAG 全流程 - 深入理解每个环节
java·开发语言·人工智能·ai
ar01234 分钟前
工业智能化时代的AR巡检力量
人工智能·ar
云烟成雨TD8 分钟前
Agent Scope Java 2.x 系列【1】核心架构
java·人工智能·agent
Xiaofeng369310 分钟前
三大旗舰模型横评:Claude 4.6、ChatGPT 5.5、Gemini 2.0 Pro 谁更强
人工智能
benben04411 分钟前
Gym从入门到精通
人工智能
Zaimmm11 分钟前
ChatGPT医疗智能体能做文献检索和指南比对吗?
人工智能·chatgpt
qq_3829492212 分钟前
企业级机器学习落地实战(含源码与课件)
人工智能·机器学习