Abstract
With the rapid development of large language models, AI assistants like ChatGPT have become increasingly integrated into people’s works and lives but are limited in personalized services. In this paper, we present a plug-and-play framework that could facilitate personalized large language model assistants with evolving conditional memory. The personalized assistant focuses on intelligently preserving the knowledge and experience from the history dialogue with the user, which can be applied to future tailored responses that better align with the user’s preferences. Generally, the assistant generates a set of records from the dialogue, stores them in a memory bank, and retrieves related memory to improve the quality of the response. For the crucial memory design, we explore different ways of constructing the memory and propose a new memorizing mechanism named conditional memory to enhance the memory management of the framework. We also investigate the retrieval and usage of memory in the generation process. To better evaluate the personalized assistants’ abilities, we build the first evaluation benchmark from three critical aspects: continuing previous dialogue, learning personalized knowledge and learning from user feedback. The experimental results illustrate the effectiveness of our method.
Introduction
Current Large Language Models (LLMs) are essentially "stateless," meaning they forget user interactions once a chat session ends. This "goldfish memory" prevents AI from becoming a true personal assistant that grows with the user. If a user specifies a preference for a certain coding style or provides personal context on "Day 1," the model should ideally retain this information for a session on "Day n."
The challenge lies in creating a memory system that is both efficient and accurate. While fine-tuning models on user-specific data is a potential solution, it is prohibitively expensive and often impossible for closed-source models like GPT-4. Existing Retrieval-Augmented Generation (RAG) methods attempt to solve this by retrieving past dialogue history, but they often struggle with "noise" (irrelevant raw history) or lose "signal" (overly vague summaries).
The Personalization Challenge
The core problem addressed in this research is finding a middle ground: a memory system that knows what to remember, how to store it, and when to ask for more information. Standard RAG systems often grab the top $K$ results and hope for the best, which is insufficient for complex personalization tasks where the relevant context might be buried or require multi-step reasoning.
The Evolving Conditional Memory Framework
The researchers propose a three-part framework: an existing LLM, an evolving memory bank, and a prompt-based interaction layer. This approach is entirely "plug-and-play," meaning it works as a wrapper around any API-based LLM without requiring access to the model's internal weights.
Conditional Memory Construction
Instead of blindly saving every line of dialogue, the system uses the LLM to judge if an interaction is "worth" remembering. If it is, the system generates a two-part record:
- Context: A summary of the background (the "why").
- Knowledge: The high-level takeaway or user preference (the "what").
This split is crucial; a fact without context is often ambiguous, while context without a clear "knowledge" takeaway is too wordy for the model to use effectively.
Self-Reflection Retrieval
Standard retrieval is augmented with a "thinking" step. After retrieving records, the LLM evaluates if the information is sufficient to answer the user. If not, it generates new search keywords to dig deeper into the memory bank, ensuring a more comprehensive retrieval process.
Experimental Evaluation
Because no standard benchmark existed for long-term personalized LLM memory, the authors created three new datasets:
- Learning New Knowledge: Tests if the model can remember personal facts.
- Learning from Human Feedback: Tests if the model can adapt to specific stylistic preferences after being corrected.
- Continuing Previous Dialogue: Tests the model's ability to pick up a technical discussion where it left off days or weeks later.
Key Results
The experimental results, evaluated using "GPT-score" (a 0-2 metric of accuracy), show significant gains. In the "Learning New Knowledge" task, the Conditional Memory approach achieved a GPT-score of 0.63, significantly outperforming raw history (0.56) and simple summaries (0.57). Furthermore, ablation studies proved that removing either the "Context" or "Knowledge" components led to a measurable decline in performance.
Conclusion and Future Work
This paper provides a robust blueprint for "AI with a past." By filtering out redundant communication and focusing on high-signal conditional memory, the system reduces token usage while improving personalization. Future challenges include teaching the AI how to manage a lifetime of memories—handling outdated information or conflicting preferences—and incorporating temporal awareness to track the evolution of user needs over time.
Summary updated