The Right Memory in the Wrong Context: Verifying Retrieval Admissibility in Long-Term Agent Memory

Zi Wang, Xingqiao Wang, Emmanuel Addai, Devika Ambekar, Xiaowei Xu
10/5/2026
cs.AIcs.IRcs.MA

No official code found. Best implementation: ziwang11112/right-memory-wrong-context (0 stars, MIT, last commit 2026-10-04).

Abstract

Long-term-memory agents can retrieve relevant information that is inadmissible for the current request because it belongs to another principal, violates policy, or reflects an incompatible lifecycle state. Recall and final-answer accuracy do not reveal this: a route can appear safe by missing required evidence, while a correct answer may follow inadmissible prompt exposure. We introduce a retrieval-admissibility verification framework that assigns each memory-query pair one of three statuses (admissible, inadmissible, or unresolved), compares routes at matched required-evidence recall with bounds for unresolved cases, and tracks memory IDs through prompt exposure while linking exposure to target-level disclosure. We evaluate its stages on separate, non-pooled populations. A post-hoc top-20 reanalysis of frozen rankings from two public long-term-memory benchmarks, RHELM and MemOps, covers 3,767 queries. All released anchors lie within trusted query namespaces; with within-namespace scores unchanged, off-namespace filtering cannot lower their ranks. Top-20 anchor recall increases from 0.432 to 0.533, 80% recall feasibility from 0.237 to 0.311, and exact similarity evaluations decrease by 98.3%. In a frozen 72-case development diagnostic, a released-metadata reference preserves required evidence, whereas neither text-only verifier detects violations under the 1% required-anchor false-denial limit. Across 1,523 paired benchmark-native cases, namespace routing is associated with judged-accuracy gains of 0.053-0.068 across three readers; recall also changes, so this comparison is observational. In 16 controlled exposure scenarios, only one of four reader-specific 95% confidence intervals excludes zero for relevant-inadmissible literal disclosure (+0.156, 95% CI [0.031, 0.312]). Results motivate separate verification of candidate support, admissibility, prompt exposure, and answer disclosure.

View on arXivView PDF

Code Implementations(1)

MIT

Code and evidence for The Right Memory in the Wrong Context: Verifying Retrieval Admissibility in Long-Term Agent Memory.

00Jul 27, 20262 weeks agoMIT
agent-memoryai-agentsevaluationinformation-retrievalllm-agents+4 more

Similar Papers

Cite this paper

@article{wang2026right,
  title  = {The Right Memory in the Wrong Context: Verifying Retrieval Admissibility in Long-Term Agent Memory},
  author = {Zi Wang and Xingqiao Wang and Emmanuel Addai and Devika Ambekar and Xiaowei Xu},
  year   = {2026},
  eprint = {2610.07309},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2610.07309v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2610.07309.svg)](https://codeofpaper.com/paper/2610.07309)

Discussion