In one sentence
A database that can be corrected needs to remember two different things — when a fact was true in the world, and when the database believed it — because otherwise a correction quietly destroys the only record of what anyone acted on.
Why this matters
Start with a question an auditor actually asks:
It sounds niche. It is the ordinary shape of after-the-fact review. A trade is queried months later and the reviewer needs the position as the desk understood it that morning, not as it reads today. A moderation decision is appealed, and what matters is the evidence the reviewer had, not what arrived afterwards.
Now notice that two very different events both arrive at a database as “change this row”, and that only one of them is about the world.
If your data layer is a snapshot, a vector index, or a plain property graph, the second row is where information goes missing. The old value is gone, so a question about what was believed on 1 March has nothing left to read. That is not a hard query — the input it needs was discarded at write time.
The idea in plain language
The repair is old, and comes from temporal databases: keep two clocks instead of one.
The first is easy — record the stretch of real-world time over which a fact held. A collaboration that ran from January to June is stored with that interval, so “ended in June” is a new interval rather than a lost one. This clock is valid time.
The second clock is the one that survives corrections. Alongside every version, record the stretch of time during which the database held that version. When a correction arrives, the old version is not overwritten; it is closed on this second clock and a new one opened. Ask about today and you get today's answer. Ask about 1 March and you get the answer the system would have given on 1 March — including the part that later turned out to be wrong. This clock is transaction time, and the state it lets you recover is a past belief state.
None of this is our invention, and pretending otherwise would be both wrong and strategically foolish. Two-clock records have been studied since the 1980s — Richard Snodgrass's temporal-database work is the standard starting point — the SQL:2011 standard added bi-temporal tables to SQL itself, and production systems exist whose whole identity is bi-temporality: XTDB is the one we measure against, and its SQL dialect implements exactly the two clocks described above. What TGMS adds sits on top of that inheritance: a graph data model over both clocks, a physical design that makes correction-aware graph queries cheap, and an operator surface an AI agent can be handed without being able to fabricate history. The evidence that we and XTDB mean the same thing by these words is in the head-to-head: four hundred belief probes, zero disagreements.
How TGMS handles it
The point of the design is that recovering a past belief is a parameter, not a reconstruction. Every data operation in TGMS accepts an as-of belief time, and the store applies it as a filter while reading. The language model's job is to choose the right operation and arguments; it never re-derives history, and it never sees the versions the filter excluded.
In practice that is one argument:
# What did we believe on 1 March, before the correction landed? entity_history(uid="n605", as_of_tt=BEFORE_CORRECTION) → 1 version # the record as it stood that morning # And what do we believe now? entity_history(uid="n605", as_of_tt=CURRENT) → 3 versions # before · corrected · after
What we measured
- Question
- Can systems without a belief-history record answer questions about a past belief?
- Workload
- 22 development tasks over a message-log dataset, of which 3 are correction probes — the same question asked once before a correction and once after, with gold answers that provably differ. Corrections are injected before any gold answer is computed.
- Compared
- TGMS; vector-RAG over serialised events; static-graph RAG over the latest snapshot; text-to-Cypher over the same events in a plain property graph.
- Metric
- Answer accuracy (normalised typed-answer accuracy: exact for counts and values, interval overlap ≥ 0.5 for intervals). Higher is better.
- Held constant
- Same model (Qwen2.5-14B-Instruct-AWQ, single 24 GB GPU), temperature 0, same seeds, same typed answer format, same repair budget.
- Run
- Single deterministic run per system; the probe row is 3 tasks, so treat it as a demonstration of representability rather than a rate.
What we found
Across all task families TGMS leads, which is the unsurprising half: computing over structure beats retrieving text when a question composes time. The interesting half is the probe row. Every baseline scores zero — not a low score, zero — while TGMS answers two of the three.
What this means in practice
The rule generalises past graphs: any store that can be corrected and is then asked about the past must record its own belief history, or its answers about the past will silently reflect today's beliefs. The same reasoning applies to derived data — a cached summary computed last month is a claim about last month's beliefs, and a correction touching its window invalidates it.
Good fit when corrections are routine and someone later asks what was known at the time — audit trails, regulated records, moderation review, feature stores, revised scientific datasets. Consider another approach when the record is append-only and never corrected: then valid time alone is enough, and the second clock is storage and complexity you will not use.
What this result does not show
This design preserves belief history; it does not adjudicate which version is true. TGMS can tell you that on 1 March the record said Ada and that it now says Bo. It has no view on whether the correction was itself correct — a mistaken correction is stored with exactly the same fidelity as a well-founded one. Deciding which version reflects reality remains a human and organisational question, and nothing here should be read as automating it.
Two narrower boundaries. The probe comparison is 3 tasks on one dataset at one model size; it establishes that the baselines cannot express the question, not how often TGMS gets it right. And the baseline zeros belong to this development split — on the larger frozen split, vector-RAG scores above zero on probes, which on inspection comes from the current-belief half of each probe pair rather than from any recovered history.
Takeaway
One clock is not enough for a record that can be corrected. Store when a fact was true and, separately, when you believed it, and “what did we think on 1 March?” stops being an archaeology project and becomes a filter the database applies for you.
Evidence and reproduction
Method, baselines and the full result tables are in the paper (§6). The metamorphic property is pinned by tests/test_metamorphic.py; the belief-time filter and the two leaks it caught are in tgms/temporal/ops_snapshot.py and algebra.py. Every number on this page is quoted from docs/site_facts.json and checked in CI. A rendered end-to-end trace with per-claim verification badges is here.
Continue reading
Prerequisite: none — this is the start of the series. If you want the one-page version of what TGMS is first, the project page has it.