Skip to content
All work

Palimpsest

A long-term memory engine for Claude Code users that keeps outdated facts as dated history, plus a 500-question study of which retrieval pieces help.

Role
Solo
Status
Benchmarked, in progress
Timeline
Oct 31 – Nov 1
Year
2026
Stack
PythonClaude Haiku 5.5Claude Sonnet 5.5SQLite FTS5sentence-transformersSciPyFastMCPReact

Problem

Chat assistants forget between sessions, and when a fact changes (“I moved”), a memory has to know what is true now and what was true before. The usual fix is plain RAG over old chat turns. Graph memories add extraction, graph walks and time models, but are usually reported only as a whole, so I measured which piece helps which kind of question.

The finding

On the same 500 LongMemEval questions, the full system answered 437 correctly and plain RAG 422, a lead that is not significant (p = 0.14). On temporal reasoning the gain is significant, even after a Bonferroni correction: 119 against 104 of 133 questions (p = 0.006).

  • 87.4% vs 84.4%Answered correctly, full system vs plain RAG: 437 and 422 of 500. Not significant (p = 0.14)
  • 119 vs 104 of 133Temporal reasoning questions answered correctly. Significant (p = 0.006)
  • 1,704 vs 6,128Context tokens per question
  • $0.0052 vs $0.0105Cost per answer

Five conditions answered the same questions, from plain RAG to the full system. Extracted facts alone lost 37 questions about what the assistant had said, and quoting the raw conversation won back 35. Date ranges gained 11 temporal questions and lost 4, but cost 3 knowledge-update questions. The graph walk barely moved the score: 9 questions gained, 8 lost.

Dot chart: on 500 questions the full system scores 87.4% against plain RAG’s 84.4%, with a clear gain only on temporal questions.
Accuracy on 500 LongMemEval questions, by question type, with 95% intervals.

How it works

Palimpsest turns chat sessions into dated facts in a graph and keeps the raw conversation beside it. One demo question, “Where did I live before I moved to Vancouver?”, end to end:

1

Extract dated facts

Claude Haiku reads the July 5 session (“moved to Vancouver last week”) and stores “moved to Vancouver” as valid from June 28.

2

Close, don’t delete

The “lives in Toronto” fact it contradicts gets an end date, June 28, instead of being deleted.

3

Fuse three signals

The recall tool ranks facts by BM25, embeddings and a Personalized PageRank walk, then fuses the lists with reciprocal rank fusion. Claude Sonnet answers: “you lived in an apartment in Toronto”.

The prototype

The prototype is an MCP server for Claude Code with six tools, among them recall, which takes an as-of date. The console below replays a demo memory; its people and bookshop are invented.

Palimpsest console: a chat session adds facts to a knowledge graph and closes an old one, then a question lights up graph paths and three ranked lists of facts.
A demo memory forms, then answers a question with three ranked lists.
Palimpsest console replaying a demo memory: a chat session on the left, a growing knowledge graph in the middle and a timeline below.
A demo memory forming, one chat session at a time.
Palimpsest console answering a question: three ranked lists of facts and their combined ranking beside the knowledge graph.
Keywords, embeddings and a graph walk each rank facts; rank fusion combines them.
Palimpsest console answering a question about a past date, using facts that were later replaced, shown as dashed lines.
Asked as of Aug 31, it answers from a fact that later changed.
Palimpsest console card for a place, listing two past facts with the dates they stopped being true.
Old facts get an end date instead of being deleted.

Decisions

  • Close old facts, never overwrite themSo point-in-time questions still work: a fact that changes gets an end date and stays in the history, and a question asked as of a past date answers from what was true then. Even the forget tool closes a fact and keeps its history.
  • Keep the raw conversation beside the graphSo questions about what the assistant said can fall back to the original text. The benchmark bore it out: facts alone lost 37 of those questions, and quoting the conversation won back 35.

Where it is now

Four of its five phases are done, ending with the 500-question benchmark on November 1, 2026. The fifth, a write-up and a video, is under way. Its test suite passes (204 tests, 1 skipped), and the code is private.