Borrow the terms from cognitive science
- Episodic memory — specific past events with time and context. "Last Tuesday, Dad asked about pgvector indexes."
- Semantic memory — generalized knowledge stripped of context. "Dad prefers HNSW over IVFFlat for incremental ingestion."
An AI memory system needs both, and they have different storage shapes:
- Episodic → append-only log (JSONL, time-series), retrieved by recency and similarity
- Semantic → distilled knowledge base, retrieved by similarity, periodically rewritten by the model itself
Two retrieval contracts
When the user asks a question, you usually need both: episodic to recover what was actually said, semantic to recover the model's distilled understanding. Two retrievers, two scoring functions, fused at the prompt assembly stage.