Long-term, semantic, episodic, and user-profile memory
Words made simple
A few useful meanings before you read the explanation.
- Retrieval
- Finding and fetching information that is useful for the current question.
- Agent
- An application that uses a model to choose its next action within defined limits. It can use tools and continue through several steps.
- Persistence
- Saving information so it remains available after a request ends or a process restarts.
More words from this lesson
- Authorization
- Checking what that identity is allowed to read or do. Being logged in does not grant access to every record.
- Overlap
- Repeating a small amount of text in neighboring document chunks to help retain context near their boundaries.
Overview
- Long-term memory stores selected information beyond one task.
- Semantic memory contains facts or preferences; episodic memory records past events; user-profile memory contains explicit attributes such as preferred language.
- These categories overlap and should be defined by application requirements rather than mystical model capabilities.
Why this matters
Returning users benefit from relevant continuity, and agents may need prior verified task outcomes.
An everyday example
A customer profile stores contact preferences; a service history stores prior visits.
A technical example
Profile: preferredLanguage="Gujarati"; episode: claimDraftReviewed with date, source, and user ID.
How it works
- Identify candidate memory
- Verify/confirm
- Attach source, scope, and timestamp
- Persist with retention
- Retrieve only relevant authorized entries
- Update/delete on correction.
Architecture and flow
Verified event/preference → scoped memory store → relevance retrieval → bounded context.
The insurance assistant example
Remember the customer's chosen communication language, but never assume last year's policy remains active.
When to use it
Clear repeated personalization or task-continuity needs with user-visible controls.
When to avoid it
Do not store sensitive medical details or inferred personality labels just because they appeared in chat.
Interview answer
“Long-term memory is curated, scoped, source-backed application data. I distinguish preferences and past events from current business facts.”
Benefits, trade-offs, and production considerations
- Memory poisoning means malicious or incorrect content becomes future trusted context.
- Require provenance and write policy, set expiry, allow user correction, and avoid treating retrieval similarity as memory truth.
Can you explain it without the notes?
Long-term, semantic, episodic, and user-profile memory
Use your own words. Explain an example and one limitation before checking the explanation.
Check your explanation
Long-term memory stores selected information beyond one task. Semantic memory contains facts or preferences; episodic memory records past events; user-profile memory contains explicit attributes such as preferred language. These categories overlap and should…
Turn this concept into a clear answer.
Practice this conceptAdapted from 13_AI.MD · “Long-term, semantic, episodic, and user-profile memory”. Examples are study fragments; framework behavior can depend on your version.