Memory interview question

Agentic AIMemorymedium

After one chat, a grocery-delivery assistant's memory extractor proposed the candidate long-term memories below. Which write policy keeps later recall precise?

#Candidate memorySource
1Allergic to peanuts; never suggest products containing themuser said
2Is on the checkout page right nowsession state
3Probably has a large family (ordered 6 litres of milk)assistant inference
4Wants weekday deliveries left with the building conciergeuser said
5Seemed irritated about today's delayed orderassistant inference
6Asked whether the bakery section is open on Sundayuser question
  1. AWrite (1), (3) and (4): inferences such as family size personalise future offers, and since the extractor saw the actual order, its confidence is high enough to store it as a fact.
  2. BWrite all six: storage is cheap and similarity search ranks memories at query time, so entries irrelevant to a later query rank low and do not reduce the precision of what is recalled.
  3. CWrite (1), (4) and (5): an emotional reaction is a lasting signal of satisfaction, so the irritation note should set the assistant's tone in future sessions with this user.
  4. DWrite (1) and (4): durable facts the user stated that matter in future sessions; current states, one-off questions and the assistant's own guesses would crowd out useful recall.
Show the answer and explanation

Correct answer: D, Write (1) and (4): durable facts the user stated that matter in future sessions; current states, one-off questions and the assistant's own guesses would crowd out useful recall.

Explanation Memory

Long-term memory is only as good as what goes into it. Every stored entry competes at retrieval time, so low-value or wrong entries reduce recall precision: they are retrieved instead of, or alongside, the memories that matter, and they can steer the assistant in the wrong direction.

A practical write policy stores memories that are:

  • durable: still true and useful in future sessions;
  • user-stated or verified: not the assistant's own guess;
  • high-confidence and actionable: they change what the assistant should do.
#Store?Reason
1yesstated by the user, durable, safety-relevant
2notransient session state
3noinference from one order; it may have been for a party or an office
4yesstated preference that applies every weekday
5nomomentary mood, useful only in this conversation
6noone-off question, already answered

Why the other policies fail:

  • Storing guesses as facts creates false personalisation (family-pack offers for someone who lives alone) and is hard to correct, because the user never said it.
  • "Store everything, retrieval will sort it out" fails because similarity is not usefulness: the irritation note is semantically close to a future delivery question and can crowd out the concierge instruction.
  • A mood is transient, not a lasting signal; replaying it in later sessions makes the assistant awkward and can feel invasive.

If inferences are valuable, keep them apart, labelled as low-confidence, and confirm them with the user before relying on them.

Interview tip: describe the extraction prompt as a filter with explicit criteria (durable, user-stated, actionable) and measure retrieval precision on a test set of realistic future queries.

Practice it as a quiz

Answer this and the other free questions with instant grading, streaks and weak-topic tracking, or unlock all 4,000 questions.

More Agentic AI questions

  1. Trace mining of 50,000 runs of a telecom billing-support agent gives the tool paths below. The team will hard-code the three most frequent paths as…
  2. What control flow does this LangGraph graph implement?
  3. A retail client wants to benchmark a customer-service agent that must follow a written returns policy, call order-management APIs and handle multi-turn…
  4. You are building an MCP server for a retailer's merchandising team. (1) summarize_reviews needs an LLM to condense 500 reviews, but the server must not hold…
  5. A telecom network-diagnosis orchestrator fans out to 8 sub-agents in parallel (one per system: radio network, core, billing, …) and waits for all of them…