STUB
[[Language Model Entities (LMEs)]] require a flexible and low-latency system for managing many types of memory. This includes, among many others:
- Episodic memory (What have I experienced?)
- Entity memory (Who or what am I interacting with?)
- Procedural memory (How do I do a thing?). See [[Procedural memory and learning for LMEs]]
A key feature of human memory is **chunking** - taking memories and consolidating them to make things more efficient. This takes multiple forms, but [[AI entities should continuously reprocess memories]] - resolving redundancies, contradictions, overly specific memories that are unused, etc. That could look like defragmenting does on a hard drive.
For example, when you learn something new, e.g. a programming language, you need to hold many unfamiliar concepts in your head. As your skill progresses, you learn the underlying patterns, and things become second nature. An experienced programmer doesn't need 5 individual memories for what for loops do in different languages.
Another function of that efficiency is making connections between memories. Humans do this during the day, but it's especially apparent when sleeping. [[NREM sleep]] focuses "sleep spindles", seen as sharp spikes on an EEG, on areas that need consolidation - those sleep spindles have a strong effect on skill fluency in humans. Similarly, [[REM sleep]] will make more distant connections between memories, process emotions, and (theoretically) integrate those experiences into the psyche.
Another key ingredient is **memory salience**. Humans will actively forget things that aren't important to them - entities would need to do something similar to maximize efficiency. A basic form of this can been seen in the [Generative Agents: Interactive Simulacra of Human Behavior](https://arxiv.org/abs/2304.03442) paper, using a mix of time, salience/importance, and retrieval frequency weighting. This weight would also be useful in targeting the memory chunking mentioned above.