Customizing In-context Learning for Dynamic Interest Adaption in LLM -based Recommendation (2025)

Abstract: Frequently updating Large Language Model (LLM)-based recommender systems to adapt to dynamic user interests—as done for traditional ones—is impractical due to high training costs, even with acceleration methods. This work explores the possibility of adapting the model to dynamic user interests without any model-level updates via In-context Learning (ICL), which enables adaptation through few-shot examples within input prompts. While using recent user interactions as ICL demonstrations offers a potential solution for dynamic interest adaptation, existing LLM-based recommenders face critical limitations: recommendation-specific tuning often diminishes the model’s in-context learning ability, and the original LLM’s ICL lacks task-specific optimization for recommendations. To bridge this gap, we introduce RecICL, a framework that establishes recommendation-oriented in-context learning by structuring recent user interactions and current inputs into ICL formats. RecICL achieves dual objectives: (1) preserving fundamental ICL capabilities during recommendation adaptation and (2) dynamically capturing user preference evolution through the most recent interactions. Extensive experiments across multiple benchmarks demonstrate RecICL’s superior performance, achieving better results without model updates. Our implementation is publicly available at https://anonymous.4open.science/r/RecICL-8003 .

## introduction in recent years, llm-based recommendation has emerged as a rapidly evolving field, demonstrating the substantial potential to transform recommender systems across diverse scenarios @xcite . substantial efforts have been dedicated to this area, creating various mechanisms to align llm capabilities with recommendation tasks. among these approaches, instruction tuning on recommendation data has gained significant popularity as it addresses the fundamental limitation that recommendation-specific tasks are inherently absent from the original pretraining objectives of llms @xcite @xcite . despite progress, existing developments have overlooked dynamic interests, a crucial aspect for real-world applications. as shown in figure 1 , in the real world, user interest can shift rapidly due to the varying instant interest in dynamic environments @xcite @xcite . updating the model periodically with incoming data is typically used to capture timely user interests @xcite . however, due to the massive number of parameters in llms, such modellevel updates incur substantial computational and time costs for llm-based recommendations, making them impractical for real-world applications. recognizing the persistent issue of high update costs, this study explores the possibility of adapting the model to dynamic user interests without any model-level updates after initial training. among existing techniques, in-context learning (icl) seems to be a promising choice for timely learning user shift interests without model updates. through icl, llms can learn tasks from fewshot task examples being incorporated into their input context, without any updates to their parameters @xcite . by incorporating recent user interaction data as few-shot task examples in the input, we can expect that icl could effectively capture the interest shift from these examples. this enables the model to adapt to users' recent interests without requiring any updates to its parameters. however, directly applying icl to llm-based recommendations is problematic. intuitively, there are two options: 1) applying icl on general llms and 2) applying icl on llms tuned for recommendations. both approaches encounter challenges -the first lacks alignment with recommendation tasks, while the second often suffers from diminished icl capabilities (see section 2.3 for more details). these challenges would undoubtedly hinder the practical application of these methods. given these challenges, we consider possessing recommendation-specific icl capabilities -aligning the model with recommendation tasks while preserving and even enhancing its icl abilities. to address these challenges, we propose re-cicl, which maintains icl performance while better aligning llms with recommendation tasks. for task misalignment, recicl adapts recommedationbased instruction tuning, enabling the model to learn from real user interactions. to tackle icl degradation, recicl uses a novel example selection strategy for icl. unlike prior work that selects semantically similar examples @xcite , we choose items representing recent user interests relative to each training sample. this trains the model to adapt quickly to changing preferences using only a few contextual signals. during inference, these examples are replaced with recent user interactions, allowing dynamic updates based on current behavior. experimental results show that recicl significantly improves llms' ability to capture evolving user interests -a critical requirement for modern recommender systems. the main contributions of our work are: ## preliminary in this section, we first present the problem formulation ( § 2.1) for the studied user interest shift problem. next, we present preliminary studies ( § 2.2) to illustrate the importance of timely adapting llmbased recommenders to new user interests and analyze the potential of applying icl to address this problem ( § 2.3). ## proposed method -recicl with the insight of keeping the icl abilities when tuning llms to recommendation tasks, we proposed recicl for achieving adaptive personalized recommendation. the core lies in directly organizing the training example in an icl format, making the icl usable during tuning while capturing users' dynamic interests. as figure 4 shows, our total re-cicl framework includes three main components: ## experiments in this section, we will introduce the experiment setting and answer the following research questions: rq1: how does recicl perform under user interest shifts compared to full-data-updated models? rq2:whether recicl performance more stable across all time periods when comparing with other baselines? rq3: what's the effect of few-shot selection foot_2 of recicl?rq4: can recicl effectively adapt to the most extreme cases of user interest shifts when no historical data for the target user is available during training? ## related work in this section, we introduce two key topics central to our work: streaming recommender systems and llm-based recommender systems. the relevance of streaming recommender systems lies in their focus on addressing dynamic user interest shifts and leveraging real-time user interactions, which aligns with our goal of adapting to evolving user preferences. meanwhile, llm-based recommender systems build upon prior works that explore the application of llms in recommender systems. ## conclusion and future work in this paper, we highlight the challenges faced by llms in recommender systems when dealing with user interest shift. unlike traditional models, llms cannot timely update their parameters due to high training costs. to address this issue, we propose recicl, which ensures that the llm aligns with the recommendation scenario while preserving and enhancing its in-context learning capabilities in the recommendation context. during deployment, it can utilize the user's most recent feedback by inputting this feedback as few-shot examples to the model, allowing it to capture the user's dynamic interests. extensive experimental results also illustrate the effectiveness and adaptability of recicl, successfully adapting to dynamic user interest without any model-level updates. in the future, we plan to explore ways to enable llms to better utilize collaborative information from updated traditional models.