Textual memory: a profile that overwrites, and keeps the history in the line

Hand-written, from the replayed model calls of the textual-memory arm (every profile rewrite, after every session, was reproduced byte for byte from the cache), read next to the LongMemEval histories and the result files in results/main/textual/. 67 questions are too few for rates; the mechanisms are the result.

Summary

Textual memory answers 62 of 67 (93%, 95% interval 84–97%), at 10 model calls and $0.022 per question. It is the one memory system that resolves conflicts when it writes, because its prompt tells it to: the probe finds the old value still presented as current in only 9% of the 58 probed questions, against 24–74% for the others. Its five failures come from the same rewrite that makes it work:

Cause answers questions
The profile line recorded the change as a difference, and the answer subtracted 2 01493427, 5831f84d
The rewrite's own date arithmetic corrupted the value 1 2133c1b5
The value asked for (an earlier one) was never written 1 07741c44
The question or its key is flawed 1 618f13b2

What reached the answer, by the probes: both values in 39 questions (37 correct), only the new one in 18 (16 correct), only the old one in 1 (0), and 9 without an old value in the first evidence session (9 correct).

How it ran here

One plain-text profile per question, rewritten whole after every session by one model call, under a 3,000-word cap; the answer reads the whole profile (about 1,400 tokens). The rewrite prompt is ours, after PersonaMem-v3's textual memory baseline. Two of its rules matter here:

When the new conversation changes or contradicts something in the profile, replace it with the new information and record that it changed, with dates (for example "Now X, since 2023-05-26; previously Y").

Write dates as absolute dates, resolving words like "last week" against the conversation's date.

The first rule is why it keeps few stale values: the old one is moved into a "previously" clause instead of standing next to the new one. It is also why the profile records a running count with its history ("15 … as of 2023-09-30; previously 12 as of 2023-08-11"), which answers "what was it before?" well (7 of 8 earlier-value questions) and invites a subtraction when the question asks for the current total. The second rule converts "a month now" into a start date, which is right until the model miscounts.

Every wrong answer

"Other arms" are the seven other arms of the main run. Each entry follows the topic's lines in the profile through the ten rewrites.

01493427 — "How many new postcards have I added to my collection since I started collecting again?" (25)

5831f84d — "How many Crash Course videos have I watched in the past few weeks?" (15)

2133c1b5 — "How long have I been living in my current apartment in Harajuku?" (3 months)

07741c44 — "Where do I initially keep my old sneakers?" (under my bed)

618f13b2 — "How many times have I worn my new black Converse…?" (key: six)

The rewrite after the 17:45 session wrote "worn six times as of 2023-05-30"; after the 22:16 session it wrote "four times as of 2023-05-30… previously six times as of 2023-05-30 (Note: The user provided a corrected count of four during the 2023-05-30 conversation)." The answer followed the correction. The key holds the earlier value; every arm but Graphiti answers four.

How the correct answers were reached

The profile usually carries one current value per fact, with the earlier one in a "previously" clause and both dates, and the answer reads it off. The same format answers questions about an earlier value (7 of 8: "previously Y" is right there) and questions that ask for both. The failures are the cases where the "previously" clause was taken as the start of a subtraction, or where the rewrite's own arithmetic, not the user's statement, ended up as the current value.

The full history

On the 25 questions with the whole history (~48 sessions), textual memory goes from 96% to 92%, and costs 13 times more (one rewrite per session, of a profile that grows to about 5,600 tokens). Its two full-history errors: 07741c44 again, and 830ce83f, where the profile kept Rachel in Chicago and the answer found no relocation at all.

Limits

Contents

Reading

Text size

19 px

Column width

Colours

Code cells

When the file changes

Saved on this device.