Scoped Memory: telling an AI assistant when not to use what it knows
A Human-AI Interaction research project: a chat assistant that shows what each memory changed and lets people scope it, a pre-registered within-subjects study against a plain memory list, and the tooling to run and judge it
AI assistants now remember things about you, and then use them everywhere. A budget you mentioned once shapes the anniversary dinner it plans; a “vegetarian” note follows you into a work lunch you are organising for others. Today’s memory controls let you edit or delete a memory, which fixes the bad answer by also losing the good ones. Scoped Memory asks a narrower question: can people tell an assistant when not to use something it knows, and does that repair last better than editing a list?
Above: a real answer from Qwen 3.5 122B for an invented person, Maya. The underlines mark what each memory changed. One click turns the suggested situation into a rule, and the next answer leaves the budget memory out for plans with her partner, without deleting it.
At a glance
- Type: Human-AI Interaction research project (course project for CMPUT 656: Human-AI Interaction, University of Alberta, Fall 2026)
- Status: Prototype, study design and analysis plan complete and stress-tested; the user study is in piloting, so no study results yet
- Problem: Saved memories are applied in every situation, and fixing one misfire by editing or deleting the memory breaks the cases where it was right
- Role: Sole researcher and developer: study design, prototype, analysis pipeline and judging tools
- Outcome so far: A working two-condition study instrument with matched behaviour across conditions, a pre-registered analysis, and validated measurement (details below)
- Technologies: Python, FastAPI, vanilla JavaScript, Qwen 3.5 122B on the university’s Aleph inference service, Playwright, pytest
- Repository: Public source repository
View on GitHub · Technical overview · Analysis plan · Every stress test, logged
the problem
Memory in assistants such as ChatGPT is mostly a list: the model sees everything it remembers about you on every request, and the only repairs are edit and delete. That design assumes a fact is either true or false. Most of what goes wrong is neither. “Keeps costs low” is true of you, until your supervisor’s grant is paying for the hotel.
The project has two parts. A base-rate study measures how often stored memories change everyday answers, and how often that change is wrong for the person’s situation that day. The prototype and user study test a different kind of control: instead of rewriting the memory, the person scopes it.
two ways to fix a memory
Both versions of the assistant show the same “Used …” line under an answer, naming the memories it relied on. Each name opens a card. The comparison is deliberately narrow: the two versions differ only where the research question needs them to.
Memory List, the baseline: which memories were used, with Edit, Remove, and “Not for this answer”. This is what memory products offer today.
Scoped Memory adds underlines on what each memory changed, and the card’s main action asks “When shouldn’t I use this?”, with a situation suggested from the request and checked to cover it. Saving it makes a rule; the memory stays for everything else.
| Memory List | Scoped Memory | |
|---|---|---|
| Shows which memories were used | yes | yes |
| Shows what each memory changed | no | underlines in the answer |
| Fix for this answer only | ”Not for this answer" | "Not for this answer” |
| Lasting fix | edit or delete the memory | a rule: not for this kind of situation |
| How the fix is enforced | the model reads the edited text | the memory is left out of the prompt before the model sees it |
| Wait before an answer | matched to Scoped Memory’s (see below) | includes the rule check |
how it works
Every request goes through the same pipeline in both versions, so the conditions differ only in what they show and which repairs they offer.
request
-> rule check Scoped Memory: does a saved rule cover it?
-> relevance step which memories are likely to matter
-> answer, streamed every memory not ruled out is in the prompt
-> background the same request answered WITHOUT each memory
-> compare did the memory change what was recommended?
-> verify does the change follow from the memory, and
does a second answer without it lack it too?
-> "Used" line fills in as each check finishes, same pace
in both versions
Two engineering problems shaped the design more than any interface choice:
- Showing what a memory changed is a noisy measurement. The model gives different answers to the same request even at temperature 0, so a single “with versus without” comparison found a change in 106 of 131 checks where nothing had been removed. A change is now shown only if it holds up three ways. On logged checks this kept 78 of 95 real changes, while checks with nothing removed produced a line in 18 of 131, each pointing at a part of the answer that does follow from the memory.
- Fairness between conditions has to be engineered, not assumed. A load test with realistic model latency showed Scoped Memory’s answers starting about 3 s later, because of its rule check. Memory List now waits a matched time before each study answer, drawn from Scoped Memory’s rule checks at the same task position, so both conditions wait for the same distribution of times. In a rerun of the load test, typical answers then started within a second of each other (4.4 s and 3.8 s).
“Not for this answer” swaps in the answer written without that memory, for this answer only. The note under the new answer says which memory a saved rule left out.
study design
| Aspect | Design |
|---|---|
| Participants | Within-subjects: every participant uses both versions, shown only as “Assistant A” and “Assistant B” |
| Memories | Each participant’s own, created from a short questionnaire |
| Tasks | 32 task sets; each participant gets 8 (4 per version). Each set has a conflict task (a true memory misapplied), a later task (the memory should stay out) and a should-apply task (it should be used) |
| Counterbalancing | 2 × 2 cells (which version first × which half of the sets), drawn by the server in random blocks of four |
| Primary outcome | Per set: the later task’s first answer does not apply the memory and the should-apply task’s first answer does |
| Judge | A model on the university’s own service, twice per answer, blind to participant and version, checked against a second person |
| Test | Sign-flip permutation test on pair totals within each randomized block |
The outcome rewards a repair that holds in both directions. Deleting the memory passes the later task and fails the should-apply one; doing nothing fails the later task. Only a correctly scoped fix succeeds on both.
What a participant sees on a task: the situation (which the assistant never sees), the request, sent exactly as written, and the answer. They repair memories the way they want them to stay fixed.
what is validated before the study runs
The study has no results yet, so the claims here are about the instrument, each traceable to the repository’s logs.
| Check | Result |
|---|---|
| Task sets, pre-tested on the study model | 89 of 96 tasks and 26 of 32 sets meet the bar; across all tasks the target memory was applied in 95% of answers written with it and 9% without |
| Outcome judge against blind verdicts | On 60 fresh pre-test answers, Qwen 3.5 with the study’s rules agreed on 55 (Cohen’s kappa 0.83) |
| Answers that narrate their memories | ”Since you …” openings fell from 64 of 64 probe answers to about 1 in 17 after the prompt change, so the answer itself does not reveal which memories were used |
| Rule matching | Confirming each match on its own raised the rule preview from 428 to 439 correct of 451 labelled pairs |
| Power (simulated) | With 4 sets per version and 35% vs 55% success across all sets, about 32 completers give 80 to 85% power |
| Software | 80+ automated tests, randomized operation sequences with injected model failures, a full study clicked through in a real browser, a load test with 20 simultaneous participants, and several rounds of independent code review |
running and judging the study
Two tools came out of making the study practical to run and honest to score.
A live view for the researcher: every participant’s step, status and model load, with a filterable feed of their events, updating every two seconds.
A blind labelling page for the second person: one answer at a time, keyboard-first, evidence by selection. It runs from a single file with no server, so participant data never leaves the researcher’s control.
what I would and wouldn’t claim
- It tests a bundle. Underlines, the suggested situation and rule enforcement differ together, so a difference between conditions cannot be credited to one of them.
- It depends on the model. With Qwen 3.5, text edits are often ignored; with GPT-OSS they mostly work. How strong the baseline is depends on the answering model, so results are for this model.
- Live success is not durable repair. The outcome measures whether answers fit within one session, not whether a repair would hold weeks later.
- Capacity limits group sessions. Each message makes about 29 model calls, mostly for the memory checks, which caps a shared university service at roughly 8 messages a minute, so sessions run with a few participants at a time.
status
The prototype, study materials and pre-registered analysis are complete; the study is being piloted. This page will be updated with results once the study has run.
acknowledgements
Course project for CMPUT 656: Human-AI Interaction at the University of Alberta, supervised by Dr. Majeed Kazemitabaar. Answers come from Aleph, the University of Alberta’s inference service on the Vulcan cluster. The people and memories in the screenshots and demos are invented.