Chapter 03 · Memory & reliability
Memory, Self-Critique & Reliability
Continuity comes from memory; trust comes from verification. This chapter shows how memory systems fail, how those failures persist, and which self-correction loops are worth paying for.
- Key finding
- Self-correction without external signal can degrade correct answers
- Applies to
- Questions 04 and 05
Two different problems wearing one word
Continuity and correctness are usually discussed together and solved separately. Memory provides continuity. Verification provides correctness. Systems that confuse the two fail slowly and confidently.
A stateless model starts every conversation from nothing: it has no record of what was decided last week and no obligation to be consistent with it. Memory fixes that. It says nothing, on its own, about whether the remembered content is true.
Worse: memory makes error persistent. An incorrect inference written into a long-term store becomes a premise for every later decision that retrieves it. The reliability question is therefore not only 'does it remember' but 'what does it do when the memory is wrong'.
How memory works
New information
An observation, document or result arrives.
Nothing enters memory without a write decision: what class of information is this, who vouches for it, and when does it expire. An open write policy is the root cause of most contamination.
Short-term, long-term, episodic, semantic
Four memory types, four different retention rules, four different failure modes. Conflating them is how systems end up remembering the wrong thing for the wrong length of time.
| Type | Holds | Retention rule | Typical failure |
|---|---|---|---|
| Short-term (context) | The current task, recent turns, working notes | Discarded at the end of the session | Truncation loses the constraint that mattered |
| Long-term (persistent store) | Decisions, preferences, conclusions | Explicit write policy and expiry | Stale or contaminated entries persist silently |
| Episodic | What happened, when, in what order | Append-only, timestamped | Narrative drift and false attribution |
| Semantic | Facts, definitions, domain structure | Versioned and sourced | Confident recall of a superseded fact |
External stores and retrieval-augmented generation
Retrieval keeps the model's knowledge current without retraining it. It also introduces a new dependency: the quality of what gets retrieved.
Retrieval-augmented generation pairs a model with a search step over an external corpus: the query is used to fetch passages, and the answer is conditioned on them. The model stops relying on parametric memory for facts it can look up — which is more accurate and far more auditable, because the retrieved passage can be shown.
- Retrieval quality dominates answer quality. A perfect generator over the wrong passage produces a confident wrong answer.
- Index freshness is an operational obligation, not a one-off engineering task.
- Access control must be enforced at retrieval: the model can only cite what the user was allowed to read.
- 01Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks — Patrick Lewis et al. (Facebook AI Research, University College London, New York University). arXiv:2005.11401 · NeurIPS 2020, May 2020. Open source
- 02Augmented Language Models: a Survey — Grégoire Mialon, Roberto Dessì, Maria Lomeli et al. (Meta AI Research). arXiv:2302.07842 · TMLR, February 2023. Open source
Knowledge updating and memory contamination
A memory store accumulates whatever it is given. Without a write gate, the cheapest path into permanent institutional memory is the least reliable one.
- Contamination: an unverified claim is stored as fact, then retrieved as established context.
- Supersession: a fact is updated in the world but not in the store; the model answers with the old version confidently.
- Duplication: the same conclusion stored with slight variations, one of which is wrong, with no way to tell which.
- Prompt injection: retrieved text that contains instructions, which the model may follow as if they came from the operator.
Mitigations are organisational as much as technical: a write gate with an owner, provenance on every entry, a supersession chain instead of overwrites, and a periodic audit that samples stored claims and re-checks them against sources.
Error propagation
In a pipeline, an early error does not stay local. It is amplified by every layer that treats it as input, and by every agent that treats it as context.
- 01A retrieved passage is misread, producing a wrong intermediate conclusion.
- 02The conclusion is written to memory and becomes context for the next task.
- 03Subsequent answers are internally consistent with the error, so they look more credible, not less.
- 04Downstream summaries compress the error into a short, confident statement.
- 05The original source is no longer consulted, so the error becomes the record.
Self-evaluation and confidence
Models have some ability to report when they are likely wrong — enough to be useful as a filter, not enough to be trusted as a guarantee.
Research on calibration found that larger models can be trained to predict whether their own answers are correct, and that this signal is reasonably informative — but systematically overconfident on hard items. Treat stated confidence as a ranking signal for human review, not as a probability of correctness.
- Useful: routing low-confidence items to a human or to a stronger verification path.
- Not useful: as a substitute for verification, because the failure mode is confident error.
- 01Language Models (Mostly) Know What They Know — Saurav Kadavath et al. (Anthropic). arXiv:2207.05221, July 2022. Open source
Self-correction, and where it stops working
Self-correction works when the system has an external signal — a test, a schema, a tool result. Without one, asking a model to check itself mostly produces a second confident answer.
Reflexion-style loops store a verbal critique and retry, which improves outcomes on tasks with verifiable rewards. But work explicitly testing intrinsic self-correction found that models asked to revise their own reasoning without external feedback often make correct answers wrong — the revision is not anchored to anything.
| Loop | Signal | Verdict |
|---|---|---|
| Revise without feedback | None | Unreliable; can degrade a correct answer |
| Revise against tests / schemas | Deterministic pass/fail | Useful and auditable |
| Revise against tool output | External computation | Useful, limited by the tool's correctness |
| Revise against human review | Judgement | Reliable but does not scale free |
- 01Reflexion: Language Agents with Verbal Reinforcement Learning — Noah Shinn, Federico Cassano, Edward Berman, Ashwin Gopinath, Karthik Narasimhan, Shunyu Yao. arXiv:2303.11366 · NeurIPS 2023, March 2023. Open source
- 02Large Language Models Cannot Self-Correct Reasoning Yet — Jie Huang, Xinyun Chen, Swaroop Mishra, Huaixiu Steven Zheng, Adams Wei Yu, Xinying Song, Denny Zhou. arXiv:2310.01798 · ICLR 2024, October 2023. Open source
- 03Self-Consistency Improves Chain of Thought Reasoning in Language Models — Xuezhi Wang, Jason Wei, Dale Schuurmans, Quoc Le, Ed Chi, Sharan Narang, Aakanksha Chowdhery, Denny Zhou. arXiv:2203.11171 · ICLR 2023, March 2022. Open source
Controlled forgetting
Deciding what to forget is a governance function. A store that only grows becomes slower, noisier and less defensible over time.
- Expiry by class: operational traces expire in days; decisions in quarters; definitions persist until superseded.
- Supersession over deletion: keep the chain so a decision can be explained later.
- Catastrophic interference: updating a model on new data can erase old competence, a documented property of neural networks.
- Deletion must be real: an entry removed from the index but retained in an embedding store is not forgotten.
- 01Overcoming catastrophic forgetting in neural networks — James Kirkpatrick et al. (DeepMind). Proceedings of the National Academy of Sciences 114 (13), March 2017. Open source
Confidence calibration in practice
Calibration is measurable, cheap and almost always skipped: does a claim made with 80% confidence turn out correct 80% of the time?
- 01Collect a labelled evaluation set from our own domain — not a public benchmark.
- 02Have the system state confidence before the answer is revealed.
- 03Bucket by stated confidence and compute observed accuracy per bucket.
- 04Where confidence exceeds accuracy, treat that band as requiring verification.
This produces something more useful than an accuracy number: a policy. Below a threshold, the system defers; above it, it acts with a recorded justification; in a middle band, a second independent check runs.
Multi-agent verification
Several independent attempts, and disagreement between them, are a crude but real signal. They are not a proof, and unanimity is not correctness.
Self-consistency samples multiple reasoning paths and takes the majority answer, which materially improves accuracy on tasks with discrete answers. Multi-agent debate extends this: agents critique one another's reasoning across rounds, and published results report improved factuality and reasoning on several benchmarks.
- Independence is the whole value: agents sharing one retrieval context share one failure.
- Cost scales linearly or worse; benefit does not. Measure the delta, not the architecture.
- Use disagreement as an escalation trigger to a human, not as a vote to be overruled.
- 01Improving Factuality and Reasoning in Language Models through Multiagent Debate — Yilun Du, Shuang Li, Antonio Torralba, Joshua B. Tenenbaum, Igor Mordatch. arXiv:2305.14325 · ICML 2024, May 2023. Open source
- 02Self-Consistency Improves Chain of Thought Reasoning in Language Models — Xuezhi Wang, Jason Wei, Dale Schuurmans, Quoc Le, Ed Chi, Sharan Narang, Aakanksha Chowdhery, Denny Zhou. arXiv:2203.11171 · ICLR 2023, March 2022. Open source
Persistent erroneous memory: how a system recovers
Every long-lived system will store something false. The difference between a reliable system and an unreliable one is whether it can find it, correct it and prevent the recurrence.
- 01Detect: a periodic audit re-checks a sample of stored claims against their sources and flags drift.
- 02Quarantine: flagged entries stop being retrieved for decisions while remaining visible for investigation.
- 03Trace: follow the dependency chain forward to every derived conclusion that cited the entry.
- 04Correct at the root: write a superseding entry with a source and a timestamp; never silently overwrite.
- 05Recompute: regenerate affected outputs and re-test them against the evaluation set.
- 06Prevent: add the case to the write gate's checks so the same class of error cannot be stored again.
How to talk about this without overclaiming
These systems do not experience confusion, regret or distress. They hold states and produce outputs. Describing them in psychological terms is a category error that leads to bad engineering and worse governance.
It is accurate to say a model has a persistent erroneous memory entry that biases later outputs. It is not accurate to say the system is 'traumatised' by an earlier interaction. The first describes a data condition with an engineering remedy; the second attributes an inner life that has no operational meaning and obscures the fix.