Papers › ReLLa: Retrieval-enhanced Large Language Models for Lifelong Sequential Behavior...

ReLLa: Retrieval-enhanced Large Language Models for Lifelong Sequential Behavior Comprehension in Recommendation

22 Aug 2023arXiv:2308.11131archive 2025-07-28

Jianghao Lin, Rong Shan, Chenxu Zhu, Kounianhua Du, Bo Chen, Shigang Quan, Ruiming Tang, Yong Yu, Weinan Zhang

With large language models (LLMs) achieving remarkable breakthroughs in natural language processing (NLP) domains, LLM-enhanced recommender systems have received much attention and have been actively explored currently. In this paper, we focus on adapting and empowering a pure large language model for zero-shot and few-shot recommendation tasks. First and foremost, we identify and formulate the lifelong sequential behavior incomprehension problem for LLMs in recommendation domains, i.e., LLMs fail to extract useful information from a textual context of long user behavior sequence, even if the length of context is far from reaching the context limitation of LLMs. To address such an issue and improve the recommendation performance of LLMs, we propose a novel framework, namely Retrieval-enhanced Large Language models (ReLLa) for recommendation tasks in both zero-shot and few-shot settings. For zero-shot recommendation, we perform semantic user behavior retrieval (SUBR) to improve the data quality of testing samples, which greatly reduces the difficulty for LLMs to extract the essential knowledge from user behavior sequences. As for few-shot recommendation, we further design retrieval-enhanced instruction tuning (ReiT) by adopting SUBR as a data augmentation technique for training samples. Specifically, we develop a mixed training dataset consisting of both the original data samples and their retrieval-enhanced counterparts. We conduct extensive experiments on three real-world public datasets to demonstrate the superiority of ReLLa compared with existing baseline models, as well as its capability for lifelong sequential behavior comprehension. To be highlighted, with only less than 10% training samples, few-shot ReLLa can outperform traditional CTR models that are trained on the entire training set (e.g., DCNv2, DIN, SIM). The code is available \url{https://github.com/LaVieEnRose365/ReLLa}.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2308.11131")

Code

Syntology Ran 8 of 9 code samples harvested from 1 repository linked to this paper; 1 has no recorded run. Of those that ran: 8 ran with no contract checked.

By repository: official repository: 9 samples from 1 repository, 8 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

lavieenrose365/rella officialmentioned in papermentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

9 samples harvested; 8 ran; 0 honoured the contract we drafted; 1 has no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

8ran
1unverified

Licence: 9 of the 9 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from lavieenrose365/rella. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

compute_metrics lavieenrose365/rella/finetune.py official repository ran no licence file found · pointer only · 2e09afada03cc9f1 · report
get_template lavieenrose365/rella/load_prompt_BookCrossing.py official repository ran no licence file found · pointer only · 215b58cabb52b84b · report
get_template lavieenrose365/rella/load_prompt_ml1m.py official repository ran no licence file found · pointer only · 9b2107ea7ebc55bb · report
get_template lavieenrose365/rella/load_prompt_ml25m.py official repository ran no licence file found · pointer only · 7295846e5ff4d44d · report
preprocess_logits_for_metrics lavieenrose365/rella/finetune.py official repository ran fingerprinted no licence file found · pointer only · 82d07bd787abe764 · report
preprocess_logits_for_metrics lavieenrose365/rella/inference.py official repository ran fingerprinted no licence file found · pointer only · 28989ed2d784c752 · report
row_to_prompt lavieenrose365/rella/load_prompt_BookCrossing.py official repository ran no licence file found · pointer only · 6dbd845a63cc9847 · report
row_to_prompt lavieenrose365/rella/load_prompt_ml25m.py official repository ran no licence file found · pointer only · 837190389192b1f1 · report
row_to_prompt lavieenrose365/rella/load_prompt_ml1m.py official repository unverified no licence file found · pointer only · 09c34129a8d23513 · report

Tasks

Data AugmentationLanguage ModellingLarge Language ModelRecommendation SystemsRetrieval

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Focusfail

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections