TEM: Temporal State Tracking Memory for Large Language Model Agents: what it means for business leaders

A training-free memory layer that keeps every version of a user fact and tells the model which ones are out of date, lifting answers about changed facts by up to 56 points on a controlled benchmark.

1. What the method is

TEM, Temporal State Tracking Memory, is a training-free memory layer for language-model agents that keeps every version of a fact rather than overwriting it. Each record holds a subject, a relation, an object, the session it came from and that session's index. Records sharing a subject and relation form a version group, and a version is marked historical whenever a later session exists in its group. At answer time the system retrieves up to 15 records by embedding similarity weighted by relation type, sorts them in source order, attaches a [historical] label to superseded ones and hands that compact evidence to a frozen generator. Event summaries and original dialogue turns sit beside the fact store for details that do not fit a structured value. Nothing is fine-tuned; the advance is in how version status is stored and then presented to the model.

2. Why the method was developed

An assistant that remembers a user over months accumulates facts that stop being true. A person moves city, changes employer or switches preferences, and a later question may concern the current value or an earlier one. A memory that keeps only the latest value cannot answer about the past, and the authors measured that failure directly: an overwrite store recovered 0 to 8.33 percent of prior residences. Keeping every value is the obvious fix, but then the generator must work out which version applies, and in practice it often treats an old value as current or mixes versions around an update. Existing systems such as MemGPT, Mem0, A-MEM and Zep improved storage, updating and graph retrieval, but the authors argue none had shown how version status should reach the answering model. TEM was built to test whether making that status explicit is what matters.

3. Who should care

Anyone in our organisation shipping an assistant that persists user state across sessions should read this: customer-support, sales-assistant and personal-agent product teams, because the failure it fixes shows up as confidently wrong answers about where a customer lives or who employs them. Platform and infrastructure teams choosing a memory layer should note that the gain comes from a schema and a labelling rule, not a model change, so it can be added to an existing retrieval stack with open-weight models. Whoever owns inference budgets should note the evidence per answer was roughly half that of session-aware retrieval. Data governance gains a provenance trail, since every value stays linked to the session that produced it. Our evaluation team should take the ablation design, which changes one thing and holds everything else fixed, as a model for our own memory tests.

4. How the method works

When a session ends, a frozen model extracts subject-relation-object facts, TEM checks them against the source text, and they are appended with the session's index. The status of the whole version group is then recomputed: any record whose index is below the group's maximum is flagged historical, and all records at the maximum are current. Because status is computed over the full group in storage rather than at query time, an older value stays historical even if the latest one is not retrieved. At query time a shared vector retriever, all-mpnet-base-v2 in the paper, scores all versions, and scores are weighted by relation type: 1.0 for residence and employer, 0.9 for occupation, 0.8 for possession and 0.6 for likes and dislikes. The top 15 are sorted by source index and superseded ones are labelled. The generator, not the retriever, decides which version answers the question.

5. How it was evaluated

The authors built a controlled state-update benchmark: 60 synthetic personas across 600 sessions, with 420 questions on residence, occupation and drinks, split into 180 current-state, 180 other historical and 60 questions about the residence just before the latest move. Six configurations ran on four open-weight backbones, Llama-3.1-8B, Qwen3.5-4B, Qwen3.5-9B and gpt-oss-20b, giving 10,080 answers scored by case-insensitive key-entity hit rate. Baselines were naive RAG, session-aware RAG, full context, overwrite-only memory and an unmarked variant that keeps all versions in source order without labels, so the label's effect is isolated. A second study used 10 LoCoMo conversations with 1,540 public multi-session questions, two backbones, a fixed 1,024-token evidence budget and a strict gpt-oss-20b judge requiring factual and temporal correctness; 216 ambiguous answers were scored both ways to give bounds. Everything ran on a single A100 40 GB at temperature zero.

6. How it performed

On the state-update benchmark TEM reached 75.71 to 97.62 percent overall hit rate and 96.67 to 100 percent on pre-move residence, where overwrite memory managed at most 8.33 percent. Adding labels to otherwise identical evidence raised overall rates by 17.14 to 55.95 points. Evidence averaged 94 to 118 tokens, 48.75 to 56.73 percent less than session-aware RAG. On LoCoMo, hybrid TEM beat session-aware RAG by at least 7.92 and 10.58 points under the same budget, but the labels made almost no difference there and a 32,768-token long-context reference scored far higher, so the public-benchmark gain comes from evidence organisation rather than the labels. The authors are candid about limits: status follows session order, so delayed reports, conflicting values within one session and preferences that stay valid together are not handled, and the main benchmark is synthetic. Our call is to pilot: add versioned facts with historical labels to one memory-backed assistant and measure state questions before committing further. (Source: arXiv 2610.21900, 2026)

← Back to dossier index