P ersona X : A Recommendation Agent-Oriented User Modeling Framework for Long Behavior Sequence (2025)

Abstract: User profile embedded in the prompt template of personalized recommendation agents play a crucial role in shaping their decision-making process. High-quality user profiles are essential for aligning agent behavior with real user interests. Typically, these profiles are constructed by leveraging LLMs for user profile modeling (LLM-UM). However, this process faces several challenges: (1) LLMs struggle with long user behaviors due to context length limitations and performance degradation. (2) Existing methods often extract only partial segments from full historical behavior sequence, inevitably discarding diverse user interests embedded in the omitted content, leading to incomplete modeling and suboptimal profiling. (3) User profiling is often tightly coupled with the inference context, requiring online processing, which introduces significant latency overhead. In this paper, we propose PersonaX, an agent-agnostic LLM-UM framework to address these challenges. It augments downstream recommendation agents to achieve better recommendation performance and inference efficiency. PersonaX (a) segments complete historical behaviors into clustered groups, (b) selects multiple sub-behavior sequences (SBS) with a balance of prototypicality and diversity to form a high-quality core set, (c) performs offline multi-persona profiling to capture diverse user interests and generate fine-grained, cached textual personas, and (d) decouples user profiling from online inference, enabling profile retrieval instead of real-time generation. Extensive experiments demonstrate its effectiveness: using only 30–50% of behavioral data (sequence length 480), PersonaX enhances AgentCF by 3–11% and Agent4Rec by 10–50%. As a scalable and model-agnostic LLM-UM solution, PersonaX sets a new benchmark in scalable user modeling. The code is available at URL .

## introduction recent advances in llms @xcite @xcite have enabled instruction-based agents @xcite to excel in autonomous interaction and decisionmaking @xcite . by integrating realistic user profiles into prompts, these agents achieve personalization and effectively mimick real user behaviors @xcite . personalized recommendation agents-such as agentcf @xcite , agent4rec @xcite , and recagent @xcite -inherit this potential yet face a challenge: users seldom state their preferences explicitly, leaving them implicit in their historical behavioural traces. hence, modeling representative descriptive user profiles from implicit feedback becomes crucial for unleashing the full power of personalized recommendation agents. recommendation agents typically employ large language models for real-time user modelling (llm-um). the profile produced by the llm is embedded in the prompt and guides the model when generating recommendations for a target item. existing llm-um methods can be grouped into three categories. demonstration approaches encode the user's behavior sequence (bs) directly into the prompt as in-context examples, allowing the llm to generalize from explicit demonstrations @xcite @xcite . summarization techniques distill extensive interaction histories into concise textual personas that capture core preference signals; this strategy, shown to improve personalization @xcite , is adopted by once @xcite and agent4rec @xcite . moreover, methods like agentcf @xcite and recagent @xcite adopt a reflection approach, employing reflection mechanisms @xcite @xcite {placeholder} figure 1 : personax is a user-modeling tool that leverages historical behavioral data to construct multiple persona, which is cached for retrieval by downstream agent. in the left panel, personax.a visualizes the overall behavior distribution, the results of clustering, and selected/unselected samples. personax.b, depicts how sampling budgets are allocated at a 50% selection ratio. llm-um depends on historical behavioral sequences (bs) that encode rich preference signals. a straightforward strategy is to employ the full data into the llm for profiling @xcite , but this quickly becomes infeasible as sequence length grows. recent sampling truncates the user's behavior sequence to its most recent interactions, prioritizing short-term interests @xcite . this strategy depends on temporal information that are only available during online inference. consequently, both the sampling and the subsequent llm-um process must be performed online. alternatively, relevance sampling @xcite @xcite selects those past behaviors most pertinent with the target item for capturing long-term preference patterns. like recent sampling, it relies on item-specific contextual signals that only become available at inference time-so this strategy also must be executed online. we identify three principal limitations in the way current llm-um methods utilize historical behavioral data: (1) difficulty profiling from long behavior sequences. summarization-based approaches are constrained by llms' maximum input length and suffer from the "lost-in-themiddle" phenomenon @xcite @xcite , whereby critical mid-sequence context is omitted, undermining accurate preference inference. reflection-based methods, in turn, incur prohibitive computational cost and latency when reasoning over very lengthy sequences. further-more, excessive behavioral data introduce noise and redundancy that obscure truly salient signals. to address these challenges, we propose per-sonax, a novel llm-um framework that performs end-to-end profile from long behavioral sequences in an offline setting, cached for online retrieval by downstream recommendation agents for decision making. such paradigm significantly reduces online inference latency and enhances overall recommendation performance, their architecture is illustrated in figure 1 . personax segments full historical behaviors into clustered groups and selects sub-behavior sequences (sbs) for each cluster with prototypicality-diversity balanced sampling. summarization or reflection is conducted on sbs in an offline manner, generating multiple fine-grained personas that capture diverse user interests. those cached textual representations are then retrieved by downstream recommendation agents during online inference stage. personax prioritizes example quality over quantity, using only a small fraction of behavioral data (sequence @xmath0, thus overcoming issues such as input length constraints and mid-content oversight. compared to both recent and relevance sampling, our method constructs a high-fidelity core-set that preserves the full spectrum of user interests, thereby avoiding information loss. per-sonax assumes responsibility for profile modeling, enabling cached profile retrieval instead of on-thefly generation and thereby eliminating application agents' online inference latency. in summary, our contributions are threefold. (1) personax framework: we introduce per-sonax, an llm-based user-profile modeling framework oriented for recommendation agents. by decoupling profile generation from online inference, personax eliminates real-time modeling overhead-accelerating inference-and delivers more representative user profiles that substantially boost downstream recommendation performance. (2) data-efficient core behavior selection: we introduce a novel strategy for selecting core behaviors via clustering, adaptive allocation of sampling budgets, and a prototypicality-diversitybalanced in-cluster selection mechanism. by using only 30-50% of the data utilization and ignore other redundant behaviors, our method generates multiple compact sub-behavior sequences (sbss), each capturing a distinct facet of user preferences. (3) extensive validation: we evaluate personax with two leading recommendation agents-agentcf and agent4rec-on next-item ranking tasks across three datasets of varying sequence lengths. personax consistently boosts ranking accuracy (3-11% for agentcf; 10-50% for agent4rec) and accelerates online inference efficiency. ## efficiency analysis recent sampling operates in constant time o(1). let o(d) denotes the time required to encode an item into an embedding vector, and o(n log k) represents the complexity of selecting the k most relevant/recent items from n items. thus relevance sampling has a time complexity of o(nd+n log k). for sbs sampling applied in personax, we use o(cluster + alg.1 + alg.2) represent the time cost for process we depict from section 3.1 to 3.3. let c denote the number of clusters, o(t ) the time complexity of a single api request to the llm, and n i the number of candidate items inferred per time. we perform an analysis of the time complexity during both offline and online stages associated with two recommendation agents agentcf and agent4rec. additionally, we evaluate their time cost with the use of personax for comparison. the results are summarized in the primary contributors to time consumption are t and d, while o(c), o(n log k), o(cluster+a.1+a.2) in ranking, clustering, and sampling are negligible. assuming @xmath1, @xmath2, @xmath3, @xmath4.1, and @xmath5, and varying n i over 5, 10, and 20. additionally, to model a realistic production setting in which recommendation agents server online continuously, we assume that persona in personax is cached for @xmath6. in practice, this conservative threshold means the persona is refreshed whenever ten new user behaviors are observed, preventing profile staleness; the actual refresh interval can be tuned empirically. because vanilla agentcf and agent4rec must regenerate the user profile at every call, their online latency is multiplied by d, whereas personax-assisted variants avoid this overhead altogether. figure 2 visualises the resulting online time consumption. the bar for agentcf relevance+reflection is omitted because its latency is orders of magnitude higher than that of the other methods and would dominate the plot. we mainly make a comparison when backbone recommendation agent as agent4rec which is more realistic, we observe that personax-assisted agent4rec reduces runtime by 95% compared with the agent4rec variant that employs relevance sampling, while recudes runtime by 91% for variants that use recent sampling. ## experiments in this section, we are to address these research questions (rqs): • rq1: how does personax improve downstream agent recommendation, and how the performance compared with baseline approaches? • rq2: how does the sampling size of historical behaviors affect the efficacy of user modeling? • rq3: how sensitive is our method to hyper-parameter settings, and how can optimal parameters be chosen? ## conclusion in this study, we present personax, a llm-um framework oriented for agent recommendation specially designed for processing long behavior sequences. personax utilizes only 30%-50% of the historical behavior data and strategically select high-quality sub-behavior sequences of short length (@xmath7. when personax integrated into existing agent recommendation methods, such as agentcf and agent4rec, personax delivers substantial performance gains-ranging from 3% to 11% over agentcf, and an impressive 10% to 50% improvement over agent4rec. theoretical analysis indicates that integrating per-sonax into downstream recommendation agents markedly reduces online inference latency-a benefit that is especially pronounced in continuously servers. we believe that personax significantly facilitate the agent recommendation in predictive accuracy and inference efficiency.