A bi-encoder embeds the query and each document independently, so document vectors can be precomputed and searched with a vector index: fast and scalable, but less precise because query and document never interact directly.
A cross-encoder feeds the query and document together into one transformer and outputs a relevance score: much more accurate, but it must run per query-document pair, so it is too slow for searching a whole corpus.
The standard pipeline uses a bi-encoder (plus keyword search) to retrieve the top 20 to 100 candidates and a cross-encoder to rerank them.
Loading…