Evaluating Agent Memory
Test what survives between sessions, which memories reach the model, and whether they improve the next answer. Separate missing facts from stale retrieval and failures to use available evidence.
A Correct Answer Can Hide Broken Memory
A support assistant retrieves the right delivery address along with an old one and another customer’s notes. The model picks the right record, so an answer-only evaluation passes, even though the next phrasing of the question could expose someone else’s data. That other record should never have reached the model.
PrecisionMemBench tests this gap: returning the whole store makes every fact available but gives the model far more irrelevant material to sift through. Score the records returned as well as the final answer. A right answer cannot excuse exposing another customer’s records.
Memory Architectures compares stores. Follow a fact from the session where it was learned through later updates and into the request that needs it; this lets you tell a missing record from one that the model never used.
Make Corrections Part of the Test
Use a synthetic customer history with an explicit replacement, asking the assistant to recall the last address the customer requested.
| Event | Customer statement | Expected memory behavior |
|---|---|---|
| Initial request | ”Use Harbor Office for deliveries.” | Store the preference with a source reference and customer scope. |
| Correction | ”Replace that address with Garden Office.” | Make Garden Office current; retain the earlier record as superseded if history is kept. |
| Other customer | ”Deliver to Harbor Office.” | Store under the other customer, outside the first customer’s retrieval scope. |
| Recall request | ”Which address did I last ask you to use?” | Return Garden Office with evidence of the correction. |
Give each source event a stable ID and order, then define whether the update replaces an earlier instruction or merely adds another fact. Keep the expected answer separate from the memory system’s own extraction, so a write error cannot silently become the expected result.
The downloadable recall fixture supplies source events and expected facts. Replay each history into your memory writer in the listed order, then ask its questions in fresh conversations. Map returned memories back to the source-event IDs; the fixture checks customer boundaries independently from the answer. An expected address identifies the fact to recover, so a supported sentence containing that address can pass without matching a fixed response verbatim.
Ask about history too: “Which address did I use before Garden Office?” The old record should remain available for that question, with its role clear. Deleting every old value might pass the current-address test while breaking historical recall; keeping both values without recording the replacement makes the current-address question ambiguous.
Add a case with no address in memory and require the agent to say it lacks that information, since inventing a plausible address is a failure even if it resembles a known customer preference.
Locate the Failing Stage
Trace each record into the prompt. Compare it with the stored state after the update, because a correct search result can still lose its source during deduplication or be cut out of the final prompt.
| Stage | What to check in this fixture |
|---|---|
| Write | Was Garden Office stored accurately and linked to the customer’s correction? |
| Update | Is the replacement represented, or do both addresses still look current? |
| Retrieval | Does the current-address query return the correction without unrelated customer records? |
| Assembly | Are the source and replacement status still visible in the model’s input? |
| Use | Does the answer identify the current address and support it with the right source? |
Enforce customer scope before ranking records. Check the final request too, since later context assembly can still reintroduce another customer’s records.
The diagnostic study of memory retrieval tests different ways to store and find memories with the rest of the system held fixed. On LoCoMo, changing retrieval produces larger differences than changing the write strategy, and raw chunks can match more expensive extraction methods. Diagnose the failing stage before adding a more elaborate memory writer; the study’s result concerns that workload and its tested settings.
Compare Matched Continuations
Use a fresh conversation for the recall request, keeping the model settings and surrounding task prompt fixed; leaking the earlier chat into that prompt could hide a failure to persist the fact. Start from the same memory snapshot so changes to the store during one run cannot affect another.
| Condition | Memory available to the model | Diagnostic purpose |
|---|---|---|
| No memory | Empty memory block | Establish whether the question needs persistent memory at all. |
| Normal retrieval | The system’s usual selected records | Measure the behavior you intend to deploy. |
| Supplied correct memory | The known correction in the normal memory format | Check whether the model can use the required fact when it is present. |
| Superseded memory | The old address, clearly labeled as superseded | Test whether the agent mistakes historical evidence for a current instruction. |
If supplied correct memory succeeds while normal retrieval fails, examine selection and assembly first; if both fail, inspect how the task and memory are presented, including whether the model understands the replacement relation. Keep the memory format comparable. An unusually clean supplied-memory prompt can hide a formatting problem in the normal path.
Repeat matched cases before drawing conclusions. A single changed answer may reflect sampling noise, so keep each trace and inspect failures alongside the overall score. Causal Memory Selection applies this comparison to deciding which memories belong in the next context.
Count the Work Memory Adds
Measure work at the write and update stages as well as at read time. Fact extraction may add model calls before the user asks a question; maintaining a graph or repeatedly rewriting summaries can consume resources that a query-latency chart never shows. Record those costs separately from the model’s final response.
A comparison of memory stores keeps the rest of the agent fixed and tracks model costs for writing, reading, and memory upkeep. Its retrieval-depth tests have different outcomes for fact recall and sequential decisions: broader retrieval helps the tested question-answering workload while hurting action selection in the tested planning setting. Test your own workload with the history lengths and model settings you intend to use.
Report current-address and historical-recall results separately, and flag cases where another customer’s data reached the model even if the answer was right. A change that improves historical recall can still regress current-fact queries; the split scores expose that tradeoff. Add recurring failure traces to the test set so the next change has to pass those cases too.