Episodic & Semantic Memory Lifecycle
Conversational AI, Agent Memory & Multi-Turn Testing β Day 3
Test write/read/update/forget semantics, deterministic TTL eviction of ephemeral session facts, and recency-plus-confidence conflict resolution for contradictory customer updates.
Production agents separate short-lived episodic facts (such as an OTP verification timestamp) from durable semantic profile preferences. Today you will validate TTL expiration, right-to-be-forgotten erasure, and conflict resolution when newer or noisier facts collide with verified memory.
The official reference codebase for Day 3 is hosted in the repository. Clone the repository and navigate to day-3-memory-lifecycle/test_day3.py to run the working solution.
git clone https://github.com/777abhi/agent-memory-testing-roadmap.git
cd agent-memory-testing-roadmap/day-3-memory-lifecycle/test_day3.pyRun Memory Lifecycle & Conflict Tests
Execute the Day 3 memory store suite to verify eviction, erasure, and conflict resolution.
npm run test:day3store = AgentMemoryStore(recency_boost_window=300.0)
store.write("otp_verified", "true", "episodic", confidence=1.0, now=2000.0, ttl_seconds=120.0)
evicted = store.evict_expired(now=2200.0)
assert evicted == ["otp_verified"]- Verified full write, read, update, and explicit forget() erasure semantics with zero residual entries.
- Enforced deterministic TTL expiration so ephemeral episodic facts expire while semantic facts persist.
- Tested recency + confidence conflict arbitration with an auditable conflict_log.
π§ Knowledge Check
How should an agent memory store resolve a conflict when a low-confidence noisy mention arrives shortly after a high-confidence verified fact?