Mental Models & Terminology
Core Concepts
Memory vs. Context vs. State
Memory: Persistent information that survives across sessions
- Stored independently of current context
- Requires explicit retrieval
- Can be updated, deleted, or versioned
Context: Information actively available to the model
- Included directly in prompts
- Immediately accessible for reasoning
- Limited by context window size
State: Current condition or status of the agent/conversation
- Active variables and flags
- Session-specific data
- Temporary working information
Retrieval vs. True Memory
Retrieval: Finding and surfacing stored information
- Like search through a database
- Information exists unchanged
- Access pattern: Store → Search → Retrieve
True Memory: Dynamic, integrated knowledge system
- Information evolves and connects
- Context shapes retrieval
- Access pattern: Experience → Learn → Adapt
Memory Types
Explicit Memory
Consciously stored and deliberately retrievable information.
Examples:
- User preferences: “I prefer dark mode”
- Historical facts: “Meeting was scheduled for 3pm”
- Explicit instructions: “Always format dates as MM/DD/YYYY”
Implicit Memory
Learned patterns and behaviors not explicitly stored as facts.
Examples:
- Communication style adaptation
- Response pattern preferences
- Interaction timing preferences
Episodic Memory
Specific events and experiences with rich contextual detail.
Structure:
- What happened
- When it happened
- Who was involved
- Where it occurred
- Why it mattered
Semantic Memory
General knowledge and facts without specific episodic context.
Structure:
- Facts and rules
- Learned patterns
- Abstracted knowledge
- Concept relationships
Memory Operations
Encoding
Converting experiences into storable memory representations.
Challenges:
- What information to preserve?
- How to represent relationships?
- Which details are significant?
Storage
Persisting memory in appropriate systems and formats.
Considerations:
- Storage medium (SQL, vector, graph)
- Indexing strategy
- Compression and summarization
- Version control
Retrieval
Finding and accessing relevant stored memories.
Types:
- Exact match: Specific factual lookup
- Similarity search: Semantically related content
- Association: Connected through relationships
- Temporal: Time-based queries
Consolidation
Strengthening, connecting, and organizing memories over time.
Processes:
- Connecting related memories
- Abstraction and pattern extraction
- Importance scoring adjustment
- Redundancy elimination
Forgetting
Deliberate removal or degradation of stored information.
Types:
- Active deletion: Explicit removal
- Passive decay: Automatic cleanup
- Interference: New information overwriting old
- Motivated forgetting: Privacy-driven removal
Entity Types
Agents
The AI system itself and other AI agents in multi-agent scenarios.
Users
Human participants with identities, preferences, and historical context.
Conversations
Interaction sessions with boundaries, topics, and outcomes.
Objects
Domain-specific entities (documents, tasks, projects, etc.).
Relationships
Connections between entities (user-to-user, user-to-object, etc.).
Temporal Models
Absolute Time
Specific dates and times with precise timestamps.
Relative Time
Time relationships without absolute anchoring (“last week”, “before the meeting”).
Event Time
Time defined by other events (“after the project started”, “since we discussed X”).
Validity Time
When information was true in the real world.
Transaction Time
When information was stored in the system.
Quality Metrics
Precision
Percentage of retrieved memories that are relevant.
Recall
Percentage of relevant memories that are retrieved.
Freshness
How current and up-to-date stored information is.
Coherence
Logical consistency between stored memories.
Coverage
Breadth of information captured about entities and relationships.
Common Anti-patterns
Memory Hoarding
Storing everything without considering relevance or importance.
Context Stuffing
Including too much historical context in prompts.
Static Snapshots
Treating memories as unchanging facts rather than evolving understanding.
Retrieval Tunnel Vision
Only using exact matches instead of exploring related information.
Temporal Flattening
Losing time-based context during storage or retrieval.
Next Steps
- Explore Context Engineering vs. Prompt Engineering
- Learn about Retrieval vs. True Memory in practice
- Understand Entity Resolution & Disambiguation