Our new X account is live! Follow @wizwand_team for updates
WorkDL logo mark

MemGPT: Towards LLMs as Operating Systems

About

Large language models (LLMs) have revolutionized AI, but are constrained by limited context windows, hindering their utility in tasks like extended conversations and document analysis. To enable using context beyond limited context windows, we propose virtual context management, a technique drawing inspiration from hierarchical memory systems in traditional operating systems that provide the appearance of large memory resources through data movement between fast and slow memory. Using this technique, we introduce MemGPT (Memory-GPT), a system that intelligently manages different memory tiers in order to effectively provide extended context within the LLM's limited context window, and utilizes interrupts to manage control flow between itself and the user. We evaluate our OS-inspired design in two domains where the limited context windows of modern LLMs severely handicaps their performance: document analysis, where MemGPT is able to analyze large documents that far exceed the underlying LLM's context window, and multi-session chat, where MemGPT can create conversational agents that remember, reflect, and evolve dynamically through long-term interactions with their users. We release MemGPT code and data for our experiments at https://memgpt.ai.

Charles Packer, Sarah Wooders, Kevin Lin, Vivian Fang, Shishir G. Patil, Ion Stoica, Joseph E. Gonzalez• 2023

Related benchmarks

TaskDatasetResultRank
Long-term memory evaluationLocomo
Overall F133.17
70
Multi-hop Question AnsweringLocomo
F130.36
67
Long-context Question AnsweringLocomo
Average F142.78
64
Single-hop Question AnsweringLocomo
F10.6018
53
Open-domain Question AnsweringLocomo
F10.1224
53
Temporal Question AnsweringLocomo
F10.2552
36
Long-context ReasoningLocomo
Average F130.88
25
Long-context Question AnsweringLocomo
Single-Hop LLJ Score41.2
24
Temporal ReasoningLocomo
F1 Score25.52
17
LLM Agent Memory RetrievalLoCoMo v1 (full)
F1 (Multi-Hop)26.7
12
Showing 10 of 37 rows

Other info

Follow for update