Work out recommendation diversity instantly with clear inputs, formula shown and shareable results.
Intra-list diversity is one minus the average pairwise similarity across the n(n-1)/2 pairs in a recommendation list. A list of ten near-identical products scores near zero and feels repetitive even when every item is individually well-ranked. Category spread is a complementary, coarser measure that is easier to explain to merchandising teams and easier to constrain in a ranker.
Intra-list diversity
pairs = n(n-1)/2; diversity = 1 - average pairwise similarity; category ratio = distinct categories / list size
There is a trade-off, but a small diversity constraint usually costs little precision and measurably improves engagement and satisfaction. Maximal marginal relevance is the standard way to tune it.
Whatever matches the user's notion of sameness — content embeddings, category taxonomy or co-purchase similarity. The metric is only as meaningful as that choice.