MRR and nDCG
In this article
- Compute reciprocal rank, MRR and nDCG@3 for a ranked list of retrieved chunks.
- Explain why MRR and yes-or-no labels miss a difference in order that graded labels catch.
- Pick MRR or nDCG@K from how the product uses its results, and always report the K.
- Terms defined here: MRR, graded relevance, nDCG@K.
Overview
A search returns the same three passages for a customer's question in two different orders. One puts the answer first; the other buries it under a vaguer passage. A score that only checks which passages came back gives both the same number. Does the order matter, and how do you measure it?
The running example is a made-up home-internet provider, Brightline, whose support assistant pastes the top 3 chunks, short pieces cut from its help pages, into every request; its team tests it on a saved set of 60 questions. By the end you can score the order of those chunks with two metrics, MRR and nDCG, and pick the right one from how the product reads its results.
Sign in to keep reading
The rest of this article opens with an account. An account also keeps your progress and quiz results on every device, and lets you follow news for up to five topics.
Still to read in this article
- Same chunks, three orders
- Where the first useful chunk sits
- Grades, not yes or no
- Giving credit by position and grade
- Grades separate what MRR cannot
- Matching the metric to the product
- Common mistakes
- In production
- Sources
- Check yourself, 13 questions