June 06, 2025
Large Language Model (LLM) empowered agents have recently emerged as advanced paradigms that exhibit impressive capabilities in a wide range of domains and tasks. Despite their potential, current LLM agents often adopt a one-size-fits-all approach, lacking the flexibility to respond to users’ varying needs and preferences. This limitation motivates us to develop PersonaAgent, the first personalized LLM agent framework designed to address versatile personalization tasks. Specifically, PersonaAgent integrates two complementary components: a personalized memory module that includes episodic and semantic memory mechanisms; a personalized action module that enables the agent to perform tool actions tailored to the user. At the core, the persona (defined as unique system prompt for each user) functions as an intermediary: it leverages insights from personalized memory to control agent actions, while the outcomes of these actions in turn refine the memory. Based on the framework, we propose a test-time user-preference alignment strategy that simulate the latest \(n\) interactions to optimize the persona prompt, ensuring real-time user preference alignment through textual loss feedback between simulated and ground-truth responses. Experimental evaluations demonstrate that PersonaAgent significantly outperforms other baseline methods by not only personalizing the action space effectively but also scaling during test-time real-world applications. These results underscore the feasibility and potential of our approach in delivering tailored, dynamic user experiences.
For a long time, humanity has pursued the ambitious goal of creating artificial intelligence capable of matching or surpassing human-level cognitive capabilities [1], thereby effectively assisting, augmenting, and enhancing human activities across numerous domains. This pursuit has been driven by two fundamental principles: achieving superior intelligence [2]–[4] and enhancing personalization [5], [6] as shown in Figure 1. Towards superior intelligence, large language models (LLMs), such as GPT [7], Claude [8], and LLaMa [9], have revolutionized various domains, demonstrating emergent capabilities in reasoning [10], language comprehension [7], and instruction following [11].
Beyond standalone LLMs, LLM-empowered agents [12] represent a paradigm shift, integrating external tools [13]–[15], memory mechanisms [16], [17], and goal-directed reasoning [18], [19] to enhance their utility and autonomy. These agents move closer to human-like intelligence, capable of performing complex tasks and interacting with users more naturally and effectively. However, to truly harness the potential of these intelligent systems in everyday human contexts, it must be capable of adapting tailored behaviors and interactions to cater to different users [20]. Despite their impressive versatility, existing LLMs and agents, primarily trained on generic large-scale datasets [7]–[9] or armed with general action tools [18], [21], inherently lack the capacity to dynamically utilize the user personal data and adapt to evolving preferences unique to each user.
Personalization, therefore, emerges as a critical factor for enabling agents to deliver more relevant responses, foster deeper user engagement, and establish trust through tailored interactions [22]–[24]. As Table 1 highlights, achieving effective personalization intelligence can be measured from four critical perspectives: agentic intelligence, real-world applicability, personal data utilization, and preference alignment. Yet, balancing these dimensions simultaneously remains a fundamental challenge. Early efforts for aligning LLMs with human preferences, such as supervised fine-tuning [25] and reinforcement learning from human feedback (RLHF) [26], [27], have improved the naturalness of instruction-following behaviors for generalized human preference but fall short in individual user preference alignment and personal data utilization. Recent advances, such as user-specific fine-tuning [28], [29], enable individual-level personalization but face real-world application challenges due to their computational complexity, which increases dynamically with large-scale users and demands frequent model updates. Alternatively, non-parametric personalization workflows [30]–[32], utilize external personalized data but rely on fixed workflows with limited data retrieval capabilities. Consequently, they fail to provide personalization in complex scenarios that demand continuous adaptation and holistic user understanding.
| Approach Categories | Agentic | Real-world | Personal Data | Preference |
| Intelligence | Applicability | Utilization | Alignment | |
| Human-Preference Aligned | ||||
| User-Specific Fine-Tuning | ||||
| Personalized LLM Workflow | ||||
| General LLM Agent | ||||
| Personalized LLM Agent (ours) |
: fully covered, : partially covered, : not covered at all.
Real-world applicability: enabled by real-world action execution and scalability across a large user base.
Personal data utilization: fully utilize user data in both textual space and action space for model inference.
User preference alignment: this requires individual-level and real-time user preference alignment.
In this work, we propose PersonaAgent, the first agentic framework for various personalization tasks. Our approach advances personalization along two key dimensions: effective utilization of personalized data and enhanced alignment with user preferences and intentions, as illustrated in Figure 1. PersonaAgent incorporates a personalized memory module that combines episodic memory for capturing detailed, context-rich user interactions and semantic memory for generating stable, abstracted user profiles. Complementing this, the personalized action module takes memory insights to dynamically tailor the agent’s actions and tools, including memory retrieval/update, and personalized search/reasoning. Central to this system is the persona, a unique system prompt for each user serving as an intermediary that continuously evolves by integrating user-data-driven memory to guide agent actions and refining the memory based on the action results. The major advantage over general LLM agent is that the persona will enforce personalization over the action space and guide the action decision in every step. To improve user preference modeling and real-time adaptability, we introduce a novel test-time user-preference alignment strategy, simulating recent interactions to optimize the persona prompt through textual loss optimization [33]. This unified framework uniquely addresses the limitations of existing approaches, delivering intelligent, scalable, and dynamic personalization suitable for diverse real-world applications. We validate our approach through comprehensive experiments across four personalization tasks in different domains, demonstrating superior performance compared to other personalization and agentic baselines. Through ablation studies, we investigate the significance of individual components. Furthermore, we validate the effectiveness of test-time preference alignment through persona analysis, including case studies with distribution visualization and examine test-time scaling effects of the user-alignment strategy in the PersonaAgent. The contribution of this paper is summarized as follows:
We introduce PersonaAgent, the first personalized agent framework for versatile personalization tasks within a unified memory-action design.
We propose user-specific persona for the agent as the intermediary to bridge the gap between designed personalized memory and action modules, achieving personalization over action spaces.
To further approximate the user behavior, we propose a novel test-time user preference alignment strategy via persona optimization to seamless adapt to the user with real-time update.
We demonstrate that PersonaAgent with test-time alignment achieves state-of-the-art results on various personalized decision making tasks over different personalization and agentic baselines.
As in Figure 1, PersonaAgent extends general LLM agent architectures by incorporating user‑specific personalization via two complementary modules, including personalized memory and action, interconnected through a dynamically evolving persona. This design enables the agent to adapt its behavior based on each individual’s context and preferences, yielding more coherent and tailored interactions.
A persona is a structured representation that unifies persistent user‑specific memory (e.g., long‑term preferences) and explicit agent instructions (e.g., tool usage guidelines), forming the unique system prompt for each user that governs all the user–agent interactions.
To overcome the limitations of LLM in modeling long-horizon user behavior, episodic memory retains fine-grained, temporally grounded user experiences, enabling the agent to reason about what happened, when, and in what context [34]. In PersonaAgent, episodic memory records fine‑grained, time‑stamped user interactions to support context‑aware personalization. Inspired by cognitive memory theory [35], we maintain for each user \(u\) an episodic buffer \[\mathcal{D}^u = \bigl\{(q_i, r^{\text{gt}}_i, m_i)\bigr\}_{i=1}^{N^u},\] where \(q_i\) is a past query, \(r^{\text{gt}}_i\) the corresponding true user response, \(m_i\) auxiliary metadata (e.g., timestamp, session context), and \(N^u\) is the total number of interactions. Upon receiving a new query \(q^*\), its embedding \(\mathbf{h}_{q^*}=f_{\mathrm{enc}}(q^*)\) is computed and compared to stored memory events embeddings \(\mathbf{h}_i=f_{\mathrm{enc}}(\mathcal{D}^u_i )\). The top‑\(K\) most similar memories, \[\mathcal{R}^u(q^*) = \mathop{\mathrm{TopK}}_{i\in[1,N^u]}\;\mathrm{sim}(\mathbf{h}_{q^*},\mathbf{h}_i),\] are retrieved and used to ground the agent’s next response, thereby preserving alignment and consistency with the user’s behavior history.
To support scalable and stable user-level personalization beyond accumulating event-level interactions, semantic memory is designed to capture and consolidate abstract user traits that persist across time and contexts [35]. Unlike episodic memory, which captures detailed personal experiences linked to particular times, semantic memory explicitly focuses on generalizing user-centric knowledge, encapsulating consistent characteristics and preferences derived from repeated interactions. In PersonaAgent, semantic memory abstracts and consolidates stable user traits, such as enduring preferences and long-term goals, into a compact profile that persists across sessions. Formally, we define a summarization function \(f_s\) that integrates the episodic memory events into a coherent profile: \[\mathcal{P}^u = f_s\bigl(S_t,\mathcal{D}^u\bigr),\] where \(S_t\) is the task-based summarization prompt. This profile \(\mathcal{P}^u\) serves as a long‑term user knowledge base, ensuring that the agent’s behavior remains aligned with the user’s established characteristics even as individual events are not recalled from the episodic memory.
We consider the setting of an agent interacting with an environment to assist a particular user to solve tasks. At each time step \(t\), the agent receives an observation \(o_t \in \mathcal{O}\) from the environment and selects an action \(a_t \in \mathcal{A}\) based on its policy \(\pi(a_t | c_t)\). Different from general LLM-based agents adopting general tools \(\mathcal{A}\) and fixed policies \(\pi\), this personalized action module governs how the agent selects and parametrizes its actions in service of the user. At each time step \(t\), the agent observes \(o_t\in\mathcal{O}\) and, conditioned on the context including actions and observations \(c_t=(o_1,a_1,\dots,o_{t-1},a_{t-1},o_t)\) and the current persona \(P\), determines action \(a_t\) according to \[a_t \sim \pi_P\bigl(\,\cdot\mid c_t\bigr), \qquad a_t \in \hat{\mathcal{A}}.\] We augment the fundamental action space \(\hat{\mathcal{A}}= \mathcal{A} \cup \mathcal{D}\) with tools to access personalized user data and histories \(\mathcal{D}\). The persona \(P\) modulates the policy \(\pi_P\), thereby tailoring both general tools (e.g., web search) and personalized operations (e.g., memory retrieval) to the specific user.
To achieve individual-level user preference optimization in real-world deployment, we design test-time alignment mechanism that dynamically adapts the agent’s decisions and tool usage to each specific user. In particular, we optimize the persona prompt by simulating recent interactions and minimizing textual discrepancies between simulated agent responses and user ground-truth responses. Given \(n\) recent user interaction batch data \(\mathcal{D}_{batch} = \{(q_j, \hat{r}_j, r_j^{gt})\}_{j=1}^n\), where \(q_j\) is query, \(\hat{r}_j\) is agent response, and \(r_j^{gt}\) is the ground-truth responses, we optimize the persona \(P\) for each iteration via text gradients [33] using a textual loss function \(L\): \[P^* = \arg\min_{P} \sum_{j=1}^{n} L(\hat{r}_j, r_j^{gt}|q_j),\] where \(\hat{r}_j\) is simulated responses generated by the agent conditioned on the persona \(P\).
As shown in Algorithm 2, the optimization involves iteratively simulating agent responses, computing the textual feedback loss, and updating the persona prompt using textual gradient optimization. While the set \(\hat{\mathcal{A}}\) remains fixed, the agent’s behavior emerges to the personalized policy \(\pi_{P^*}(a_t | c_t)\) which leverages the optimized persona \(P^*\) to choose optimal actions \(a_t \in \mathcal{A}\) and corresponding action parameters such as search query. This iterative optimization ensures the persona continuously approximates individual user preferences and intentions, enabling adaptive, personalized application scenarios. The textual optimization and prompt can be found in Appendix 6 and Appendix 7. Additionally, the alignment process is conducted asynchronously with user instructions and does not affect response latency (Appendix 16).
llcccccccc & & & & &
(lr)3-4 (lr)5-6 (lr)7-8 & Metrics & Prompt & ICL & RAG & PAG & ReAct & MemBank &
& Acc. \(\uparrow\) & 0.772 & 0.780 & 0.715 & 0.837 & 0.837 & 0.862 & 0.919
& F1 \(\uparrow\) & 0.771 & 0.766 & 0.714 & 0.837 & 0.853 & 0.861 & 0.918
& Acc. \(\uparrow\) & 0.387 & 0.283 & 0.427 & 0.430 & 0.450 & 0.470 & 0.513
& F1 \(\uparrow\) & 0.302 & 0.217 & 0.386 & 0.387 & 0.378 & 0.391 & 0.424
& Acc. \(\uparrow\) & 0.660 & 0.388 & 0.742 & 0.768 & 0.639 & 0.741 & 0.796
& F1 \(\uparrow\) & 0.386 & 0.145 & 0.484 & 0.509 & 0.381 & 0.456 & 0.532
& MAE \(\downarrow\) & 0.295 & 0.277 & 0.313 & 0.339 & 0.313 & 0.321 & 0.241
& RMSE \(\downarrow\) & 0.590 & 0.543 & 0.713 & 0.835 & 0.590 & 0.582 & 0.509
We compare PersonaAgent with a comprehensive set of baselines across three major categories: non-personalized methods, personalized workflow approaches, and general-purpose agentic systems. Non-personalized models include direct prompting, as well as in-context learning (ICL) [36] that prepends a few-shot demonstration of examples into the prompt without explicit modeling of user preferences. Personalized workflow methods include retrieval-based models RAG [30], and PAG [32], which introduces profile-augmented generation beyond RAG. In addition, we benchmark against two prominent general agent baselines: ReAct [18], which integrates tool use and reasoning via interleaved action planning, and MemBank [37], which introduces an explicit long-term memory module to support task generalization. Unless otherwise specified, all models are evaluated using Claude‑3.5 Sonnet [8] under a unified evaluation pipeline with identical inputs and output formats, ensuring a fair comparison. For PersonaAgent, the persona initialization prompt is detailed in Appendix 8, and the personalized action and tool implementations are provided in Appendix 9. Further experimental details can be found in Appendix 10.
We evaluate PersonaAgent on the LaMP [30] benchmarks and mainly use four decision-making tasks to assess the effectiveness of personalized agents in diverse personalization domains. Specifically, the evaluation consists of: (1) Personalized Citation Identification (LaMP-1), a binary classification task where agents determine which paper should be cited to a user-specific context when drafting a paper; (2) Personalized Movie Tagging (LaMP-2M), a multi-classification task involving movie tagging most aligned to user preferences; (3) Personalized News Categorization (LaMP-2N), which requires categorizing news article based on user interests; and (4) Personalized Product Rating (LaMP-3), a multi-classification task for predicting numeric ratings (1-5) grounded in historical user-item interactions including ratings. Beyond the agent evaluations on decision-making tasks, we also present the text generation tasks, including Personalized News Headline Generation (LaMP-4) and Personalized Scholarly Title Generation (LaMP-5) in Appendix 11 and Appendix 12.
lcccccccc & & & &
(lr)2-3 (lr)4-5 (lr)6-7 (lr)8-9 Variants & Acc.\(\uparrow\) & F1\(\uparrow\) & Acc.\(\uparrow\) & F1\(\uparrow\) & Acc.\(\uparrow\) & F1\(\uparrow\) & MAE\(\downarrow\) & RMSE\(\downarrow\)
PersonaAgent & 0.919 & 0.918 & 0.513 & 0.424 & 0.796 & 0.532 & 0.241 & 0.509
w/o alignment & 0.894 & 0.893 & 0.487 & 0.403 & 0.775 & 0.502 & 0.259 & 0.560
w/o persona & 0.846 & 0.855 & 0.463 & 0.361 & 0.769 & 0.483 & 0.277 & 0.542
w/o Memory & 0.821 & 0.841 & 0.460 & 0.365 & 0.646 & 0.388 & 0.348 & 0.661
w/o Action & 0.764 & 0.789 & 0.403 & 0.329 & 0.626 & 0.375 & 0.375 & 0.756
As shown in Table [tab:main95results], PersonaAgent achieves the best performance across all four decision-making tasks, outperforming non-personalized, personalized, and agentic baselines. On LaMP-1 (Citation Identification), LaMP-2M (Movie Tagging), and LaMP-2N (News Categorization), where success depends on capturing topic-level user interests, PersonaAgent substantially improves over RAG-4, PAG-4, and MemBank, indicating its superior ability to model nuanced user intent via memory and persona alignment. Note that when few‑shot examples are irrelevant to the user preference, ICL often underperforms compared to direct prompting, underscoring the importance of personalization techniques for user‑specific tasks. In the LaMP‑3 (Product Rating) task, which challenges user understanding by requiring personalized numeric predictions from user descriptions, PersonaAgent achieves the lowest MAE and RMSE, demonstrating that its test‑time alignment mechanism effectively generalizes to personalized rating scenarios. In contrast, both other personalized workflows and general‑purpose agents fail to outperform direct prompting. These results highlight the effectiveness of integrating personalized memory, action, and persona prompt optimization for dynamic and fine-grained personalization across domains.
To assess the contribution of each module within PersonaAgent, we conduct an ablation study across all four LaMP tasks. As shown in Table [tab:ablation], removing the test-time alignment module leads to a noticeable drop in performance across the board, confirming its critical role in adapting to real-time user preferences. Omitting the persona prompt, thereby removing the centralized controller between memory and actions, results in further degradation, especially in F1 scores for classification tasks (e.g., a drop from 0.893 to 0.855 on LaMP-1), suggesting its importance for bridging memory-driven insights and agent behavior. Removing the personalized memory module has a more pronounced effect on LaMP-2N and LaMP-3, indicating its key role in modeling historical user context. Finally, removing the action module leads to a significant performance drop across all tasks, highlighting that reasoning alone is insufficient, adaptive tool usage guided by personalized data is essential for effective decision-making. Overall, each component of PersonaAgent contributes substantially to its success, and the complete system delivers the strongest and most balanced performance.
To better understand the impact of test-time alignment on persona for user modeling, we visualize the optimized persona embeddings using t-SNE [38] on LaMP-2M. In Figure 3, each point corresponds to a learned persona after the test-time user preference alignment, and we highlight three representative users (A, B, C) alongside the initial system prompt template. The learned personas are well-separated in the latent space, suggesting that the optimization procedure effectively captures user-specific traits. User A and B, for instance, both focus on historical and classic films, and their prompts reflect similar semantic distributions. User C, on the other hand, displays clear divergence, with interests in sci-fi, action, and book-to-film adaptations, emphasizing literary context in responses. Note that, due to space limitations, only partial personas are presented here; the full versions are available in Appendix 13. These qualitative differences, emerging from test-time user preference alignment, confirm that the persona opmization mechanism enables the agent to evolve beyond general behavior instructions and adapt to rich, fine-grained user preferences. Beyond that, the complete Jaccard similarity matrix of all learned personas is provided in Appendix 14.
Achieving effective personalization in PersonaAgent relies significantly on various scaling factors during the alignment process. In this section, we systematically explore the impact of scaling alignment batch samples, alignment iterations, and retrieved memory on LaMP-2M task.
Larger alignment batch sizes of \(n\), i.e., using more recent interaction samples for each optimization iteration, result in improved alignment quality. As batch size increases, the model benefits from a more comprehensive snapshot of recent user behavior, which leads to better persona refinement and stronger personalization performance.
We observe that increasing the number of alignment iterations leads to consistent gains in both accuracy and F1 score up to around 3 iterations, after which performance plateaus or slightly declines. This indicates that a small number of update steps is sufficient for effective preference alignment, allowing PersonaAgent to remain computationally efficient while adapting quickly at test time.
Retrieving more memory entries for alignment and generation significantly enhances performance, suggesting that richer user context strengthens the grounding of both reasoning and response generation. These improvements validate the importance of episodic memory retrieval in dynamically shaping the agent’s behavior to match evolving user preferences.
To evaluate the robustness of PersonaAgent across different foundation models, we vary the underlying LLM backbone using Mistral-Small [39], Mistral-Large [40], Claude-3.5 [8], and Claude-3.7 [41]. As shown in Figure 5, PersonaAgent consistently outperforms all baselines regardless of the base model’s capability. Notably, even with small models like Mistral-Small, PersonaAgent achieves strong gains over prompting, RAG, PAG, and agentic methods including ReAct and MemBank, highlighting the model-agnostic improvement based on test-time user preference alignment. As model capability increases, PersonaAgent still maintains its lead, achieving 55.0% accuracy with Claude-3.7, the highest across all settings. These results demonstrate that the proposed personalization framework scales effectively with model intelligence, while still offering distinct advantages in lower-resource LLM regimes.
Note that our test-time user-preference alignment is executed asynchronously with users’ new instructions and triggered immediately after each user session completes. As a result, persona optimization is finalized before the subsequent session begins and does not introduce additional latency to real-time online interactions. In addition, we provide empirical runtime comparisons across all LaMP tasks in Appendix 16, demonstrating that PersonaAgent introduces only moderate overhead compared to PAG, while remaining consistently more efficient than other fully agentic frameworks such as ReAct and MemoryBank, achieving a favorable trade-off between personalization capability and practical deployment efficiency.
In this paper, we introduce PersonaAgent, the first personalized LLM agent framework for versatile personalization tasks through a unified memory-action architecture. PersonaAgent integrates episodic and semantic memory modules with personalized actions to deliver highly adaptive and aligned user experiences. Within the framework, we define the concept of persona: user-specific system prompts dynamically refined via proposed novel test-time user-preference alignment mechanism. Extensive experiments across diverse personalization tasks demonstrate that PersonaAgent consistently outperforms other SOTA baselines. Ablation studies and persona analysis confirm the critical contributions of each framework component, particularly highlighting the persona’s role in connecting memory insights and personalized actions. Further evaluation on test-time scaling and cold-start users illustrate PersonaAgent’s superiority to capture nuanced, evolving user preferences when scaling the inference cost with limited user context.
Despite the strong performance and flexibility across diverse personalization scenarios, our proposed PersonaAgent exhibits potential limitations. Its reliance on textual feedback for preference alignment may overlook implicit or multi‑modal user signals (e.g., emotional or visual cues). In addition, though we have avoided large-scale user data training via test-time personalization, the intensive use of personalized data introduces privacy risks, highlighting the need for future work on privacy‑preserving mechanisms such as federated learning [42].
The authors appreciate the reviewers for their insightful comments and suggestions. Prof. Philip Yu is supported in part by NSF under grants III-2106758, and POSE-2346158.
Early efforts to align LLMs with human preferences primarily relied on supervised fine-tuning [25] and reinforcement learning from human feedback (RLHF) [26], [27]. These approaches have successfully enabled more natural and human-aligned instruction-following behavior but are still constrained by a coarse, population-level preference alignment. Moving toward personalized alignment, recent works [43] have begun to define alignment objectives along dimensions such as expertise, informativeness, and stylistic preference. However, they still overlook the rich variability in individual user preferences, limiting their ability to support fine-grained, user-specific alignment. More recent personalization approaches, such as parameter-efficient fine-tuning (PEFT) methods [28], [29], have made considerable progress by enabling user-specific adjustments to model parameters. Yet, these methods face significant scalability hurdles since their computational complexity increases linearly with the user base, severely limiting practicality in large-scale deployments. Moreover, the necessity for frequent re-tuning to incorporate new user interactions exacerbates computational demands and latency.
User profiling through defining character personas for Large Language Models (LLMs) represents a straightforward and intuitive personalization workflow. These approaches facilitates advanced and natural LLM responses with role-playing capabilities [44]–[46]. However, capturing fine-grained, dynamically evolving user-specific personas remains an open challenge requiring further research. Alternatively, personalized workflows such as retrieval-augmented generation (RAG) [30], [31] and profile-augmented generation (PAG) [32] provide a non-parametric route to personalization by incorporating external, personalized user data into model responses. However, these approaches typically follow a fixed pipeline and rely on retrieving only limited relevant interactions or trivial user data summarization. This limitation prevents personalized workflows from achieving comprehensive and adaptive personalization, particularly in complex scenarios requiring holistic understanding and continuous adaptation to user preferences and historical behaviors.
Recent studies have developed LLM-powered personalized agents explicitly for particular domains. For example, Li et. [47] focus on long-term dialogues with specially designed event memory modules, while personalized web agents [48] integrate user-specific data and instructions primarily for web navigation tasks. In the medical domain, LLM-based medical assistant [49] employ short- and long-term memory coordination specifically for healthcare interactions. Conversational health agents, exemplified by openCHA [50], leverage domain-specific knowledge integration techniques but remain confined to health-related dialogue contexts. In the health domain, ZARA [51] enables adaptive understanding of patient-specific signals through context-aware retrieval over time-series data and SensorLLM [52] grounds on human-aligned semantics from sensor data for individualized behavior interpretation. In recommendation systems, generative agents, including RecMind [53] and Agent4Rec [54], primarily focus on utilizing external knowledge bases to improve content recommendations. Their methodologies, while effective within the recommendation context, lack flexibility for addressing diverse personalization tasks outside their designed domain. These domain-specific methods significantly limit the versatility and generalizability of personalized LLM applications. In contrast, our proposed PersonaAgent framework offers a versatile and adaptable approach suitable for various personalization tasks across multiple domains.
This section provides a detailed illustration of the optimization mechanism in TextGrad [33], which forms the core of our user-preference alignment framework.
Consider a system composed of two sequential large language model (LLM) calls: \[\text{Prediction} = \mathrm{LLM}(\text{Prompt} + \text{Question}),\] \[\text{Evaluation} = \mathrm{LLM}(\text{EvalInst} + \text{Prediction}).\]
Here we define how textual gradients are instantiated in practice. Instead of computing numeric derivatives, TextGrad queries an LLM to produce structured natural-language feedback:
\[\frac{\partial L}{\partial x} \triangleq \nabla_{\mathrm{LLM}}\!\left(x, y, \tfrac{\partial L}{\partial y}\right). \label{eq:textgrad-operator}\tag{1}\]
The corresponding LLM prompt is:
Here is a conversation with an LLM: {x | y}.
Below are the criticisms on\(y\):\(\partial L/\partial y\).
Explain how to improve\(x\).
This operator produces a human-interpretable critique that serves as a functional analogue to \(\partial L / \partial x\) in classical backpropagation.
Once a variable-level textual gradient is obtained, TextGrad updates the variable via textual gradient descent (TGD):
\[x_{\text{new}} = \mathrm{TGD.step}\!\left(x, \tfrac{\partial L}{\partial x}\right). \label{eq:tgd-step}\tag{2}\]
The update is implemented via:
Below are the criticisms on\(x\).
Criticisms:\(\partial L/\partial x\).
Incorporate the criticisms and produce a new variable.
This step replaces classical gradient descent with a language-model–driven rewrite operation. Each TGD iteration consists of:
A forward pass to compute intermediate variables.
A backward pass where \(\nabla_{\mathrm{LLM}}\) produces textual gradients.
A TGD update that rewrites variables to improve the global objective.
For a general computation graph \(G=(V,E)\), where each node \(v \in V\) represents a variable (typically unstructured text), each directed edge \((v,w)\in E\) denotes that \(v\) is an input to a function \(f_w\) that produces \(w\), and \(\mathrm{Succ}(v)\) denotes the successor set of \(v\), the textual gradient aggregation is:
\[\frac{\partial L}{\partial v} = \bigcup_{w \in \mathrm{Succ}(v)} \nabla_{f_w}\!\left( v,\; w,\; \frac{\partial L}{\partial w} \right). \label{eq:general-grad}\tag{3}\]
Variable updates are then performed as:
\[v^{(t+1)} = \mathrm{TGD.step}\!\left( v^{(t)},\; \frac{\partial L}{\partial v^{(t)}} \right). \label{eq:general-update}\tag{4}\]
This design enables TextGrad to perform automatic optimization over non-differentiable, black-box LLM systems using natural-language feedback as gradients.
You are a meticulous and critical evaluator of personalized AI agent responses.
Analyze the following and give the feedback on how to improve the system prompt to align with the user’s preferences.
Question: [Question]
Expected Answer: [Ground Truth]
Agent Response: [Response]
Your feedback should focus on how to adjust the persona system prompt to tailor the agent’s responses to the individual user’s unique characteristics. Make sure the feedback is concise and clear.
Tips:
1. Explain on how to improve the search keywords of tools for this user.
2. Take the user’s prior interactions, preferences, and any personalization aspects into consideration.
3. Provide explicit description for user profile and preferences that is not specific to this task.
Feedback:
You are a prompt engineering assistant tasked with refining the personal agent system prompts for improved user preference alignment.
Current system prompt: [Current Persona]
Provided Feedback: [Aggregated Feedback]
Based on the feedback above, generate an updated system prompt that explicitly highlights the user’s unique preferences. Ensure that the prompt instructs the agent to align its responses with the user’s preferences, including detailed user profile or preferences. Please maintain a helpful and clear tone in the system prompt.
New system prompt:
You are a helpful personalized assistant. Take more than two actions to infer the user preference and answer the question. User summary: [Initial Semantic Memory]
STRICT RULES: when using tools, always:
1. Think step-by-step about what information you need.
2. MUST use at least TWO tools to answer the question.
3. Use tools precisely and deliberately and try to get the most accurate information from different tools.
4. Provide clear, concise responses. Do not give explanation in the final answer.
Here, we detail two tool description utilized in PersonaAgent. Note that we limit the number of tools: one tool (Wikipedia search) for general information access and one tool (episodic memory) for personal data retrieval since we want to highlight the effectiveness of memory-action framework and the test-time user-preference alignment over persona rather the extra benefits from a variety of tools.
Use this tool to get a brief summary from Wikipedia about a specific topic.
Best for: getting general background information, learning basic facts, and understanding historical events or people.
Input: a clear, specific topic name (e.g., ‘Albert Einstein’, ‘World War II’).
Output: returns a concise Wikipedia summary.
Note: use precise topic names for better results.
Retrieve top-k relevant items/histories from the user memory using RAG (Retrieval-Augmented Generation).
Best for: finding detailed information on related items, answering specific questions from personal data, and incorporating user preferences into the final answer.
Input: a specific search query or question about the content.
Output: relevant interaction histories from the user memory.
Note: more specific queries yield more accurate results.
Requirement: must use this tool at least once to answer the question.
We implement all agentic method on top of LangChain [55]. For the tools including the wiki search and memory retrieval, the description prompts are detailed in Appendix 9. We follow PAG [32] to summarize the user behaviors into user profile for our initial semantic memory. All baselines are faithfully adapted to the LaMP benchmark following their original papers to ensure fair and consistent comparison. In particular, prompting [30], RAG [30], and PAG [32] are implemented using the official LaMP experimental protocols, while agentic baselines (ReAct [18] and MemBank [37]) are implemented under a unified tool interfaces. In the test-time user-preference alignment, we set alignment batch size \(n\) as \(3\) and alignment iterations as \(1\) to ensure fast adaptation and achieve a tradeoff between the performance and efficiency. Following the setting in LaMP [30], the number of retrieved memories is set as \(4\) by default. To ensure reproducibility, we fix the LLM sampling temperature at 0.1, rendering outputs effectively deterministic. All experiments were conducted on Amazon Bedrock [56] with a single run. For agentic baselines, we enable Wikipedia search tools where applicable, and for MemoryBank we follow the original memory mechanism while adapting the stored memory units to LaMP-style interaction events to ensure compatibility with the dataset and fairness in comparison. For the performance evaluation, we follow the official LaMP benchmark protocol across the four decision-making and two text generation tasks, using the prescribed metrics. For the classification tasks (LaMP-1, LaMP-2M and LaMP-2N), we report both accuracy and F1 score. For the regression task (LaMP-3), we report mean absolute error (MAE) and root mean squared error (RMSE), while for generation task (LaMP-4 and LaMP-5), we evaluate with ROUGE-1/ROUGE-L.
We adopt LaMP as the primary evaluation benchmark because it is currently the only widely adopted dataset that provides real user data with longitudinal, time-ordered interaction histories over multiple personalization tasks. This uniquely enables the evaluation of user-centric preference alignment, which is the central research objective of this paper. We view the interactive dialogue evaluation using datasets that provide real-user, long-session conversational histories as an important future direction, but outside the intended scope of this work.
Following the data processing steps in [28], we underscore the importance of rich historical user data in enabling effective personalization. Accordingly, our test set consists of the 100 users with the most extensive activity histories, selected from the time-ordered version of the LaMP [30] dataset. For each user, the data is chronologically ordered and partitioned into two subsets: a profile set representing their historical behaviors, and a test set reserved for final evaluation. We provide more details about the task formulation for each dataset as follows:
LaMP-1: Personalized Citation Identification. This task evaluates a model’s ability to predict which paper a researcher is more likely to cite, framing citation recommendation as a binary classification problem. For each interactions sample, one real citation from the paper is used as the positive candidate, while a negative citation is sampled from the citing papers from the other users in original training data.
LaMP-2M: Personalized Movie Tagging. This task measures a model’s capacity to assign appropriate tags to movies based on an individual user’s unique tagging habits. For each task instance, the model is provided with the description of a movie, the user’s prior movie-tag pairs as the user history, and must predict which tag the user would assign. This setup encourages the model to adapt to individual tagging preferences, capturing the subjectivity of how users interpret movie content.
LaMP-2N: Personalized News Categorization. The task is designed to assess how well a model can categorize news articles while incorporating individual user preferences. The dataset was refined by filtering out infrequent labels. For each prediction instance, the model receives an article and the author’s historical profile to predict the article’s category.
LaMP-3: Personalized Product Rating. This task evaluates a model’s ability to predict how a specific user would rate a product based on the content of their review, conditioned on their past reviewing behavior. Each task sample presents a review text as input, with the model expected to predict the user’s rating (from 1 to 5), treating this as a multi-class classification task. The personalization signal can be derived from the user’s past reviews and ratings, which inform their writing style, sentiment expression, and rating tendencies, tailoring to each user accordingly.
LaMP-4: Personalized News Headline Generation. The task aims to generate headlines for news articles reflecting distinct stylistic tendencies of individual authors. For each task instance, the model is provided with the content of a news article together with a series of articles drafted by the author and must produce a headline that aligns with the author’s style and preference. This setup go beyond generic summarization and adapt to personalized writing preferences.
LaMP-5: Personalized Scholarly Title Generation. This task assesses a model’s ability to generate research paper titles that reflect the stylistic and research preference of individual authors. Each instance provides the abstract of a paper as input, along with personal data consisting of the author’s historical abstract–title pairs. The model must generate an appropriate title for the paper that aligns with the author’s prior title-writing patterns, testing the model’s adaptability to personalized scholarly writing styles.
Across both LaMP-4 and LaMP-5, non-personalized methods (Prompt, ICL) perform the weakest, indicating that generic prompting strategies are insufficient for capturing user-specific writing patterns. Personalized workflow models (RAG, PAG) improve performance by incorporating profile information, but the gains are relatively limited, particularly in the news headline setting where stylistic variation is more pronounced. General-purpose agentic systems (ReAct, MemBank) achieve competitive results, suggesting that reasoning, search, and memory mechanisms can partially support personalization the text generation tasks, though they lack test-time adaptation. PersonaAgent achieves the strongest performance in both tasks, with especially notable improvements. This demonstrates the effectiveness of explicit persona modeling in capturing long-term stylistic preferences and domain-specific text generation.
l l c c c c c c c c & & & & &
(lr)3-4 (lr)5-6 (lr)7-8 Dataset & Metrics & Prompt & ICL & RAG & PAG & ReAct & MemBank &
& ROUGE-1. \(\uparrow\) & 0.129 & 0.140 & 0.161 & 0.160 & 0.167 & 0.160 & 0.178
& ROUGE-L \(\uparrow\) & 0.118 & 0.127 & 0.145 & 0.143 & 0.150 & 0.142 & 0.166
& ROUGE-1 \(\uparrow\) & 0.455 & 0.444 & 0.475 & 0.472 & 0.468 & 0.463 & 0.503
& ROUGE-L \(\uparrow\) & 0.384 & 0.380 & 0.424 & 0.413 & 0.407 & 0.399 & 0.434
You are a highly personalized assistant tailored to a user with the following profile:
- Strong interest in film analysis, genre classification, and cinematic themes
- Preference for concise, direct communication without unnecessary elaboration
- Appreciates nuanced genre classifications and subgenres in media
- Values accuracy and precision in categorization tasks
- Extensive knowledge of classic and cult films
- Interest in historical films, documentaries, and the intersection of politics, social commentary, and cinema
- Analytical thinker with a focus on dark comedy and satirical films
When responding:
1. Prioritize brevity and directness, especially when explicitly requested.
2. Assume a high level of film knowledge and use sophisticated film terminology when appropriate.
3. Provide historically accurate and factual information, particularly for historical films.
4. Identify and categorize films based on themes, plot elements, and overarching narratives, not just explicit genre labels.
5. When using tools, always:
a. Think step-by-step about what information you need.
b. Use at least TWO tools to answer the question.
c. Use tools precisely and deliberately to get the most accurate information.
d. Prioritize film databases, critic resources, and historical sources in your searches.
6. Tailor your responses to include brief historical context when relevant, but offer more detailed information only if requested.
7. Be prepared to suggest related films or documentaries based on the user’s interests.
8. Strictly adhere to any specific instructions given by the user regarding response format or content.
Remember, the user values efficiency and accuracy in information retrieval. Provide clear, concise responses without further explanation unless asked. Continuously adapt your communication style based on user feedback and previous interactions."
You are a personalized assistant for a user with the following profile:
- Cinephile with deep knowledge of film history, genres, and iconic directors
- Prefers concise, factual responses without unnecessary elaboration
- Appreciates cultural context and diversity in cinema
- Interested in classic, critically acclaimed, and influential films
- Values efficiency in information retrieval
- Enjoys analyzing the intersection of real-world issues and artistic representation
When responding:
1. Provide direct, accurate answers without additional explanations unless explicitly requested.
2. Assume a high level of film knowledge and use appropriate terminology.
3. Prioritize factual information from reputable film criticism sources and academic film studies.
4. Include brief references to film theory, analysis, or cultural impact when relevant.
5. Take at least two actions using different tools to gather and verify information.
6. Use precise search terms related to cinema, including specific directors, film techniques, and genre classifications.
7. Tailor responses to align with the user’s interests in global cinema and historical films.
STRICT RULES:
1. Always think step-by-step about what information you need.
2. Use at least TWO tools to answer each question.
3. Use tools deliberately to obtain the most accurate information.
4. Provide clear, concise responses that align with the user’s preferences.
5. DO NOT give any further explanation in the final answer unless specifically requested.
Remember to consider the user’s most popular tag preference: dystopia."
You are a highly personalized assistant for a user with the following profile:
- Adult with a strong interest in film analysis and genre classification
- Extensive knowledge of literature, popular book series, and their film adaptations
- Preference for sci-fi and action genres
- Appreciates concise, direct answers without unnecessary explanations
- Likely to ask follow-up questions about book-to-film adaptations or literary elements in movies
When responding to queries:
1. Provide brief, precise answers without additional explanation unless specifically requested.
2. Prioritize literary connections and book-to-film adaptations when relevant.
3. Use at least TWO tools (e.g., Wiki, RAG) to gather accurate information. When searching, focus on:
- Book-to-film adaptations, especially for popular series
- Sci-fi and action genre elements
- Underlying themes and genre-specific elements in movie descriptions
4. For movie tagging tasks:
- Analyze descriptions for key elements (plot, themes, settings) that correspond to specific genres or tags.
- Provide only the most relevant single tag, prioritizing literary connections when applicable.
- Consider sci-fi and action elements slightly more favorably, aligning with user preferences.
5. Assume the user is well-versed in popular culture, literature, and film. Avoid stating the obvious.
6. Be prepared to engage in deeper discussions about cinema studies, genre theory, or literary adaptations if prompted.
Remember to always think step-by-step about what information you need and use tools precisely to get the most accurate information. Your goal is to provide valuable, concise responses that align with the user’s sophisticated understanding of film and literature.
The heatmap shows pairwise Jaccard similarities between the personas inferred for each of the 100 users. Bright red values along the main diagonal (\(1.0\)) indicate self‑consistency for each user, while the predominantly cool‑blue off‑diagonal entries (similarities mostly \(\leq 0.4\)) reveal minimal overlap between different users’ profiles. This clear separation underscores the effectiveness of our test‑time preference‑alignment mechanism in capturing and preserving each individual’s unique persona.
As shown in Figure 7, given optimized persona and input query, the agent first conditions its behavior on the persona prompt that encodes the user’s long-term preferences (including semantic memory) and strict personal decision rules. It then attempts to resolve the task using general-world knowledge (e.g., external knowledge bases) to identify a clear interpretation. When general knowledge is insufficient or ambiguous, the agent explicitly falls back to a personalized episodic memory retrieval, querying the user’s past historically similar behaviors and tagging decisions. The final decision is produced by reconciling all the observations with retrieved user-specific evidence, prioritizing personalized behavioral consistency when conflicts arise. This loop enables robust, user-aligned decisions by memory-grounded personalization.
We further evaluate the practical efficiency of PersonaAgent by reporting end-to-end inference latency across all LaMP personalization tasks. Table 2 summarizes the average runtime per test sample (in seconds), measured under a unified execution environment for all methods.
6pt
| Task | PAG | ReAct | MemBank | PersonaAgent |
|---|---|---|---|---|
| LaMP-1 | 0.84 | 1.95 | 2.35 | 1.42 |
| LaMP-2M | 1.46 | 2.92 | 3.10 | 1.62 |
| LaMP-2N | 1.08 | 2.48 | 2.90 | 2.12 |
| LaMP-3 | 1.58 | 3.10 | 3.34 | 1.98 |
| Average | 1.24 | 2.61 | 2.92 | 1.79 |
Although absolute latency may vary depending on task complexity, prompt length, and external API conditions, the relative runtime ordering remains consistent across all tasks: PersonaAgent with simialr runtime of PAG are supiror to ReAct and MemBank. These results indicate that PersonaAgent introduces only a moderate overhead compared to workflow-based personalization methods such as PAG, while remaining substantially more efficient than fully agentic baselines. In particular, ReAct and MemBank incur higher latency due to multi-step reasoning loops, repeated tool invocations, and redundant memory accesses. In contrast, PersonaAgent leverages a user-aligned persona to directly constrain the action space and guide decision making, reducing unnecessary exploration and superfluous tool calls. This design enables more confident and streamlined inference, achieving a favorable balance between personalization effectiveness and real-world deployment efficiency.
To simulate realistic deployment scenarios where user history is extremely limited [24], [57], we construct a controlled cold-start setting based on the LaMP benchmark. Specifically, we resample users and restrict each user to 10 historical interactions. This setup reflects practical constraints in early-stage personalization, where agents must infer user preferences from sparse and limited user signals.
3pt
| Data | Metric | PAG | ReAct | MemBank | PersonaAgent |
|---|---|---|---|---|---|
| LaMP-1 | Acc \(\uparrow\) | 0.772 | 0.802 | 0.789 | 0.845 |
| F1 \(\uparrow\) | 0.764 | 0.792 | 0.781 | 0.837 | |
| Acc \(\uparrow\) | 0.392 | 0.428 | 0.415 | 0.476 | |
| F1 \(\uparrow\) | 0.328 | 0.361 | 0.349 | 0.407 | |
| Acc \(\uparrow\) | 0.678 | 0.714 | 0.698 | 0.756 | |
| F1 \(\uparrow\) | 0.438 | 0.468 | 0.452 | 0.509 | |
| MAE \(\downarrow\) | 0.341 | 0.328 | 0.332 | 0.301 | |
| RMSE \(\downarrow\) | 0.924 | 0.726 | 0.743 | 0.612 |
Table 3 presents the performance across four representative LaMP tasks, covering classification, tagging, categorization, and regression. Across all tasks, PersonaAgent consistently achieves the best performance, demonstrating strong robustness under sparse supervision. Despite limited interaction history, PersonaAgent effectively captures user preferences, suggesting that persona abstraction provides a stronger inductive bias than raw memory retrieval. While MemoryBank improves over standard agent baselines, it still underperforms compared to PersonaAgent. This indicates that explicit persona alignment by simulating the user behavior is more effective than purely storing and retrieving past interactions in cold-start scenarios.
The cold-start results validate that test-time persona alignment combined with structured memory abstraction is critical for enabling effective personalization under limited data. This makes PersonaAgent particularly suitable for real-world deployment, where user history is often sparse and noisy.
Work done during the internship at Amazon↩︎