Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
121 tokens/sec
GPT-4o
9 tokens/sec
Gemini 2.5 Pro Pro
47 tokens/sec
o3 Pro
4 tokens/sec
GPT-4.1 Pro
38 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

Crafting Personalized Agents through Retrieval-Augmented Generation on Editable Memory Graphs (2409.19401v1)

Published 28 Sep 2024 in cs.CL and cs.IR

Abstract: In the age of mobile internet, user data, often referred to as memories, is continuously generated on personal devices. Effectively managing and utilizing this data to deliver services to users is a compelling research topic. In this paper, we introduce a novel task of crafting personalized agents powered by LLMs, which utilize a user's smartphone memories to enhance downstream applications with advanced LLM capabilities. To achieve this goal, we introduce EMG-RAG, a solution that combines Retrieval-Augmented Generation (RAG) techniques with an Editable Memory Graph (EMG). This approach is further optimized using Reinforcement Learning to address three distinct challenges: data collection, editability, and selectability. Extensive experiments on a real-world dataset validate the effectiveness of EMG-RAG, achieving an improvement of approximately 10% over the best existing approach. Additionally, the personalized agents have been transferred into a real smartphone AI assistant, which leads to enhanced usability.

Summary

  • The paper introduces EMG-RAG, a novel system that integrates retrieval-augmented generation with editable memory graphs to enhance personalized AI agents.
  • It employs a hierarchical memory graph structure and reinforcement learning to manage, retrieve, and optimize dynamic user-specific data.
  • Experimental results show significant improvements in question answering, autofill forms, and user services compared to baseline approaches.

Crafting Personalized Agents through Retrieval-Augmented Generation on Editable Memory Graphs

The paper, "Crafting Personalized Agents through Retrieval-Augmented Generation on Editable Memory Graphs," addresses the burgeoning field of personalized AI agents augmented by LLMs. The focus is on enhancing downstream applications by leveraging user-generated data, referred to as memories, from personal devices. The authors propose EMG-RAG, a novel system that combines Retrieval-Augmented Generation (RAG) with Editable Memory Graphs (EMGs) to manage, augment, and utilize this data effectively.

Problem Motivation

In the mobile internet era, personal information is continuously generated on smartphones, leading to scattered user data. This data encompasses personal conversations with AI assistants, screenshots, emails, and other application-specific data. Managing and utilizing these scattered memories pose distinct challenges, particularly in the domain of crafting AI-driven personal assistants powered by LLMs.

The authors identify three core challenges in this context:

  1. Data Collection: Capturing valuable user-specific information from routine conversations and app interactions without pre-labeled datasets.
  2. Editability: The dynamic nature of personal memories necessitates support for insertion, deletion, and replacement operations.
  3. Selectability: Efficient querying and retrieval of relevant memories to provide accurate responses for real-world applications.

Solution Approach

To address these challenges, the authors propose EMG-RAG, a system structured around the use of Editable Memory Graphs (EMGs) and optimized through Reinforcement Learning (RL). Below are the key components and insights into their approach:

1. Editable Memory Graphs (EMGs)

EMGs offer a hierarchical and graph-based approach to manage user memories:

  • Memory Type Layer (MTL) and Memory Subclass Layer (MSL): These hierarchical components categorize and partition memories into predefined types and subclasses, respectively, facilitating efficient memory management and retrieval.
  • Memory Graph Layer (MGL): Constructed using entity recognition and relationship extraction techniques, this layer forms the graph structure representing the complex interrelations between different memories.

2. Retrieval-Augmented Generation (RAG)

RAG techniques are employed to retrieve relevant memories and generate user-specific responses. The authors introduce a novel RL-based selection mechanism to enhance the retrieval process by framing it as a Markov Decision Process (MDP). This includes:

  • States: The state representation involves capturing similarities between question entities, relations, and candidate memories.
  • Actions: Decisions on whether to include a memory in the context for LLM-based response generation.
  • Rewards: Feedback is based on the quality of the generated response compared to a ground truth benchmark.

3. Reinforcement Learning Optimization

The RL agent is trained through a two-stage process involving supervised fine-tuning and policy gradients. This method aims to optimize the selection policy for the MDP, thereby enhancing the system's capacity to retrieve and utilize relevant memories effectively.

Experimental Validation

The proposed EMG-RAG system is evaluated through extensive experimentation using a real-world business dataset derived from AI assistant interactions and app screenshots. The paper presents strong numerical results demonstrating the system's effectiveness across three downstream applications: question answering, autofill forms, and user services. Notable findings include:

  • Question Answering: EMG-RAG significantly outperforms baseline RAG approaches, achieving improvements of up to 5.3%, 8.3%, 3.9%, and 18.4% in R-1, R-2, R-L, and BLEU scores, respectively.
  • Autofill Forms: The system improves EM accuracy by 2.2% over the best existing approach.
  • User Services: In reminder and travel-related tasks, EMG-RAG shows enhancements of 2.9% and 5.5% in EM accuracy.

Implications and Future Directions

The theoretical and practical implications of this research are expansive. The introduction of EMGs coupled with RAG and RL provides a robust framework for developing personalized AI assistants capable of dynamic memory management and complex reasoning. These advancements hold potential for a wide array of applications in user-specific service domains.

Future work could explore further optimizations in training efficiency, possibly integrating federated learning approaches to enhance privacy while managing larger user bases. Additionally, the development of more sophisticated memory graphs incorporating multimodal data could extend the applicability of EMG-RAG to new domains such as healthcare and personalized education.

Conclusion

"Crafting Personalized Agents through Retrieval-Augmented Generation on Editable Memory Graphs" presents a comprehensive and innovative solution to managing and utilizing personal memories for AI-driven applications. Through a well-structured combination of hierarchical memory graphs, RAG, and RL optimization, the authors offer a significant contribution to the field, validated by strong experimental results. This research not only enhances practical applications but also provides a solid foundation for future advancements in personalized AI agents.