Title: Quiz 3 — Memory and State Management for Agents
Course: AIINFRA 300: Agentic AI & the Model Context Protocol (MCP) > Section: Week 03 — Memory and State Management for Agents

Q: In LangGraph, short-term memory is best described as:
- A separate database maintained outside the graph
- Part of the graph's state, persisted via a checkpointer
- A cache that only the LLM provider controls
- Something that only exists in long-term storage
A: Part of the graph's state, persisted via a checkpointer

Q: A context window functions as persistent, durable storage for an agent — information placed in it will still be available in a future, unrelated session.
- True
- False
A: False

Q: Which type of long-term memory is most responsible for turning an agent from a purely reactive system into one that learns from past experience?
- Semantic memory
- Episodic memory
- Procedural memory
- Working memory
A: Episodic memory

Q: In the vector-store retrieval pattern described this week, list the steps that happen after the vector store returns its K nearest embeddings, before those results are injected into context.
Feedback: Sample/expected answer: The K nearest results are filtered by namespace and recency, then ranked by a combined relevance-and-recency score, and only then injected into context.

Q: Long-term memory in LangGraph is organized by namespace and key within a store, allowing recall across sessions and threads, not just within one thread.
- True
- False
A: True

Q: A team decides to solve their agent's forgetfulness problem by switching to a model with a much larger context window instead of building a memory store. What is the most accurate critique of this approach?
- Larger context windows are always strictly better and this fully solves the problem
- Even large-context models can be distracted by stale content and often degrade before hitting the token limit, so external storage and selective retrieval are still needed
- Context window size has no effect on agent performance whatsoever
- This approach is correct as long as the context window exceeds 1 million tokens
A: Even large-context models can be distracted by stale content and often degrade before hitting the token limit, so external storage and selective retrieval are still needed

Q: Name the LangChain library introduced this week that extracts facts from conversations, supports arbitrary storage backends, and integrates natively with LangGraph for long-term memory in production.
Feedback: Sample/expected answer: LangMem

Q: Which of the following best describes why conflating short-term and long-term memory into a single "agent memory" concept is a design mistake?
- They are actually identical mechanisms, so conflating them causes no real issues
- Short-term memory only matters for procedural tasks
- They are distinct mechanisms; conflating them leads to designs that either lose state between sessions or overload the context window with everything ever stored
- Long-term memory is always faster to query than short-term memory
A: They are distinct mechanisms; conflating them leads to designs that either lose state between sessions or overload the context window with everything ever stored