nDCG, or normalized Discounted Cumulative Gain, measures ranking quality when results can have graded relevance. A highly relevant document ranked first is worth more than the same document ranked tenth, and a somewhat relevant document can still get partial credit.
nDCG is useful for search and RAG systems where relevance is not binary. It captures whether the retriever orders the best evidence near the top, which matters when only a few chunks fit into the model context.