NDCG measures how well a model ranks relevant items, giving more credit to relevant results that appear higher in the list. MAP@k measures precision across the ranked list by averaging precision at relevant positions. In practice, NDCG is better for evaluating order quality, while MAP@k is useful when teams want to understand how many relevant items appear within the top results.
How NDCG and MAP@k measure ranking quality differently
NDCG and MAP@k are both top-k ranking metrics, but they reward different things. NDCG is position-sensitive, so it gives extra credit when highly relevant items appear earlier in the ranked list. MAP@k is precision-oriented, so it focuses on how much precision the system maintains at the points where relevant items are retrieved.
The practical difference is that NDCG is usually better when the exact order of recommended items matters, such as homepage ranking or search-style recommendation. MAP@k is more useful when the question is whether relevant items are being surfaced somewhere in the top-k results, especially when each item is effectively either relevant or not.
NDCG also handles graded relevance more naturally, which makes it a stronger fit when relevance is not binary. If your labels distinguish between highly relevant, somewhat relevant, and irrelevant items, NDCG captures that nuance, while MAP@k tends to treat relevance as a thresholded event at each cutoff.
When each metric can change the story you tell about the model
The same recommender can look better under one metric and worse under the other because they emphasise different user outcomes. A model that places one very strong item at rank 1 and then declines may score well on NDCG, while a model that returns several relevant items later in the list may score better on MAP@k if it maintains precision across multiple hits.
This matters because metric choice shapes optimisation. If teams tune only for NDCG, they may overvalue early ranking quality and ignore whether the top-k set is broad enough. If they tune only for MAP@k, they may miss cases where the order inside the top results is poor even though the right items are present.
- Use NDCG when user satisfaction depends on the exact ranking order.
- Use MAP@k when you want to know how consistently relevant items appear within the cutoff.
- Check both when the product needs good ordering and good retrieval coverage at the same time.
Practitioner Guidance
What to verify: Confirm whether your labels are binary or graded before choosing the primary metric. If relevance is graded, NDCG is usually the cleaner signal; if it is binary, MAP@k may be easier to interpret.
Decision rule: If product success depends on the first few ranks being especially strong, prioritise NDCG. If success depends on finding as many relevant items as possible within the top-k window, prioritise MAP@k.
Common mistake: Treating the metrics as interchangeable. They are not, and using the wrong one can reward the wrong model behaviour, especially when offline evaluation is later used to justify launch or tuning decisions.
Practitioner takeaway: The right metric is the one that matches the user behaviour you care about most, because NDCG rewards ranking quality while MAP@k rewards relevant-item coverage within the cutoff.
Related resources from NHI Mgmt Group
- What is the difference between static access control and continuous access evaluation?
- What is the difference between agent skills and a large system prompt?
- What is the difference between a static data map and a living data inventory?
- What is the difference between red teaming an AI system and proving it is safe?