A developer is configuring a multi-step code review agent that needs to remember user feedback from a session that ended 3 hours ago. The agent also needs to retain the current file being reviewed during an active session and store long-term user style preferences across months. Which memory tier assignment is MOST appropriate?
Select an answer to reveal the explanation.
Short Explanation and Infographic
Think of memory tiers like desk space: the context window is your desktop (fast, limited, gone when you leave), a vector store is a filing cabinet in the next room (semantic search, medium-term), and a database is off-site records storage (structured, durable, long-lived). Match the retrieval pattern and durability need to the tier. The correct answer maps each memory type to the tier that fits its access pattern and lifespan.
Full explanation below image
Full Explanation
Agent memory architecture requires matching data characteristics to the appropriate storage tier. The context window is ideal for information needed immediately during an active session — in this case, the file currently under review. It provides zero-latency access but is lost when the session ends, making it unsuitable for cross-session data.
An external vector store is designed for semantic similarity retrieval over medium-term data. Session feedback from 3 hours ago is a classic vector store use case: the agent needs to retrieve relevant prior comments using natural language similarity, not exact key lookup. Vector stores support this pattern efficiently.
An external structured database (relational or document store) is appropriate for long-term, structured preferences that must persist across months and be reliably retrieved by known keys like user ID. Style preferences fit this profile exactly.
Why the other options fail: - Option A (everything in context window) fails because the context window is ephemeral — data is lost between sessions, making cross-session recall impossible. - Option C (everything in external database) ignores retrieval patterns: databases require structured queries and don't support semantic similarity search natively, making them a poor fit for fuzzy recall of prior session feedback. - Option D (session feedback in context window) fails because the session ended 3 hours ago — that context window no longer exists. The feedback must have been persisted externally to be retrievable now.
The correct tier assignment aligns access latency, retrieval semantics, and persistence requirements to the appropriate storage mechanism for each memory type.