Contrast episodic and semantic long term memory with examples from a personal assistant agent
Episodic memory stores time-stamped events; semantic memory stores distilled stable facts. Episodic is retrieved on demand; semantic is loaded as persona context every session.
Think of what you remember about a friend. You remember specific moments, that birthday dinner two years ago when you both got food poisoning, and these come with dates and details. That is episodic. You also remember stable facts about them, they hate cilantro, they live in Berlin, they work as a vet. These are not tied to a particular event, just things that are true. That is semantic. An assistant needs both. The specific story of last month's Pinecone decision is episodic; 'the user always wants Python code, not TypeScript' is semantic. The two are stored, indexed, and used differently.
Concept explanation~2 min read
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Concept explanation~2 min read
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Cognitive science has carried the episodic versus semantic memory distinction since Tulving's work in the 1970s. LLM memory systems converged on the same split independently because the operational pressures are identical: events and facts have different shapes, lifecycles, and access patterns. Treating them the same produces a memory layer that is either too noisy (semantic entries that should be events) or too lossy (episodes flattened into bland generalizations).
A personal-assistant agent makes the distinction concrete. Some things the agent should know about the user are tied to specific moments, what we decided, when, why. Other things are stable traits, preferences, role, environment. The two combine to make the agent feel personalized without being noisy.
Definitions and example payloads
Episodic memory captures specific past events with temporal and contextual detail. The canonical shape is {event_id, timestamp, user_id, summary, full_context, related_topics, importance_score}. An example entry: {event_id: ep_8472, timestamp: '2026-04-12T14:32Z', summary: 'User decided against migrating from Pinecone to Turbopuffer', full_context: 'Discussed p99 latency benchmark showing 80ms vs 35ms at top-50 retrieval. User said cost savings would not offset the latency for their realtime use case.', related_topics: ['vector-stores', 'pinecone', 'turbopuffer'], importance_score: 0.7}. These memories tell the story.
Semantic memory captures distilled, time-invariant or slow-changing facts. The canonical shape is {fact_id, user_id, attribute, value, confidence, last_confirmed, source_episodes}. An example entry: {fact_id: sm_032, user_id: u_001, attribute: 'preferred_language', value: 'Python', confidence: 0.92, last_confirmed: '2026-05-15', source_episodes: [ep_4101, ep_5021, ep_5847]}. These memories tell what is true.
The source_episodes field is the audit trail: semantic facts should be traceable back to the episodic events that justified them. This becomes the foundation for trust ('the assistant says it knows X about me; how does it know?') and for revision ('this fact is no longer true; which episodes should I now down-weight?').
Situations where this technique stops working.
2–4 min · Everything important, quickly.
Real products, models, and research that use this idea.
- Mem0 exposes episodic and semantic memory as first-class API types with separate extraction and retrieval paths.
- Zep's temporal knowledge graph models episodic events as time-stamped graph edges and semantic facts as entity attributes.
What an interviewer would ask next. Try answering before peeking at the approach.
QHow would you implement the asynchronous extraction step that distills semantic facts from episodic memory?
Batch recent episodes, run an LLM with a structured-output schema asking 'what stable preferences are supported by repeated evidence here?', merge into existing semantic store with confidence updates.
Red flags & common mistakes
The phrases that signal junior thinking. Click to expand.
Red flags & common mistakes
The phrases that signal junior thinking. Click to expand.
Storing every interaction as either pure episodic or pure semantic, missing that the same conversation often generates both kinds and they have different lifecycles.
60 second bullets to scan on the way to the call.
Define episodic memory with a concrete event-shaped example
Define semantic memory with a concrete attribute-shaped example
Primary sources. Browse if you want the original framing.
Same topic, related formats. Practice these next.