{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreibfqe33vbdiwk4grtntucvbxdwszskzy254tpi6zcyv35rarly5se",
    "uri": "at://did:plc:5sgu76a53rz3n6unbykmovqy/app.bsky.feed.post/3mlodgt2piao2"
  },
  "description": "A reranker is a model that takes an initial set of retrieved candidates and re-orders them to improve precision. In a typical retrieval pipeline, a fast first-stage retriever returns 50 to 200 candidates, and a slower but more accurate reranker scores each (query, candidate) pair and returns the top 5 to 10.\n\n\nHow it works\n\nMost rerankers are cross-encoders: a transformer model that takes the query and the candidate as a single concatenated input and outputs a relevance score. This differs from ",
  "path": "/engineering-glossary/reranker-cross-encoder-search/",
  "publishedAt": "2026-05-12T17:39:35.000Z",
  "site": "https://sahilkapoor.com",
  "tags": [
    "RAG",
    "Embeddings",
    "Vector Database"
  ],
  "textContent": "**A reranker** is a model that takes an initial set of retrieved candidates and re-orders them to improve precision. In a typical retrieval pipeline, a fast first-stage retriever returns 50 to 200 candidates, and a slower but more accurate reranker scores each (query, candidate) pair and returns the top 5 to 10.\n\n## How it works\n\nMost rerankers are **cross-encoders** : a transformer model that takes the query and the candidate as a single concatenated input and outputs a relevance score. This differs from bi-encoders (used for embeddings), which encode query and document separately. Cross-encoding is more accurate because the model attends across the pair, but cannot be precomputed.\n\n## Common rerankers\n\n  * **Commercial APIs:** Cohere Rerank, Voyage Rerank, Jina Reranker\n  * **Open source:** BAAI bge-reranker, mxbai-rerank, MS MARCO MiniLM cross-encoders\n  * **LLM-as-reranker:** Using an instruction-tuned LLM to score candidates with a prompt. Slower but flexible.\n\n\n\nšŸ”—\n\n**Related Terms**\nRAG, Embeddings, Vector Database.",
  "title": "Reranker",
  "updatedAt": "2026-05-13T19:15:20.989Z"
}