Zenaique

Contrast episodic and semantic long term memory with examples from a personal assistant agent

Flashcard·Medium·4.0 · 0·~30s·Asked atDroomLinkedinMistral AI
Attempt it
TL;DR

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.

Memory aid
Sign in to see the mnemonic that makes this stick.
Easy to grasp

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.

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?').

Retrieval patterns
Write policy: extract semantic from episodic, asynchronously
Decay, conflicts, and the temporal dimension
How frameworks land
Sign in to unlock the full deep dive.

Situations where this technique stops working.

Sign in to see when this approach fails.

2–4 min · Everything important, quickly.

Sign in to see the quick scan of the deep dive.

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.
Sign in to see more production examples.

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?
A

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.

1 more follow-up an interviewer would ask next. Sign in to reveal them.

Red flags & common mistakes

The phrases that signal junior thinking. Click to expand.

Most common mistake

Storing every interaction as either pure episodic or pure semantic, missing that the same conversation often generates both kinds and they have different lifecycles.

Sign in to see all red flags and common mistakes.

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

Sign in to unlock the revision sheet.

Primary sources. Browse if you want the original framing.

Similar questions

Same topic, related formats. Practice these next.

4 curated
Next question
Pick the most effective intervention when an agent's context grows by 8KB every iteration
MCQ·Medium