YOUR SCENARIO
How would you approach this?
A user changes a project preference from Python to TypeScript. The assistant acknowledges the change, but a later session retrieves the old preference from vector memory. How would you design reliable corrections?
This is an illustrative practice scenario. State any additional assumptions in your answer.
Make your case first.
Clarify the goal, identify the biggest uncertainty, outline an approach, and explain how you would test it. Spend about 8 minutes before opening the reference.
Your notes are not submitted or saved. Keep a copy before leaving this page.
Reveal reference approach Clarifying questions, decisions, and tradeoffs
Clarify before designing.
- Is the preference global, specific to one project, or only for the current task?
- Where can old values survive: history, memory records, embeddings, and cached responses?
One defensible approach
- 01
Define a scoped record
Represent the owner, project scope, preference key, revision, source, and validity. Derive user identity from authenticated context. A retrieved sentence should not override a more authoritative correction simply because it ranks highly.
- 02
Propagate the correction
Supersede the old value in the authoritative store and update or exclude its derived retrieval records. Invalidate affected cached context. Preserve an audit trail only under an appropriate retention policy, not as another active preference candidate.
- 03
Test the complete lifecycle
Verify recall before and after correction, across sessions and projects. Test expiration, deletion, ambiguous scope, and other users' records. Ask for clarification when a correction does not identify which project it applies to.
Explain the tradeoff
Keeping more memories can improve recall but increases conflict and maintenance work. Store information with a defined use and lifecycle.
Common mistakes
- Appending a correction while leaving the old value equally eligible.
- Using embedding similarity as a precedence rule.
KEEP THE CONVERSATION GOING
Try the follow-ups.
- What should happen if the user asks to forget the preference?
- How does this differ from trimming conversation history?
Review your own answer.
Tick the points you covered. This is a reflection checklist, not an automated score or a hiring prediction.
Check the underlying concepts.
The scenario and reference approach were written for SaveMyToken. These sources support the technical concepts; they do not report this question being asked by an employer.
LangChain: Short-term memory ↗Qdrant: Filtering ↗