Skip to main content

Command Palette

Search for a command to run...

Resident mempalace

Mila Jovovich fight with memory lapses of AI systems

Published
Resident mempalace

The timeline we are living in. Last night Ben Sigman posted that he and Milla Jovovich had released the MemPalace project publicly on GitHub. The project tackles the problem of high-quality recall in AI/RAG systems.

And yes, on Instagram Milla is now described as "Mother/Actress/Architect of MemPalace free and open source on GitHub" (Mother/Actress/Architect of the free and open MemPalace project on GitHub). If you had any doubts that programming and AI are the future, well, now even a successful actress has moved into tech and is committing on GitHub. All my favorite lorelines are together now.

Now let's break down the idea and the product itself, because I really like it and there is a lot of room to develop it further. The core idea is inspired by the ancient mnemonic technique of the "memory palace" (Memory Palace / Method of Loci). The method also has another name in Russian, "chambers of the mind," but I think that name is so cool it should be saved for something else.

The essence of the method is to visualize in your head the objects you want to remember and build stories between them. You may have seen a visualization of this method in Sherlock with Cumberbatch and Freeman. There it was presented almost like magic and a special ability of the hero. But the method actually works. If you are interested, you can read the book "Moonwalking with Einstein: The Art and Science of Remembering Everything"; it was written by a journalist who studied U.S. memory champions. It turns out such competitions really do exist.

Ben and Milla developed and formalized this idea into an interesting engineering solution. In the repository, AAAK is described as a special compact notation for AI. But an important technical caveat belongs here: the project README promises lossless shorthand and 30x compression, while the actual code in mempalace/dialect.py currently behaves much more modestly. The current Dialect.compress() does not build rich structures like TEAM: ... / PROJ: ... / DECISION: ... for arbitrary text and does not look like a format from which the original paragraph can be reconstructed unambiguously.

In other words, the pretty pseudo-graph notation from the promo materials and from Grok answers does not match what the code actually emits for real input. For ordinary text, the current implementation only keeps a few entities, a few topics, one "key" phrase, and a handful of flags. This is closer to a compact heuristic shorthand than to a real lossless text codec.

Here is an example of AAAK for the first three paragraphs of the text, produced by Grok. This is not the real output of Dialect.compress(), but rather an illustration of the format the authors seem to want:

TIMELINE:2026-04 | EVENT: BEN.SIG+ MILLA.JOV released MEMPALACE(open.source.github) | ★★★★★

MILLA.IG.bio: Mother/Actress/Architect.of.MemPalace(free+open.source.github) NOTE: actress→AI.dev | commits.github | all.fav.lores.together | ★★★★

IDEA: inspired.MemoryPalace(Method.of.Loci) | aka."чертоги.разума"(better.for.other) CORE: visualize.objects | build.stories.between | ex:SHERLOCK(Cumberbatch) | real.working.method

BOOK.rec: "Эйнштейн.гуляет.по.Луне"(Joshua.Foer) | author:journalist.studied.US.memory.champs | exists.competitions | ★★★

Problems with this example:

  • It is not the output of the actual project code.
  • This notation does not match the current Dialect.compress() function.
  • The claim that it can be "unambiguously reconstructed into the original text" is not supported by the current code.
  • For Russian text, the current implementation works poorly because topic extraction and fallback entity recognition in dialect.py are built around Latin script.

I checked the token counts through https://platform.openai.com/tokenizer and got much more grounded numbers. Grok says the original text is ~850 tokens and the AAAK version is ~110 tokens, while I got 268 versus 180.

I also checked the example from the documentation using the same tokenizer:

English (~1000 tokens), OpenAI tokenizer counts 66 tokens

Priya manages the Driftwood team: Kai (backend, 3 years), Soren (frontend),

Maya (infrastructure), and Leo (junior, started last month). They're building

a SaaS analytics platform. Current sprint: auth migration to Clerk.

Kai recommended Clerk over Auth0 based on pricing and DX.

AAAK (~120 tokens), OpenAI counts 73 tokens:

TEAM: PRI(lead) | KAI(backend,3yr) SOR(frontend) MAY(infra) LEO(junior,new)

PROJ: DRIFTWOOD(saas.analytics) | SPRINT: auth.migration→clerk

DECISION: KAI.rec:clerk>auth0(pricing+dx) | ★★★★

This is an important observation. Symbolic notation does not automatically guarantee fewer tokens. Modern tokenizers pack frequent English words and technical terms very efficiently, while things like , |, and ★★★★ can be more expensive than expected. So real "30x" claims need to be checked with the tokenizer of the target model, not by string length and not by split().

Below are two code examples that actually work and produce valid results on the current version of the project.

Example 1. What Dialect.compress() actually returns

from mempalace.dialect import Dialect

text = """
The timeline we're living in. Last night, Ben Sigman posted that he and Milla
Jovovich released the MemPalace project publicly on GitHub. The project addresses
high-quality recall in AI/RAG systems.
"""

dialect = Dialect(entities={"Ben": "BEN", "Milla": "MIL"})
aaak = dialect.compress(text)
stats = dialect.compression_stats(text, aaak)

print(aaak)
print(stats)

On my run this produces roughly the following:

0:BEN+MIL|github_mempalace_timeline|"The timeline we're living in"|DECISION
{'original_tokens': 57, 'compressed_tokens': 29, 'ratio': 1.96, ...}

This already looks like a working minimal format, but not like the "pretty language" from the README. It also shows another important detail: the built-in compression_stats() function in the project estimates token counts very roughly as len(text) // 3, so its numbers should not be treated as exact GPT, Claude, or Gemini token counts.

Example 2. How to run Russian text through translation and then compress it

from mempalace.dialect import Dialect
from ollama import chat

text = """
Таймлайн в котором мы живем. Вчера вечером Бен Сигман выложил пост про то что
вместе с Милой Йовович они выложили проект MemPalace в открытом виде на Github.
"""

prompt = f"""Translate the following Russian text to English.
Return only the translation.

{text}
"""

response = chat(
    model="translategemma",
    messages=[{"role": "user", "content": prompt}],
)

en_text = response.message.content
dialect = Dialect(entities={"Ben": "BEN", "Milla": "MIL"})
aaak_en = dialect.compress(en_text)

print(en_text)
print(aaak_en)
print(dialect.compression_stats(en_text, aaak_en))

At the moment this path is more practical than feeding Russian text directly into Dialect.compress().

In the end, I still find the idea interesting. Even if the current AAAK in code does not yet live up to the marketing description, the basic thought that memory could be converted into a compact pseudo-code instead of an ordinary summary still feels promising. To me this notation sometimes really does look like something between shorthand and a human-readable DSL in the spirit of Neo4j.