A Survey on Large Language Models for Recommendation

This popular June 2024 paper provides a comprehensive survey of the use of Large Language Models (LLMs) in recommendation systems.

LLMs can excel at learning universal representations. These models leverage high-quality textual representations and extensive external knowledge to establish correlations between users and items. This allows them to play a role in enhancing recommendation quality.

The paper categorises LLM-based recommendation systems into two main paradigms

  • Discriminative LLMs for Recommendation (DLLM4Rec)

  • Generative LLMs for Recommendation (GLLM4Rec)



Classification or ranking tasks

Generating text-based recommendations or explanations

Model Type

Typically BERT-based

Based on GPT, T5, or BART


Scores, probabilities, or classifications

Natural language text (recommendations, explanations, responses)

Task Examples

Item ranking, relevance scoring, user-item matching

Generating personalised recommendations, explaining recommendations, conversational recommendations


Often fine-tuned on domain-specific data

Various techniques: fine-tuning, prompt engineering, in-context learning


Understanding context and nuanced relationships between users and items

Generating human-like text, providing explanations, handling open-ended tasks

Key Differences between the two paradigms

This table tries to capture the main differences between Discriminative LLMs for Recommendation (DLLM4Rec) and Generative LLMs for Recommendation (GLLM4Rec).

AspectDiscriminative LLMsGenerative LLMs

Nature of Output

Structured outputs (scores, classifications)

Free-form text

Task Flexibility

More limited, focused on specific tasks

Wider range, including natural language generation


Less interpretable

More interpretable (natural language explanations)

Input Format

Often structured input data

Can handle unstructured, natural language inputs

Adaptation Techniques

Primarily fine-tuning

Fine-tuning, prompt engineering, in-context learning

Why Choose One Over the Other: DLLM4Rec vs. GLLM4Rec

When deciding between DLLM4Rec and GLLM4Rec for your recommendation system, you need to consider your specific requirements and use case scenarios.

Choosing DLLM4Rec

DLLM4Rec is the optimal choice when you require precise scoring or classification for recommendation tasks.

This model excels in scenarios where your input data is structured, such as in traditional recommendation environments like e-commerce or streaming services. One of the significant advantages of using DLLM4Rec is its computational efficiency.

Discriminative models, like DLLM4Rec, are typically more efficient at inference time, making them ideal for real-time recommendation systems where speed and accuracy are critical.

Choosing GLLM4Rec

GLLM4Rec is the preferred option when you aim to generate natural language recommendations or explanations.

This model is particularly suited for open-ended tasks or conversational recommendation scenarios where the interaction with the user is more dynamic and flexible.

GLLM4Rec offers the versatility needed to handle a wide range of recommendation-related tasks, providing explainability that can enhance user trust and engagement.

Additionally, GLLM4Rec leverages zero-shot or few-shot learning capabilities, making it highly effective for new domains or tasks where training data may be limited. This ability to adapt to new situations with minimal data makes GLLM4Rec a powerful tool for innovative recommendation solutions.

Certainly! I'll create a table that expands on these different adaptation strategies for LLMs in recommendation tasks. The table will include the approach, when you might use it, its advantages, limitations, and any other relevant factors.

Best Approaches for Using LLMs in Recommendation Engines

Fine-tuning LLMs on domain-specific data

This approach adapts pre-trained LLMs to specific recommendation tasks by further training on task-specific datasets. It's effective for aligning LLM knowledge with domain-specific requirements.

Prompt Engineering

Designing effective prompts to guide LLMs in understanding and executing recommendation tasks. This can include task descriptions, user behavior injections, and format indicators.

Instruction Tuning

Fine-tuning LLMs on multiple recommendation tasks with different types of instructions. This enhances the model's ability to understand and follow various recommendation-related instructions.

Hybrid Approaches

Combining traditional recommendation techniques with LLM capabilities. For example, using LLMs to enhance feature representation or generate explanations for recommendations.

In-context Learning

Using few-shot learning capabilities of LLMs by providing demonstration examples in the prompt. This can be particularly useful for cold-start problems or when adapting to new domains.

These approaches demonstrate the versatility of LLMs in recommendation systems, from enhancing feature representation to directly generating recommendations and explanations. The choice of approach depends on the specific task, available data, and computational resources.

Techniques for Using Large Language Models (LLMs) in Recommendation Systems



Adapts pre-trained LLMs to specific recommendation tasks by further training on domain-specific data.

-Significantly improves performance on specific tasks

-Adapts model to domain-specific language and patterns

-Requires computational resources

-Risk of catastrophic forgetting

-May overfit on small datasets

Prompt Tuning

Optimises continuous prompt embeddings while keeping LLM parameters frozen to align the recommendation task

-More parameter-efficient than full fine-tuning

-Effective with less training data - Easier to adapt to multiple tasks

-May not achieve performance of full fine-tuning

-Requires careful prompt design

Instruction Tuning

Fine-tunes LLMs on diverse instruction-following tasks to improve their ability to understand and execute various recommendation-related instructions.

-Improves model's ability to follow diverse instructions

-Enhances zero-shot performance on new tasks

-Leads to more robust and flexible models

-Requires careful curation of instruction dataset

-May not perform as well as task-specific fine-tuning on individual tasks

In-context Learning

Provides task-specific examples in the input prompt, allowing the LLM to adapt to new tasks without parameter updates.

-No need to retrain the model

-Highly flexible and adaptable

-Can handle new tasks or domains on-the-fly

- Performance dependent on quality and relevance of examples

-Limited by context window size

-May not perform as well as fine-tuned models


Involves designing suitable instructions and prompts to help LLMs understand and solve recommendation tasks without parameter updates.

-Cost-effective and pragmatic approach

-Leverages zero-shot capabilities of LLMs

-Highly flexible for different recommendation tasks

-May not achieve performance of fine-tuned models

-Requires careful prompt engineering

-Can be sensitive to prompt wording

Each of these techniques has its strengths and is suitable for different scenarios in recommendation systems. The choice depends on factors such as available data, computational resources, desired flexibility, and specific task requirements.

Practical Applications of DLLM4Rec

NRMS (Neural News Recommendation Model with Attentive Multi-View Learning)

  • Use Case: Personalised news recommendation

  • Application: Implemented in a news aggregator app, NRMS ranks articles based on user preferences and reading history. The model uses multi-view learning to capture different aspects of user behavior, providing highly personalized content.


  • Use Case: User representation learning for cross-domain recommendation

  • Application: Deployed on an e-commerce platform, U-BERT facilitates recommendations across different product categories by leveraging user behavior in one category. This model enhances the ability to suggest relevant products by understanding user preferences holistically.

BECR (BERT-Enhanced Composite Re-ranking)

  • Use Case: Improving search result ranking

  • Application: Used by a job search website, BECR re-ranks job listings to enhance relevance to the user's query and profile. This model combines BERT's language understanding capabilities with composite re-ranking strategies to improve search outcomes.

Practical Applications of GLLM4Rec


  • Use Case: Sequential recommendation

  • Application: Integrated into a music streaming service, GPTRec suggests the next song based on the user's listening history. By understanding sequential patterns in user behavior, the model provides timely and relevant music recommendations.


  • Use Case: Conversational recommendation

  • Application: Employed by a travel agency chatbot, ChatREC engages users in dialogue to discern their preferences and suggest vacation packages. This conversational approach allows for more personalised and interactive recommendations.


  • Use Case: Unified conversational recommendation

  • Application: Functioning as a virtual shopping assistant, UniCRS can both answer product-related questions and make personalised recommendations. This model supports a seamless user experience by integrating product information with personalized suggestions.

PBNR (Prompt-Based News Recommendation)

  • Use Case: News recommendation with textual descriptions

  • Application: Used in a news app, PBNR generates personalised news digests with explanations for why each article was recommended. This approach not only personalises the content but also provides transparency and context for the recommendations.

Examples of Using Both Paradigms Together

E-commerce Product Recommendation

  • DLLM4Rec: Use BERT-based models to encode product descriptions and user reviews, creating rich embeddings for products and users.

  • GLLM4Rec: Use GPT-based models to generate personalized product descriptions and explain recommendations to users.

  • Combined Approach: Use the DLLM4Rec embeddings to find relevant products, then use GLLM4Rec to generate natural language explanations for the recommendations.

Movie Recommendation System

  • DLLM4Rec: Employ a BERT-based model to understand and classify user preferences based on their viewing history and ratings.

  • GLLM4Rec: Use a T5-based model to generate personalized movie synopses and explain why a movie might appeal to the user.

  • Combined Approach: The DLLM4Rec model ranks movies, while the GLLM4Rec model provides engaging, personalized descriptions of the top recommendations.

Job Recommendation Platform

  • DLLM4Rec: Use RoBERTa to encode job descriptions and candidate resumes, creating embeddings for matching.

  • GLLM4Rec: Employ GPT to generate tailored job application advice based on the match between a candidate's profile and a job description.

  • Combined Approach: DLLM4Rec finds suitable job matches, while GLLM4Rec generates personalized cover letter templates and interview preparation tips.

Restaurant Recommendation App

  • DLLM4Rec: Use BERT to understand and classify user preferences based on their dining history and reviews.

  • GLLM4Rec: Use BART to generate personalised restaurant descriptions and menu recommendations.

  • Combined Approach: DLLM4Rec ranks restaurants, while GLLM4Rec engages the user in a conversation about their dining preferences and generates natural language explanations for the recommendations.

These examples demonstrate how combining the strengths of both DLLM4Rec and GLLM4Rec can lead to more powerful and user-friendly recommendation systems.

The discriminative models provide accurate matching and ranking, while the generative models enhance the user experience through natural language interaction and explanation.

Last updated


Continuum - Accelerated Artificial Intelligence

Continuum WebsiteAxolotl Platform

Copyright Continuum Labs - 2023