Two-stage retrieval
Vector search and BM25 are bi-encoders — they encode the query and each document independently, then compare the results. Fast, but the model never sees the query and document together.
A cross-encoder takes the query and a candidate document and runs them jointly through a transformer. It produces a single relevance score that reflects pairwise context. Much more accurate, much slower (you cannot precompute it), so the standard architecture is:
- Stage 1 — fast retriever (vector + BM25) returns top-50 candidates.
- Stage 2 — cross-encoder reranks those 50 to find the true top-5.
Open-source cross-encoders worth knowing
- BGE-reranker-v2-m3 — multilingual, best of the open-source pack in early 2026
- cross-encoder/ms-marco-MiniLM-L-6-v2 — tiny English, runs on CPU
- jina-reranker-v2-base-multilingual — fast, multilingual, very small