Published on

LLM Memory

Authors

Reference frames

All knowledge has an explicit or implicit reference frame for which it is valid.

  1. Temporal reference frames are the most common, i.e. facts associated with some span of time.
  2. Spatial reference frames

Vector embeddings are mathematical representation of data. Vector embedding struggle with episodic memories (chain of memories in series-order). Another major downside of vector embeddings is they are just hard to reason about. If two vectors are anomalously close or far, you don't really have much recourse or explanation.

Suppose you have two nodes that describe two events, and one event happened after another. It feels right to encode that "happened after" semantic information in the edge.

To recover that information without that semantic edge, the nodes would need to internally contain ordering information such as the timestamp the event in the node occurred, or the latter node needs to explicitly refer to the events of the former node.

Meta-documents

Every time you run a query over the knowledge graph, you can store the results of that thing as a meta-document.

Episodic memory

Presumably the primary means of sensory-input document creation is the authoring of "episodes". Just a narrative of what happens to the agent as it happens, with some kind of narrative start and stop points to the document.

Presumably, each document is connected to the episode before and after it, so you can traverse the leaf-level timeline of sensory input if needed. the model might do a process that looks remarkably like sleep and mull through the last day's episodes. It'll create a meta-document that is "everything that happened on 2025-05-17" with a summary of all the episodes, connected to all those episodes, and the meta-document from yesterday. It might go update the document "Everything that has happened in 2025 so far" if something particularly notable happened.