Reference · Glossary

Re-ranking

A second pass that **re-scores retrieved chunks** with a smarter (often slower) model so the best passages rise to the top before generation.

When to use

RAG quality is "almost right" — retrieval returns relevant docs but in wrong order, or noisy neighbors slip in.

When not to

Tiny doc sets where vector search already returns perfect top-3 results.

Example

1. Vector search returns 20 chunks

2. Cross-encoder re-ranker scores each against the question

3. Top 5 re-ranked chunks go into the prompt