What is MemoryScope
MemoryScope is a long-term memory system designed for large language model (LLM) chatbots. By building a framework that enables the bot to remember users' basic information, habits, and preferences, it provides personalized interaction experiences. MemoryScope features a memory database, a core worker library, and a core Operation library, supporting functions such as memory retrieval, memory consolidation, reflection, and reconsolidation. MemoryScope stores memory fragments through a vector database and handles memory-related tasks based on multiple workers. MemoryScope supports time awareness, providing relevant memories based on temporal context. It enhances the coherence and "understanding" capabilities of chatbots, allowing users to feel a sense of "rapport" during use.
Main Features of MemoryScope
- Memory Database: Stores memory fragments based on a vector database (such as ElasticSearch).
- Core Worker Library: Decomposes long-term memory capabilities into multiple independent workers, responsible for different tasks such as information query filtering, observation extraction, insight updating, etc.
- Core Operation Library: Built on worker-based pipelines, implementing core capabilities such as memory retrieval and memory consolidation.
- Memory Retrieval: Returns semantically relevant memory fragments based on user input; if the input contains temporal information, it returns memory fragments from the corresponding time.
- Memory Consolidation: Processes user input, extracts important information, and stores it as memory fragments in the form of observations.
- Reflection and Reconsolidation: Periodically reflects on newly recorded observations, forms and updates memory fragments in the form of insights, and performs memory reconsolidation to handle contradictions and repetitions among memory fragments.
Technical Principles of MemoryScope
- Vector Database: Uses a vector database to store memory fragments and perform efficient retrieval based on vector similarity.
- Atomic Workers: Decomposes long-term memory capabilities into multiple independent workers, each responsible for specific tasks such as information filtering, observation extraction, etc., improving the system's flexibility and scalability.
- Pipeline Architecture: Organizes workers based on a pipeline architecture to implement operations such as memory retrieval and memory consolidation, improving processing efficiency.
- Semantic Relevance: Analyzes the semantics of user input through natural language processing techniques and returns relevant memory fragments.
- Temporal Context Processing: The system can understand temporal context and retrieve memory fragments based on temporal information.
- Hierarchical Structure of Memory Fragments: Memory fragments are stored in a hierarchical structure, with insights as high-level information aggregated from observations on similar topics.
Project Address of MemoryScope
- Project Official Website:modelscope.github.io/MemoryScope
- GitHub Repository:https://github.com/modelscope/MemoryScope
Application Scenarios of MemoryScope
- Personal Assistant: As a personal assistant, MemoryScope helps the bot remember users' schedules, preference settings, frequently used contacts, and other information, providing more thoughtful services.
- Emotional Companionship: In emotional companionship bots, MemoryScope records users' emotional changes and communication history, enabling the bot to better understand and respond to users' emotional needs.
- Customer Service: In the customer service field, MemoryScope helps robots remember customers' historical interaction records and preferences, providing more personalized service.
- Educational Tutoring: In educational tutoring robots, MemoryScope records students' learning progress and preferences, providing customized learning suggestions and tutoring.
- Health Consultation: In health consultation robots, MemoryScope records users' health conditions and living habits, providing personalized health advice.