---
title: "Discussion on \"Why Your RAG Pipeline Needs a Reranker: Bi-Encoders vs. Cross-Encoders, and When It Matters\" | Hashnode"
description: "Discussion on \"Why Your RAG Pipeline Needs a Reranker: Bi-Encoders vs. Cross-Encoders, and When It Matters\". Why Your RAG Pipeline Needs a Reranker: Bi-Encoders vs. Cross-Encoders, and When It Matters"
url: "https://hashnode.com/posts/why-your-rag-pipeline-needs-a-reranker-bi-encoders-vs-cross-encoders-and-when-it-matters/6ab2b4d0836e3fa92222dd29"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Why Your RAG Pipeline Needs a Reranker: Bi-Encoders vs. Cross-Encoders, and When It Matters](https://rpsarathy.hashnode.dev/why-your-rag-pipeline-needs-a-reranker-bi-encoders-vs-cross-encoders-and-when-it-matters?utm_source=hashnode&utm_medium=feed)

Why Your RAG Pipeline Needs a Reranker: Bi-Encoders vs. Cross-Encoders, and When It Matters

Sep 22 · 7 min read · rpsarathy.hashnode.dev  
Read the article

-   [#ai](https://hashnode.com/tag/ai)
-   [#rag](https://hashnode.com/tag/rag)
-   [#ai-agents](https://hashnode.com/tag/ai-agents)
-   [#ai-tools](https://hashnode.com/tag/ai-tools)
-   [#llm](https://hashnode.com/tag/llm)

## Written by

[Partha](https://hashnode.com/@rpsarathy)

@rpsarathy · Cranbury, New jersey

  
[View profile](https://hashnode.com/@rpsarathy)

#AI #agents #langgraph, #mcp, #rag, #graphrag #llm #engineering-management

## Responses 1

Markdown supported · ⌘↵ to post

[Mihai\_LeanZero](https://hashnode.com/@mihaileanzero)

[Sep 22](https://hashnode.com/posts/why-your-rag-pipeline-needs-a-reranker-bi-encoders-vs-cross-encoders-and-when-it-matters/6ab2b4d0836e3fa92222dd29/comment/6ab2c7985cf1757f8e970eea)

Really clean writeup of the bi-encoder/cross-encoder split -- the "cost is linear in corpus size per query, forever" framing is the right way to explain why nobody just runs a cross-encoder over everything.

One thing I didn't see covered: what happens when the reranker call itself is slow or unavailable in production. Per your own diagram it's a synchronous stage sitting between retrieval and the LLM call, with its own latency and failure modes (loaded GPU, cold model server, network blip). Falling back to raw cosine order on a timeout keeps the request alive but silently degrades quality for however long the reranker is down; failing the request instead keeps quality guarantees but turns a reranker hiccup into a user-facing outage. Worth picking one of those on purpose before the first timeout shows up in prod rather than after.
