What is reranking in a RAG pipeline?
Reranking is a second stage that reorders retrieved candidates by relevance using a more powerful (but slower) model, typically a cross-encoder that scores each query-chunk pair directly. You retrieve a broad set cheaply (say top 50), rerank to the best few, and pass only those to the LLM. This improves precision and lets you send fewer, better chunks — improving answers and cutting token cost at the same time.