[Paper Review] Enhancing Recommendation Diversity by Re-ranking with Large Language Models
This paper proposes using large language models (LLMs) for zero-shot re-ranking to enhance recommendation diversity without requiring task-specific fine-tuning. It demonstrates that LLM-based re-rankers improve diversity over random re-ranking and outperform random baselines, though they still underperform traditional diversity-aware methods like MMR and RxQuAD, with performance varying by model and prompt design.
It has long been recognized that it is not enough for a Recommender System (RS) to provide recommendations based only on their relevance to users. Among many other criteria, the set of recommendations may need to be diverse. Diversity is one way of handling recommendation uncertainty and ensuring that recommendations offer users a meaningful choice. The literature reports many ways of measuring diversity and improving the diversity of a set of recommendations, most notably by re-ranking and selecting from a larger set of candidate recommendations. Driven by promising insights from the literature on how to incorporate versatile Large Language Models (LLMs) into the RS pipeline, in this paper we show how LLMs can be used for diversity re-ranking. We begin with an informal study that verifies that LLMs can be used for re-ranking tasks and do have some understanding of the concept of item diversity. Then, we design a more rigorous methodology where LLMs are prompted to generate a diverse ranking from a candidate ranking using various prompt templates with different re-ranking instructions in a zero-shot fashion. We conduct comprehensive experiments testing state-of-the-art LLMs from the GPT and Llama families. We compare their re-ranking capabilities with random re-ranking and various traditional re-ranking methods from the literature. We open-source the code of our experiments for reproducibility. Our findings suggest that the trade-offs (in terms of performance and costs, among others) of LLM-based re-rankers are superior to those of random re-rankers but, as yet, inferior to the ones of traditional re-rankers. However, the LLM approach is promising. LLMs exhibit improved performance on many natural language processing and recommendation tasks and lower inference costs. Given these trends, we can expect LLM-based re-ranking to become more competitive soon.
Motivation & Objective
- To investigate whether general-purpose LLMs can effectively re-rank recommendations to enhance diversity.
- To evaluate the impact of LLM-based re-ranking on the trade-off between recommendation relevance and diversity.
- To compare LLM-based re-rankers with traditional re-ranking methods (e.g., MMR, xQuAD, RxQuAD) and random re-ranking.
- To analyze the influence of prompt design, model architecture, and domain characteristics on re-ranking quality.
- To identify factors affecting invalid output generation and model reliability in zero-shot re-ranking.
Proposed method
- Frame re-ranking as a text generation task, prompting LLMs to generate a diverse ranking from a candidate set.
- Design multiple prompt templates with varying instructions—focusing on diversity, relevance, or a balance of both—using zero-shot prompting.
- Use a Matrix Factorization recommender to generate an initial candidate ranking for each user.
- Apply state-of-the-art conversational LLMs (GPT and Llama2 families) to re-rank the candidate items based on the prompt instructions.
- Assess re-ranking performance using standard diversity metrics (e.g., ILD, sRecall) and relevance metrics (e.g., NDCG, MAP).
- Conduct ablation studies on prompt templates and model variants to analyze their impact on output quality and validity.
Experimental results
Research questions
- RQ1RQ1: Can LLMs interpret and perform re-ranking tasks to improve recommendation diversity in a zero-shot setting?
- RQ2RQ2: How does LLM-based re-ranking compare to random re-ranking and traditional re-ranking methods (e.g., MMR, xQuAD, RxQuAD) in terms of diversity and relevance?
- RQ3RQ3: How do different prompt templates—emphasizing diversity, relevance, or a balance—impact the quality of the re-ranked output?
- RQ4RQ4: What factors influence the validity and reliability of LLM-generated re-rankings, such as model size, domain, or prompt structure?
- RQ5RQ5: Can prompt engineering or model choice mitigate the drop in relevance while preserving diversity gains?
Key findings
- LLM-based re-rankers significantly improve diversity over random re-ranking across all metrics, confirming their capability to interpret and act on diversity instructions.
- ChatGPT performs best among the LLMs tested, outperforming both InstructGPT and Llama2 variants in relevance and diversity trade-offs.
- Llama2-7B-Chat and Llama2-13B-Chat show lower performance than GPT models, particularly in relevance-aware metrics, though they match or exceed random baselines in diversity.
- Prompt templates emphasizing diversity alone (e.g., T1, T2) generally yield better results than those balancing diversity and relevance, suggesting that explicit diversity focus improves outcomes.
- The Anime dataset exhibits fewer invalid outputs than Goodreads, possibly due to shorter prompts or domain-specific content characteristics, though model size may also play a role.
- Feature-aware prompts (T5, T6) improve performance on Goodreads but not on Anime, indicating domain-dependent effectiveness of prompt design.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.