Skip to content
yalt8826.com
← projects/
projects/dualmem/pausedresearch idealocal only

DualMem

Long-term memory for language models, modelled on how people remember: a knowledge graph of who, what and where, joined to vector search.

Built solo · mid 2026

01 / overview

What if an LLM remembered the way we do?

When I started this, I thought a retrieval system built from a graph and a vector store, organised the way people store and recall memories, would make a good long-term memory module for language models.

People don't remember isolated facts. A memory ties together who was there, where it happened, what it was about and how it felt. DualMem stores each memory as a node connected to those entities, so recalling one thing pulls in its context, and pairs that graph with vector search to find memories by meaning.

02 / the design

Memories as nodes, connected to everything they touch.

The graph is almost object-oriented. There are five classes of entity (people, events, places, subjects and preferences), and each memory node links to the entities in its story. Every memory also records when it happened, whether it was stated or inferred, its emotion, and whether it's still true.

01The memory graph schema, from my notes
validityActive

Still true.

validityDrifted

Probably changed over time.

validityContradicted

A newer memory says otherwise.

sourceExplicit

Said outright.

sourceInferred

Worked out from context.

03 / pipeline

From a conversation to two databases.

extractlocal LLM via Ollama
memories + entities as JSON
resolvepreprocessing
link to entities already knownglobal registry
storetwo stores, one memory
Neo4j graph (Cypher)Qdrant vectors

Ingestion into both stores works. Querying and updating memories were next on the list when I paused.

04 / why it's paused

The literature review got there first.

My goal was a research paper. While reviewing the literature (MemGPT, MemoryBank, CogMem, MAGMA and others), I found that papers and systems built on very similar ideas already existed. Rather than publish a weaker version of existing work, I paused it.

I'd still like to finish it as a working prototype, because it's useful to have, even if it's no longer novel.