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.

相关推荐
水上冰石20 分钟前
【MHS协议】第四章:ESP32 接入 MHS 协议实战:从零构建一个 MHS 兼容设备
人工智能·架构·机器人
知了一笑1 小时前
个体看衰AI,企业加速转型
人工智能·ai
飞哥数智坊3 小时前
一只虾到多只虾:先聊聊我为什么要“拆虾”
人工智能
飞哥数智坊3 小时前
架构图 SKILL 封装好了,顺便做了虾的适配
人工智能
冬奇Lab3 小时前
Code Agent 解剖(16):AgentTeams——为什么一个 agent 不够用?
人工智能
东风破_3 小时前
聊天记录越来越长怎么办?从消息数量截断到 Token 截断
人工智能
冬奇Lab3 小时前
开源项目第204期:LoopX — 长周期 Agent 控制平面,跑在 Codex/Claude Code 之上的状态管理层
人工智能·开源
ZGIAI3 小时前
旧模型下线前,客服 Agent 怎么迁移
人工智能·架构
东风破_4 小时前
程序重启后,AI 为什么把你忘了?从 InMemory 到持久化 Memory
人工智能
ZGIAI4 小时前
客服知识库更新后,怎么批量验收
人工智能·架构