RAG Engineering Mastery5 / 10
Re-Ranking — The Cheap Quality Win
Retrieval gets you 30 plausible chunks. A re-ranker reads them against the actual question and floats the truly relevant few to the top.

Embedding search is fast but shallow: it compares your question and each chunk separately, then measures distance. A re-ranker is slow but deep: it reads the question and a chunk together and scores true relevance.
The pattern: retrieve wide, re-rank narrow
- Retrieve broadly — top 30–50 chunks via hybrid search (recall-optimized; cast a wide net).
- Re-rank those with a cross-encoder against the question.
- Keep the top 3–8 for the prompt (precision-optimized).
You get the recall of wide retrieval and the precision of deep scoring, without re-ranking your whole corpus.
Why it works
A bi-encoder (embeddings) must encode a chunk before it knows your question. A cross-encoder sees both at once, so it catches relevance that distance misses — negation, specificity, "this chunk is about X but doesn't answer X."
The trade-off
Re-ranking adds latency and cost per query (you score 30–50 pairs). Tune the retrieve-width and keep-count against your eval set and latency budget — covered in articles 7 and 9.
Now the retrieval is sharp. Next: making the generator actually use it — grounding and citations.
Series — RAG Engineering Mastery
- Part 01Why Naive RAG Fails in ProductionThe 50-line vector-search demo that wows in a notebook falls apart the moment real users ask real questions. Here is why — and the map out.
- Part 02Chunking — The Decision That Sets Your CeilingYou can't retrieve what you chunked badly. Chunking is the most under-rated lever in RAG — and the cheapest to get right.
- Part 03Embeddings & Vector Stores 101An embedding turns meaning into geometry. A vector store makes that geometry searchable in milliseconds. Get both right and retrieval gets easy.
- Part 04Hybrid Retrieval — Keyword + VectorVector search understands meaning but fumbles exact terms, IDs, and rare words. Keyword search nails those and misses paraphrase. Use both.
- Part 05Re-Ranking — The Cheap Quality Win — you are hereRetrieval gets you 30 plausible chunks. A re-ranker reads them against the actual question and floats the truly relevant few to the top.
- Part 06Prompting the Generator — Grounding & CitationsGreat retrieval is wasted if the model ignores it or can't point to its sources. Grounding is a prompt-design discipline, not an afterthought.
- Part 07Evaluation — You Can't Improve What You Don't MeasureWithout an eval set, every RAG change is a vibe. With one, you tune chunking, retrieval and prompts with a number that tells you if you helped or hurt.
- Part 08Handling Hallucinations & GuardrailsWhen retrieval comes up empty, a helpful model invents. Guardrails turn 'confidently wrong' into 'honestly unsure' — the difference users actually trust.
- Part 09Cost & Latency DisciplineA RAG query touches embeddings, a vector DB, a re-ranker and an LLM. Each adds milliseconds and cents. At scale, discipline here is the difference between a margin and a bonfire.
- Part 10The Production RAG Reference ArchitectureEvery piece, assembled: ingestion, hybrid retrieval, re-ranking, grounded generation, guardrails, eval and caching — the blueprint you can ship.