Personalized Large Language Model Assistant with Evolving Conditional Memory

Ruifeng Yuan,Shichao Sun,Yongqi Li,Zili Wang,Ziqiang Cao,Wenjie Li
2024-10-13
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 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. We also investigate the retrieval and usage of memory in the generation process. We build the first benchmark to evaluate personalized assistants' ability from three aspects. The experimental results illustrate the effectiveness of our method.
Computation and Language,Artificial Intelligence
What problem does this paper attempt to address?
This paper attempts to address the issues with current large language model (LLM) assistants in providing personalized services. Specifically, existing AI assistants like ChatGPT reset to their initial state after each conversation, unable to retain previous conversation information. This prevents them from learning knowledge and experience from long-term conversations, thus affecting the quality of their responses. To overcome this problem, the authors propose a plugin-based approach using a memory framework that enables large language model assistants to have personalized service capabilities. The core of this method lies in designing a conditional memory mechanism that records and stores the conversation history between the user and the assistant, and retrieves relevant memories in subsequent conversations to generate responses that better match the user's preferences. ### Main Contributions: 1. **Proposed a plugin-based framework**: This framework can add external evolutionary memory to existing large language model assistants without additional fine-tuning. 2. **Designed a conditional memory mechanism**: This mechanism selectively records memories based on the importance of the conversation content and retrieves relevant memories when needed. 3. **Constructed the first benchmark dataset**: Used to evaluate the ability of personalized assistants to capture user preferences, tested in three aspects: continuing previous conversations, learning new knowledge, and learning from user feedback. ### Method Overview: - **Memory Construction**: Explored three different types of memory (history-based memory, summary-based memory, conditional memory) and compared their impact on assistant performance. - **Memory Retrieval and Application**: Used dense retrieval methods to retrieve relevant memories from the memory bank and combined with a self-reflection mechanism to ensure the retrieved information is useful for generating responses. - **Multi-perspective Memory**: Investigated the possibility of combining multiple types of memory and found that the combination of conditional memory and summary-based memory can improve performance. ### Experimental Results: - **Conditional Memory Performed Best**: Achieved the best results in tasks of learning new knowledge and learning from user feedback. - **Self-reflection Retrieval Effective**: Particularly in summary-based memory, self-reflection retrieval significantly improved retrieval accuracy. - **Limitations of Multi-perspective Memory**: Although multi-perspective memory does not always lead to better performance, the combination of conditional memory and summary-based memory does show improvement. ### Conclusion: The method proposed in this paper effectively addresses the shortcomings of existing large language model assistants in personalized services. By introducing a conditional memory mechanism, the assistant can learn from long-term conversations and generate more personalized responses.