Table of Contents
Fetching ...

Memory Assisted LLM for Personalized Recommendation System

Jiarui Chen

TL;DR

This work addresses the challenge of personalized recommendations with evolving user histories by introducing MAP, a memory-assisted LLM-based recommender. MAP maintains a retrievable user memory, detects when to retrieve or update memory, and integrates only the most relevant past interactions into prompts, enabling efficient, long-term personalization. Across single-domain (movies) and cross-domain (movies to books) experiments, MAP consistently improves MAE over baselines, with larger gains as memory grows, and reduces computational costs. The approach offers a scalable pathway for deploying personalized LLM-based RS in real-world settings where user histories continually change.

Abstract

Large language models (LLMs) have demonstrated significant potential in solving recommendation tasks. With proven capabilities in understanding user preferences, LLM personalization has emerged as a critical area for providing tailored responses to individuals. Current studies explore personalization through prompt design and fine-tuning, paving the way for further research in personalized LLMs. However, existing approaches are either costly and inefficient in capturing diverse user preferences or fail to account for timely updates to user history. To address these gaps, we propose the Memory-Assisted Personalized LLM (MAP). Through user interactions, we first create a history profile for each user, capturing their preferences, such as ratings for historical items. During recommendation, we extract relevant memory based on similarity, which is then incorporated into the prompts to enhance personalized recommendations. In our experiments, we define a new task that enables testing with varying memory size under two scenarios: single domain where memory and tasks are from the same category and cross-domain (e.g. memory from movies and recommendation tasks in books). The results show that MAP outperforms regular LLM-based recommenders that integrate user history directly through prompt design. Moreover, as user history grows, MAP's advantage increases in both scenarios, making it more suitable for addressing successive personalized user requests.

Memory Assisted LLM for Personalized Recommendation System

TL;DR

This work addresses the challenge of personalized recommendations with evolving user histories by introducing MAP, a memory-assisted LLM-based recommender. MAP maintains a retrievable user memory, detects when to retrieve or update memory, and integrates only the most relevant past interactions into prompts, enabling efficient, long-term personalization. Across single-domain (movies) and cross-domain (movies to books) experiments, MAP consistently improves MAE over baselines, with larger gains as memory grows, and reduces computational costs. The approach offers a scalable pathway for deploying personalized LLM-based RS in real-world settings where user histories continually change.

Abstract

Large language models (LLMs) have demonstrated significant potential in solving recommendation tasks. With proven capabilities in understanding user preferences, LLM personalization has emerged as a critical area for providing tailored responses to individuals. Current studies explore personalization through prompt design and fine-tuning, paving the way for further research in personalized LLMs. However, existing approaches are either costly and inefficient in capturing diverse user preferences or fail to account for timely updates to user history. To address these gaps, we propose the Memory-Assisted Personalized LLM (MAP). Through user interactions, we first create a history profile for each user, capturing their preferences, such as ratings for historical items. During recommendation, we extract relevant memory based on similarity, which is then incorporated into the prompts to enhance personalized recommendations. In our experiments, we define a new task that enables testing with varying memory size under two scenarios: single domain where memory and tasks are from the same category and cross-domain (e.g. memory from movies and recommendation tasks in books). The results show that MAP outperforms regular LLM-based recommenders that integrate user history directly through prompt design. Moreover, as user history grows, MAP's advantage increases in both scenarios, making it more suitable for addressing successive personalized user requests.
Paper Structure (25 sections, 1 equation, 7 figures, 4 tables)

This paper contains 25 sections, 1 equation, 7 figures, 4 tables.

Figures (7)

  • Figure 1: Pipeline of our proposed Memory-Assisted LLM-based recommendation system for personalization. The system consists of five key components: the detection module, user profile, retrieval module, update module, and the language model. The detection module classifies user queries, triggering either memory retrieval for generating recommendations or profile updates based on user preferences. The retrieved memory data is then passed to the language model to provide personalized recommendations.
  • Figure 2: The prompt used for detect module.
  • Figure 3: Inner Structure of the Retrieval Module. The retrieval module consists of three key steps: 1) loading the stored original user profiles; 2) calculating similarity scores between stored items and the current query, and 3) selecting the most relevant items from the user's history. These relevant items are then fed into the language model to assist in generating personalized recommendations.
  • Figure 4: The prompt template which combines the retrieved memory and conducts recommendations for a new item.
  • Figure 5: The prompt used for Update Module
  • ...and 2 more figures