An assistant can help with a project for hours and then lose track of a decision you thought was settled. You explain it again. Later, it retrieves an old note and carefully restores the decision you had changed. Both problems get called memory, although fixing one can make the other worse.
For a language model, the immediate constraint is context: the finite amount of information available during a request. Once an earlier exchange leaves that context, it is no longer directly available. A surrounding system has to preserve relevant information in summaries or storage and bring it back when needed (Packer et al., 2023). A longer context window helps, but a project can outlast it, and keeping a record doesn’t ensure the right part will be used.
What are we calling memory?
An agent can draw on several kinds of memory. These three help explain what it can retain and what you can correct (Sumers et al., 2024).
Working context contains the conversation, instructions, tool results, and other material available for the current request. It gives the model something to work from now. Its contents change as the task continues.
External memory lives in files, databases, document collections, or other stores. Retrieval brings selected material into context. Retrieval-augmented generation is one established approach (Lewis et al., 2020). This can preserve a project’s history across sessions, provided the system retrieves what matters and recognizes when it has become stale.
Parametric memory is information encoded in model weights during training. It includes learned patterns and can include memorized examples. It isn’t a collection of project notes that can reliably be opened, corrected, or deleted individually. Changing it can involve further training, model editing, or unlearning, each with its own limitations (Carlini et al., 2021; Yao et al., 2024).
An agent may use all three during the same task. Calling them all memory is convenient until we need to know where a fact came from, why an old instruction returned, or whether deleting a note actually removed the information we wanted forgotten.
Remembering what still matters
The practical problem is deciding what deserves to persist. A useful record needs enough context to distinguish a passing suggestion from a decision, a decision from a standing preference, and a standing preference from something the person no longer wants. These distinctions are difficult even when people keep their own notes.
Suppose an assistant remembers that you wanted a camera. Months later, it finds a good deal. It has preserved the request perfectly. You may have lost interest, bought something else, or forgotten why you wanted it. Before acting, the assistant needs a way to check whether the intention still holds. A dated instruction is evidence of what someone wanted then.
Privacy complicates this further. The same mechanisms that preserve useful information can preserve private details and mistakes. Researchers have extracted memorized training examples, including personal information, from language models (Carlini et al., 2021). External stores add their own questions about access, correction, retention, and deletion. Those questions require different answers depending on where the information lives.
Continuity is part of what could make agents useful over long periods. Picking up a project should require less reconstruction than starting it again. But I need to be able to see what the assistant thinks it knows, correct the record, and change my mind without an old note quietly overruling me. Forgetting can be a failure. Remembering too faithfully can be one too.
Sources
- Carlini, N., Tramèr, F., Wallace, E., et al. “Extracting Training Data from Large Language Models.” 30th USENIX Security Symposium, 2633–2650 (2021).
- Lewis, P., Perez, E., Piktus, A., et al. “Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks.” Advances in Neural Information Processing Systems 33, 9459–9474 (2020).
- Packer, C., Wooders, S., Lin, K., et al. “MemGPT: Towards LLMs as Operating Systems.” arXiv:2310.08560 (2023).
- Sumers, T. R., Yao, S., Narasimhan, K., and Griffiths, T. L. “Cognitive Architectures for Language Agents.” Transactions on Machine Learning Research (2024).
- Yao, J., Chien, E., Du, M., et al. “Machine Unlearning of Pre-trained Large Language Models.” Proceedings of ACL 2024, 8403–8419 (2024).