The Whole is Better than the Sum: Using Aggregated Demonstrations in In-Context Learning for Sequential Recommendation

Lei Wang, Ee-Peng Lim
3/15/2024
cs.IRcs.AIcs.CL

Official code: demoleiwang/LLMSRec_Syn (2 stars, MIT, last commit 2024-06-02).

Abstract

Large language models (LLMs) have shown excellent performance on various NLP tasks. To use LLMs as strong sequential recommenders, we explore the in-context learning approach to sequential recommendation. We investigate the effects of instruction format, task consistency, demonstration selection, and number of demonstrations. As increasing the number of demonstrations in ICL does not improve accuracy despite using a long prompt, we propose a novel method called LLMSRec-Syn that incorporates multiple demonstration users into one aggregated demonstration. Our experiments on three recommendation datasets show that LLMSRec-Syn outperforms state-of-the-art LLM-based sequential recommendation methods. In some cases, LLMSRec-Syn can perform on par with or even better than supervised learning methods. Our code is publicly available at https://github.com/demoleiwang/LLMSRec_Syn.

View on arXivView PDF

Code Implementations(1)

MIT

Code for Our NAACL Findings 2024 paper "The Whole is Better than the Sum: Using Aggregated Demonstrations in In-Context Learning for Sequential Recommendation"

21PythonMar 15, 20242 years agoMIT

Similar Papers

Cite this paper

@article{wang2024whole,
  title  = {The Whole is Better than the Sum: Using Aggregated Demonstrations in In-Context Learning for Sequential Recommendation},
  author = {Lei Wang and Ee-Peng Lim},
  year   = {2024},
  eprint = {2403.10135},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2403.10135v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2403.10135.svg)](https://codeofpaper.com/paper/2403.10135)

Discussion