Large language model (LLM) agents increasingly use external memory systems to support personalization by drawing on long and evolving interaction histories, in which user preferences may be distributed across time, change with context, and conflict with earlier evidence. However, existing systems face three limitations: fixed-turn, fixed-token, or session-based boundaries can mix unrelated dialogue or split an event from its causes, decisions, and outcomes; storing multiple pieces of user information from the same interaction as a single memory binds together items that serve different functions and should be independently retrievable; and treating the current task as a single top-k retrieval query can return fragments that are individually relevant but fail to jointly capture preference evolution, temporal validity, and contextual applicability. We introduce QUMem, a structured memory framework for query-conditioned user-state inference. QUMem first segments interaction histories into variable-length episodes according to semantic continuity, then decomposes each episode into independently retrievable factual, preference, and transferable insight memories while preserving temporal positions and source evidence. At inference time, three sequential agents identify task-specific information needs, plan multi-query retrieval over the typed memory stores, and jointly infer a temporally and contextually valid user state for downstream response generation. QUMem achieves state-of-the-art performance on both PersonaMem and KnowU-Bench, demonstrating the effectiveness of query-conditioned user-state inference for long-term personalization.
Figures & tables
Figure 1: Comparison between previous method and QUMem . Previous methods retrieve memory fragments based on their similarity to the current query, whereas QUMem retrieves task-relevant evidence from typed memory stores and jointly interprets it to infer the user’s current, contextually valid state.
Figure 2: Overview of QUMem . The framework constructs semantically coherent dialogue episodes, decomposes them into factual, preference, and transferable insight memories, and uses three agents to infer a query-conditioned user state.
Base Model
Context Length
Method
Recall user-shared facts
Suggest new ideas
Acknowledge latest user preferences
Track full preference evolution
Revisit reasons behind preference updates
Provide preference-aligned recommendation
Generalize to new scenarios
Overall
GPT-4o-mini
32K
A-MEM
47.95
30.11
–
44.60
71.72
52.73
17.54
45.84
Mem0
67.81
36.56
–
47.48
83.84
65.45
63.16
60.10
Zep
45.89
31.18
–
51.08
70.71
69.09
31.58
49.75
QUMem
69.18
49.46
–
54.68
84.85
76.36
73.68
66.38
128K
A-MEM
59.65
31.27
50.12
46.04
65.06
44.99
27.23
45.65
Mem0
75.44
30.31
62.47
54.84
79.55
63.04
44.60
56.58
Table 1: Performance on the PersonaMem benchmark. The best performance is highlighted in bold , and the second-best is underlined .
Easy
Hard
Overall
Method
SR
Score
SR
Score
SR
Score
IE
A-MEM
14.0
0.41
4.7
0.34
9.3
0.38
0.34
Mem0
18.6
0.48
7.0
0.40
12.8
0.44
0.40
Zep
16.3
0.44
7.0
0.37
11.6
0.41
0.37
QUMem
23.3
0.56
11.6
0.49
17.4
0.53
0.49
Table 2: Performance on the KnowU-Bench benchmark.
Ablation Setting
Context Length
Overall
32K
128K
1M
QUMem
66.38
64.61
56.17
61.02
w/o Episode Construction
64.69
62.05
53.25
58.38
w/o Memory Decomposition
63.67
60.69
52.02
57.11
w/o Reconstruction
61.97
58.12
49.18
54.51
Table 3: Ablation on key components.
Figure 3: Ablation on key hyperparameters.
Method
Builds/100 ↓
LLM Calls/100 ↓
Tokens/Turn ↓
A-MEM
100.0
201.2
3,317.9
Mem0
25.6
380.7
6,401.9
Zep
100.0
331.8
13,337.3
QUMem
27.1
81.4
1,221.2
Table 4: Normalized memory construction costs of different methods on PersonaMem.