Gerson

Gerson

Passionate developer specializing in web development, cloud architecture, and system design.

TypeScriptReactNext.jsPythonFastAPISQLNode.jsAWS

Milla Jovovich's MemPalace: How a Memory Palace Architecture is Revolutionizing AI Memory

Actress Milla Jovovich and engineer Ben Sigman open-sourced MemPalace, an AI memory system that uses the ancient method of loci to organize LLM conversations. It scored 96.6% on LongMemEval and runs entirely offline with ChromaDB and Llama.

Abstract neural network visualization representing AI memory architecture

In one of the more unexpected intersections of Hollywood and open-source software, actress Milla Jovovich — best known for the Resident Evil franchise and The Fifth Element — quietly released MemPalace, an AI memory system that scored 96.6% recall@5 on the LongMemEval benchmark. That's the highest score ever recorded on that benchmark, and the project is completely free and open-source.

MemPalace was built in collaboration with engineer Ben Sigman, and what makes it interesting isn't just the benchmark numbers — it's the architectural philosophy behind it. Rather than using the typical "stuff everything into a vector database and hope retrieval works" approach that most AI memory systems take, MemPalace borrows from a technique that humans have used for over two thousand years: the method of loci, commonly known as a memory palace.

What Is the Method of Loci?

The method of loci is a mnemonic strategy dating back to ancient Greece. The concept is simple: you mentally construct a building or space you know well — your childhood home, your office, a familiar route — and you "place" pieces of information in specific locations within that space. To recall the information later, you mentally walk through the building, visiting each room where you stored something.

This technique is remarkably effective because human spatial memory is incredibly robust. We can remember the layout of buildings we haven't visited in decades, and by associating abstract information with physical locations, we give our brains a natural retrieval structure. Memory champions who memorize thousands of digits of pi or entire decks of cards in minutes almost universally use some variant of this technique.

MemPalace takes this idea and applies it to AI. Instead of treating conversation history as a flat sequence of text, it organizes memories into a navigable spatial hierarchy.

The Architecture

MemPalace structures all stored information using a building metaphor with four levels:

  • Wings — The broadest organizational unit, representing people or major projects. If you're using MemPalace across multiple contexts, each context gets its own wing.
  • Halls — Within each wing, halls represent types of memory — preferences, facts, events, opinions. This mirrors how human memory categorizes information by kind rather than by time.
  • Rooms — Individual ideas or topics within a hall. A room might contain everything you've ever discussed about a particular framework, or a specific decision and its rationale.
  • Items — The actual pieces of information stored in each room — specific statements, facts, or conversation excerpts.

Conceptual Structure

Palace
├── Wing: "Project Alpha"
│   ├── Hall: "Technical Decisions"
│   │   ├── Room: "Database Choice"
│   │   │   ├── Item: "Chose PostgreSQL over MongoDB for relational data"
│   │   │   └── Item: "Needs full-text search, considering pg_trgm"
│   │   └── Room: "API Architecture"
│   │       └── Item: "REST for public API, tRPC for internal"
│   └── Hall: "Preferences"
│       └── Room: "Code Style"
│           └── Item: "Prefers functional patterns over class-based"
└── Wing: "Personal"
    └── Hall: "Facts"
        └── Room: "Background"
            └── Item: "Senior engineer, 8 years experience"

How It Works Under the Hood

The entire system runs locally on your machine. The core dependencies are minimal:

  • ChromaDB — A lightweight vector database for similarity search. MemPalace stores verbatim conversation content in ChromaDB collections and uses its default embedding model for retrieval.
  • SQLite — Powers the knowledge graph that stores structured relationships between memories and tracks facts that change over time (temporal knowledge).
  • Llama (optional) — For local LLM processing. MemPalace can use a local Llama instance for compression and extraction, meaning zero cloud calls if you want full privacy.

The data flow is straightforward: conversations enter through a CLI, pass through a "miner" that extracts structured information, and get stored in the appropriate palace location. When the system needs to recall something, it uses a 4-level progressive loading strategy:

  1. Level 1 — Check the knowledge graph for exact structured matches
  2. Level 2 — Search within the most relevant room using ChromaDB similarity search
  3. Level 3 — Expand search to the hall level
  4. Level 4 — Full palace search across all wings

This progressive approach means most retrievals are fast and precise (levels 1-2), while the system can still find tangentially related information when needed (levels 3-4).

Key Insight: MemPalace's approach is "store everything, make it findable" rather than "decide what's important upfront." No AI decides what matters — you keep every word, and the spatial structure makes it searchable.

Cross-Domain Tunnels

One of the more clever features is what MemPalace calls "cross-domain tunnels" — connections that link rooms across different wings and halls. If you mention the same technology in two completely different project contexts, the tunnel lets the system discover that connection and surface relevant information from one context while you're working in another.

This is something flat vector search struggles with, because the embedding similarity between two conversations might be low even when they share a critical detail. The spatial structure and explicit link graph solve this by maintaining navigable paths between related memories regardless of surface-level text similarity.

Benchmark Results and Controversy

MemPalace claims a 96.6% recall@5 on LongMemEval, which measures how well a system can retrieve specific facts from long conversation histories. For context, most commercial AI memory systems score in the 60-80% range on this benchmark.

That said, the benchmark methodology has drawn some scrutiny from the community. GitHub issues have been filed questioning the scoring methodology and whether the evaluation conditions are comparable to those used by other systems. This is a common challenge in open-source AI projects — benchmarks are only meaningful when the evaluation conditions are standardized.

Regardless of the exact numbers, the architectural approach is genuinely interesting. The spatial organization metaphor provides a structure that's both human-understandable and computationally efficient, which is rare in AI systems.

Why This Matters for Developers

If you're building applications that need to remember user preferences, project context, or conversation history, MemPalace offers a few ideas worth borrowing:

  • Hierarchical organization beats flat storage. Instead of dumping everything into a single vector collection, structuring your memory by domain, type, and topic improves retrieval precision dramatically.
  • Progressive search is more efficient than exhaustive search. Start with the most specific index and expand only when needed. This reduces latency and cost for most queries.
  • Temporal knowledge matters. Facts change. Tracking when something was true (and when it stopped being true) prevents your system from confidently returning outdated information.
  • Local-first is viable. ChromaDB and SQLite are lightweight enough to run on any machine, and modern local LLMs are capable enough for extraction and compression tasks. Not every AI feature needs a cloud API call.

Getting Started

If you want to try MemPalace yourself, the setup is minimal:

Terminal

git clone https://github.com/milla-jovovich/mempalace.git
cd mempalace
pip install -r requirements.txt
python -m mempalace init

The project requires Python 3.10+ and will automatically set up ChromaDB and SQLite on first run. If you want local LLM support, you'll need Ollama installed with a Llama model pulled.

Final Thoughts

MemPalace is a refreshing take on AI memory. While most systems in this space are either proprietary cloud services or thin wrappers around vector databases, MemPalace brings a genuine architectural idea — the ancient method of loci — and implements it in a way that's both practical and open for anyone to use and improve.

Whether or not the benchmark numbers hold up under scrutiny, the project demonstrates that there's still room for creative thinking in how we structure AI memory. And the fact that it comes from an actress-turned-engineer collaboration makes it one of the more interesting open-source stories of the year.

Resources