What Is Reranking in RAG?
Reranking is a second pass where a model scores retrieved documents for relevance, so the best ones are used in the final prompt for a RAG system or retrieval-heavy agent workflow.
Question
How do I estimate reranking cost impact in retrieval-heavy agent workflows?
Quick answer
Formula: reranking_cost = rerank_docs_per_request * rerank_cost_per_doc * requests
- Assumption: rerank docs/request is measured from real query traces.
- Assumption: reranking is separate from retrieval and generation costs.
- Assumption: evaluate quality gain before increasing rerank document count.
Example: 20 docs/request at $0.00002/doc and 100k requests/month yields $40 monthly reranking cost.
Why It Matters for Cost
- Reranking cost often scales with documents scored per request.
- High rerank document counts can dominate total unit economics.
- You can often reduce costs with better retrieval quality before reranking more docs.
Back to calculators: Rerank Cost, AI Workflow Cost