A PR-review agent needs to track which files it has already reviewed within a single PR session, and also needs to recall recurring code quality patterns observed across hundreds of previous PRs to improve future reviews. Which combination of memory types is most appropriate?
Select an answer to reveal the explanation.
Short Explanation and Infographic
It's like using a scratch pad for today's to-do list and a notebook for lessons learned over your career — different tools for different time horizons. On the exam: match memory type to data lifetime; session-specific tracking goes to task-scoped memory, cross-session knowledge goes to durable long-term storage.
Full explanation below image
Full Explanation
This question tests the ability to match memory type to data lifecycle. The reviewed-file list is purely session-scoped: it is only relevant during the current PR review and should be discarded afterward. Task-scoped (ephemeral) memory is correct for this — it's fast, cheap, and automatically cleaned up. The cross-PR quality patterns, however, must persist across many sessions and grow richer over time, making durable long-term storage the right fit. Option C correctly applies this two-tier approach.
Option A is incorrect because a vector store excels at semantic similarity search over unstructured text, but tracking 'which files I have already reviewed' in this session is a simple set-membership check, not a semantic retrieval problem. Using vector embeddings for a within-session checklist is over-engineered and adds unnecessary latency and cost.
Option B is incorrect because a relational database is a durable store, not an ephemeral one. Using it for session-scoped reviewed-file tracking means the agent must explicitly clean up records after each PR, which adds complexity. While it could work for long-term patterns, it does not address the session-scoped requirement efficiently.
Option D is incorrect because in-context memory (the model's context window) is the most ephemeral memory type — it is lost when the session ends, making it unsuitable for cross-PR pattern retention. It also has strict size limits that would be exceeded when accumulating patterns across hundreds of previous PRs.