LogoLogo
Continuum WebsiteContinuum ApplicationsContinuum KnowledgeAxolotl Platform
Continuum Knowledge
Continuum Knowledge
  • Continuum
  • Data
    • Datasets
      • Pre Training Data
      • Types of Fine Tuning
      • Self Instruct Paper
      • Self-Alignment with Instruction Backtranslation
      • Systematic Evaluation of Instruction-Tuned Large Language Models on Open Datasets
      • Instruction Tuning
      • Instruction Fine Tuning - Alpagasus
      • Less is More For Alignment
      • Enhanced Supervised Fine Tuning
      • Visualising Data using t-SNE
      • UMAP: Uniform Manifold Approximation and Projection for Dimension Reduction
      • Training and Evaluation Datasets
      • What is perplexity?
  • MODELS
    • Foundation Models
      • The leaderboard
      • Foundation Models
      • LLama 2 - Analysis
      • Analysis of Llama 3
      • Llama 3.1 series
      • Google Gemini 1.5
      • Platypus: Quick, Cheap, and Powerful Refinement of LLMs
      • Mixtral of Experts
      • Mixture-of-Agents (MoA)
      • Phi 1.5
        • Refining the Art of AI Training: A Deep Dive into Phi 1.5's Innovative Approach
      • Phi 2.0
      • Phi-3 Technical Report
  • Training
    • The Fine Tuning Process
      • Why fine tune?
        • Does Fine-Tuning LLMs on New Knowledge Encourage Hallucinations?
        • Explanations in Fine Tuning
      • Tokenization
        • Tokenization Is More Than Compression
        • Tokenization - SentencePiece
        • Tokenization explore
        • Tokenizer Choice For LLM Training: Negligible or Crucial?
        • Getting the most out of your tokenizer for pre-training and domain adaptation
        • TokenMonster
      • Parameter Efficient Fine Tuning
        • P-Tuning
          • The Power of Scale for Parameter-Efficient Prompt Tuning
        • Prefix-Tuning: Optimizing Continuous Prompts for Generation
        • Harnessing the Power of PEFT: A Smarter Approach to Fine-tuning Pre-trained Models
        • What is Low-Rank Adaptation (LoRA) - explained by the inventor
        • Low Rank Adaptation (Lora)
        • Practical Tips for Fine-tuning LMs Using LoRA (Low-Rank Adaptation)
        • QLORA: Efficient Finetuning of Quantized LLMs
        • Bits and Bytes
        • The Magic behind Qlora
        • Practical Guide to LoRA: Tips and Tricks for Effective Model Adaptation
        • The quantization constant
        • QLORA: Efficient Finetuning of Quantized Language Models
        • QLORA and Fine-Tuning of Quantized Language Models (LMs)
        • ReLoRA: High-Rank Training Through Low-Rank Updates
        • SLoRA: Federated Parameter Efficient Fine-Tuning of Language Models
        • GaLora: Memory-Efficient LLM Training by Gradient Low-Rank Projection
      • Hyperparameters
        • Batch Size
        • Padding Tokens
        • Mixed precision training
        • FP8 Formats for Deep Learning
        • Floating Point Numbers
        • Batch Size and Model loss
        • Batch Normalisation
        • Rethinking Learning Rate Tuning in the Era of Language Models
        • Sample Packing
        • Gradient accumulation
        • A process for choosing the learning rate
        • Learning Rate Scheduler
        • Checkpoints
        • A Survey on Efficient Training of Transformers
        • Sequence Length Warmup
        • Understanding Training vs. Evaluation Data Splits
        • Cross-entropy loss
        • Weight Decay
        • Optimiser
        • Caching
      • Training Processes
        • Extending the context window
        • PyTorch Fully Sharded Data Parallel (FSDP)
        • Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolation
        • YaRN: Efficient Context Window Extension of Large Language Models
        • Sliding Window Attention
        • LongRoPE
        • Reinforcement Learning
        • An introduction to reinforcement learning
        • Reinforcement Learning from Human Feedback (RLHF)
        • Direct Preference Optimization: Your Language Model is Secretly a Reward Model
  • INFERENCE
    • Why is inference important?
      • Grouped Query Attention
      • Key Value Cache
      • Flash Attention
      • Flash Attention 2
      • StreamingLLM
      • Paged Attention and vLLM
      • TensorRT-LLM
      • Torchscript
      • NVIDIA L40S GPU
      • Triton Inference Server - Introduction
      • Triton Inference Server
      • FiDO: Fusion-in-Decoder optimised for stronger performance and faster inference
      • Is PUE a useful measure of data centre performance?
      • SLORA
  • KNOWLEDGE
    • Vector Databases
      • A Comprehensive Survey on Vector Databases
      • Vector database management systems: Fundamental concepts, use-cases, and current challenges
      • Using the Output Embedding to Improve Language Models
      • Decoding Sentence-BERT
      • ColBERT: Efficient and Effective Passage Search via Contextualized Late Interaction over BERT
      • SimCSE: Simple Contrastive Learning of Sentence Embeddings
      • Questions Are All You Need to Train a Dense Passage Retriever
      • Improving Text Embeddings with Large Language Models
      • Massive Text Embedding Benchmark
      • RocketQAv2: A Joint Training Method for Dense Passage Retrieval and Passage Re-ranking
      • LLM2Vec: Large Language Models Are Secretly Powerful Text Encoders
      • Embedding and Fine-Tuning in Neural Language Models
      • Embedding Model Construction
      • Demystifying Embedding Spaces using Large Language Models
      • Fine-Tuning Llama for Multi-Stage Text Retrieval
      • Large Language Model Based Text Augmentation Enhanced Personality Detection Model
      • One Embedder, Any Task: Instruction-Finetuned Text Embeddings
      • Vector Databases are not the only solution
      • Knowledge Graphs
        • Harnessing Knowledge Graphs to Elevate AI: A Technical Exploration
        • Unifying Large Language Models and Knowledge Graphs: A Roadmap
      • Approximate Nearest Neighbor (ANN)
      • High Dimensional Data
      • Principal Component Analysis (PCA)
      • Vector Similarity Search - HNSW
      • FAISS (Facebook AI Similarity Search)
      • Unsupervised Dense Retrievers
    • Retrieval Augmented Generation
      • Retrieval-Augmented Generation for Large Language Models: A Survey
      • Fine-Tuning or Retrieval?
      • Revolutionising Information Retrieval: The Power of RAG in Language Models
      • A Survey on Retrieval-Augmented Text Generation
      • REALM: Retrieval-Augmented Language Model Pre-Training
      • Retrieve Anything To Augment Large Language Models
      • Generate Rather Than Retrieve: Large Language Models Are Strong Context Generators
      • Active Retrieval Augmented Generation
      • DSPy: LM Assertions: Enhancing Language Model Pipelines with Computational Constraints
      • DSPy: Compiling Declarative Language Model Calls
      • DSPy: In-Context Learning for Extreme Multi-Label Classification
      • Optimizing Instructions and Demonstrations for Multi-Stage Language Model Programs
      • HYDE: Revolutionising Search with Hypothetical Document Embeddings
      • Enhancing Recommender Systems with Large Language Model Reasoning Graphs
      • Retrieval Augmented Generation (RAG) versus fine tuning
      • RAFT: Adapting Language Model to Domain Specific RAG
      • Summarisation Methods and RAG
      • Lessons Learned on LLM RAG Solutions
      • Stanford: Retrieval Augmented Language Models
      • Overview of RAG Approaches with Vector Databases
      • Mastering Chunking in Retrieval-Augmented Generation (RAG) Systems
    • Semantic Routing
    • Resource Description Framework (RDF)
  • AGENTS
    • What is agency?
      • Rephrase and Respond: Let Large Language Models Ask Better Questions for Themselves
      • Types of Agents
      • The risk of AI agency
      • Understanding Personality in Large Language Models: A New Frontier in AI Psychology
      • AI Agents - Reasoning, Planning, and Tool Calling
      • Personality and Brand
      • Agent Interaction via APIs
      • Bridging Minds and Machines: The Legacy of Newell, Shaw, and Simon
      • A Survey on Language Model based Autonomous Agents
      • Large Language Models as Agents
      • AI Reasoning: A Deep Dive into Chain-of-Thought Prompting
      • Enhancing AI Reasoning with Self-Taught Reasoner (STaR)
      • Exploring the Frontier of AI: The "Tree of Thoughts" Framework
      • Toolformer: Revolutionising Language Models with API Integration - An Analysis
      • TaskMatrix.AI: Bridging Foundational AI Models with Specialised Systems for Enhanced Task Completion
      • Unleashing the Power of LLMs in API Integration: The Rise of Gorilla
      • Andrew Ng's presentation on AI agents
      • Making AI accessible with Andrej Karpathy and Stephanie Zhan
  • Regulation and Ethics
    • Regulation and Ethics
      • Privacy
      • Detecting AI Generated content
      • Navigating the IP Maze in AI: The Convergence of Blockchain, Web 3.0, and LLMs
      • Adverse Reactions to generative AI
      • Navigating the Ethical Minefield: The Challenge of Security in Large Language Models
      • Navigating the Uncharted Waters: The Risks of Autonomous AI in Military Decision-Making
  • DISRUPTION
    • Data Architecture
      • What is a data pipeline?
      • What is Reverse ETL?
      • Unstructured Data and Generatve AI
      • Resource Description Framework (RDF)
      • Integrating generative AI with the Semantic Web
    • Search
      • BM25 - Search Engine Ranking Function
      • BERT as a reranking engine
      • BERT and Google
      • Generative Engine Optimisation (GEO)
      • Billion-scale similarity search with GPUs
      • FOLLOWIR: Evaluating and Teaching Information Retrieval Models to Follow Instructions
      • Neural Collaborative Filtering
      • Federated Neural Collaborative Filtering
      • Latent Space versus Embedding Space
      • Improving Text Embeddings with Large Language Models
    • Recommendation Engines
      • On Interpretation and Measurement of Soft Attributes for Recommendation
      • A Survey on Large Language Models for Recommendation
      • Model driven recommendation systems
      • Recommender AI Agent: Integrating Large Language Models for Interactive Recommendations
      • Foundation Models for Recommender Systems
      • Exploring the Impact of Large Language Models on Recommender Systems: An Extensive Review
      • AI driven recommendations - harming autonomy?
    • Logging
      • A Taxonomy of Anomalies in Log Data
      • Deeplog
      • LogBERT: Log Anomaly Detection via BERT
      • Experience Report: Deep Learning-based System Log Analysis for Anomaly Detection
      • Log-based Anomaly Detection with Deep Learning: How Far Are We?
      • Deep Learning for Anomaly Detection in Log Data: A Survey
      • LogGPT
      • Adaptive Semantic Gate Networks (ASGNet) for log-based anomaly diagnosis
  • Infrastructure
    • The modern data centre
      • Enhancing Data Centre Efficiency: Strategies to Improve PUE
      • TCO of NVIDIA GPUs and falling barriers to entry
      • Maximising GPU Utilisation with Kubernetes and NVIDIA GPU Operator
      • Data Centres
      • Liquid Cooling
    • Servers and Chips
      • The NVIDIA H100 GPU
      • NVIDIA H100 NVL
      • Lambda Hyperplane 8-H100
      • NVIDIA DGX Servers
      • NVIDIA DGX-2
      • NVIDIA DGX H-100 System
      • NVLink Switch
      • Tensor Cores
      • NVIDIA Grace Hopper Superchip
      • NVIDIA Grace CPU Superchip
      • NVIDIA GB200 NVL72
      • Hopper versus Blackwell
      • HGX: High-Performance GPU Platforms
      • ARM Chips
      • ARM versus x86
      • RISC versus CISC
      • Introduction to RISC-V
    • Networking and Connectivity
      • Infiniband versus Ethernet
      • NVIDIA Quantum InfiniBand
      • PCIe (Peripheral Component Interconnect Express)
      • NVIDIA ConnectX InfiniBand adapters
      • NVMe (Non-Volatile Memory Express)
      • NVMe over Fabrics (NVMe-oF)
      • NVIDIA Spectrum-X
      • NVIDIA GPUDirect
      • Evaluating Modern GPU Interconnect
      • Scalable Hierarchical Aggregation and Reduction Protocol (SHARP)
      • Next-generation networking in AI environments
      • NVIDIA Collective Communications Library (NCCL)
    • Data and Memory
      • NVIDIA BlueField Data Processing Units (DPUs)
      • Remote Direct Memory Access (RDMA)
      • High Bandwidth Memory (HBM3)
      • Flash Memory
      • Model Requirements
      • Calculating GPU memory for serving LLMs
      • Transformer training costs
      • GPU Performance Optimisation
    • Libraries and Complements
      • NVIDIA Base Command
      • NVIDIA AI Enterprise
      • CUDA - NVIDIA GTC 2024 presentation
      • RAPIDs
      • RAFT
    • Vast Data Platform
      • Vast Datastore
      • Vast Database
      • Vast Data Engine
      • DASE (Disaggregated and Shared Everything)
      • Dremio and VAST Data
    • Storage
      • WEKA: A High-Performance Storage Solution for AI Workloads
      • Introduction to NVIDIA GPUDirect Storage (GDS)
        • GDS cuFile API
      • NVIDIA Magnum IO GPUDirect Storage (GDS)
      • Vectors in Memory
Powered by GitBook
LogoLogo

Continuum - Accelerated Artificial Intelligence

  • Continuum Website
  • Axolotl Platform

Copyright Continuum Labs - 2023

On this page
  • Key Differences between the two paradigms
  • Why Choose One Over the Other: DLLM4Rec vs. GLLM4Rec
  • Best Approaches for Using LLMs in Recommendation Engines
  • Practical Applications of DLLM4Rec
  • Practical Applications of GLLM4Rec
  • Examples of Using Both Paradigms Together

Was this helpful?

  1. DISRUPTION
  2. Recommendation Engines

A Survey on Large Language Models for Recommendation

PreviousOn Interpretation and Measurement of Soft Attributes for RecommendationNextModel driven recommendation systems

Last updated 10 months ago

Was this helpful?

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)

Factor
DLLM4Rec
GLLM4Rec

Purpose

Classification or ranking tasks

Generating text-based recommendations or explanations

Model Type

Typically BERT-based

Based on GPT, T5, or BART

Output

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

Adaptation

Often fine-tuned on domain-specific data

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

Strength

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).

Aspect
Discriminative LLMs
Generative 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

Interpretability

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

Technique
Description
Pros
Cons

Fine-tuning

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

Prompting

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.

U-BERT

  • 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

GPTRec

  • 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.

ChatREC

  • 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.

UniCRS

  • 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.

LogoA Survey on Large Language Models for RecommendationarXiv.org
Two major training paradigms of large language models: Discriminative LLM (e.g. BERT) and Generative LLM (e.g. GPT)
Detailed explanation of five different training (domain adaption) manners for LLM-based recommendations