MRR and nDCG
Ranking metrics for search: MRR scores how high the first relevant result appears, nDCG scores the order of the whole result list.
Mean reciprocal rank averages 1 divided by the position of the first relevant result: first place gives 1, third gives 0.33. It fits tasks with one right answer. Normalized discounted cumulative gain handles several relevant results with graded relevance, discounting those lower in the list, and compares the ranking with the ideal one. Both need labeled queries, and both tell you whether a reranker or hybrid search actually improved the order.
Related terms
- Reranker: A model that rescores the top search results against the query, so the most relevant ones go to the language model first.
- Hybrid search: Combining keyword search (such as BM25) with vector search, so results match both exact terms and meaning.
- Precision (AI metric): The share of returned results that are actually correct: of everything the system flagged or retrieved, how much was right.
- Top-k (retrieval): The number of highest-ranked search results passed on to the next step; in RAG, how many passages go into the prompt.
