Conversational AI (ConvAI) agents increasingly maintain structured memory to support long-term, task-oriented interactions. In-context memory approaches append the growing history to the model input, which scales poorly under context-window limits. RAG-based methods retrieve request-relevant information, but most assume flat memory collections and ignore structure. We propose Semantic XPath, a tree-structured memory module to access and update structured conversational memory. Semantic XPath improves performance over flat-RAG baselines by 176.7% while using only 9.1% of the tokens required by in-context memory. We also introduce SemanticXPath Chat, an end-to-end ConvAI demo system that visualizes the structured memory and query execution details. Overall, this paper demonstrates a candidate for the next generation of long-term, task-oriented ConvAI systems built on structured memory.
Figures & tables
Figure 1: A travel-planning ConvAI agent for a 3-day ACL conference trip in San Diego. Left: in-context memory appends the full conversation. Middle: flat RAG retrieves from a flattened collection of memory items. Right: Semantic XPath retrieves and updates the relevant substructure from structured memory.
Figure 2: End-to-end Semantic XPath pipeline on an ACL 2026 trip plan illustrated in both the conversation view (blue) and the memory view (grey). Step 1: The user requests to “add a coffee break on the day that is packed with conference sessions.” is translated into a Semantic XPath query based on the memory schema. Step 2: The query is executed with structural matching and semantic relevance scoring, selecting Day 2 . Step 3: The retrieved substructure is passed to downstream generation to insert a coffee-break POI and respond to the user.
Figure 3: SemanticXPath Chat demonstration 1 . Left: Conversation view, where the user asks to add a coffee break on the day packed with conference sessions . Middle: Memory view, highlighting the retrieved Day 2 and the newly inserted coffee break. Right: Execution view, showing step-by-step query execution and scoring details.
Figure 4: Example of structured memory for three ConvAI scenarios: Travel Itinerary, To Do List, and Meal Kit Recommendation, with representative user requests covering Memory Read, Memory Write, and Memory Delete.
Figure 5: Single-turn evaluation across three methods. We report average pass rate ( left ) and token usage ( right ) averaged over three domains.
Figure 6: Multi-turn evaluation across three methods. We report average pass rate ( left ) and token usage ( right ) averaged over three domains.
Figure 7: Token usage vs. number of turns in a multi-turn ConvAI setting. Our proposed Semantic XPath maintains stable token consumption across turns, whereas the in-context baseline exhibits steadily increasing token usage as the conversation history grows.
Appendix figures & tables2 assets
Supplementary material from the paper’s appendix.
Appendix
Model
Method
Scorer
Itinerary
To Do List
Meal Kit
Avg.
Pass
Tokens
Pass
Tokens
Pass
Tokens
Pass
Tokens
GPT-5 mini
In-context
–
55.0
12,136
80.0
5,444
75.0
61,069
70.0
26,216
Flat RAG
–
25.0
3,137
40.0
2,722
25.0
3,892
30.0
3,250
GPT-5 mini
Semantic XPath
Sem
75.0
5,548
64.0
5,937
60.0
7,013
66.3
6,166
Semantic XPath
Entail
85.0
5,161
84.0
5,184
80.0
6,728
83.0
5,691
Gemini 3 Flash
In-context
–
95.0
12,846
72.0
10,465
70.0
52,849
79.0
25,387
Appendix
Table 1: Single-turn evaluation across methods. Sem denotes the Semantic Similarity scorer and Entail denotes the Entailment scorer for Semantic XPath . We report average pass rate and token usage with GPT-5 mini and Gemini 3 Flash as backbones across three domains: Travel Itinerary, To Do List, and Meal Kit Recommendation.
Model
Method
Scorer
Itinerary
To Do List
Meal Kit
Avg.
Pass
Tokens
Pass
Tokens
Pass
Tokens
Pass
Tokens
GPT-5 mini
In-context
–
90.0
28,342
70.0
20,398
80.0
158,552
80.0
69,097
Flat RAG
–
20.0
3,250
50.0
3,043
10.0
3,686
26.7
3,327
GPT-5 mini
Semantic XPath
Sem
50.0
5,664
100.0
6,132
60.0
7,087
70.0
6,294
Semantic XPath
Entail
80.0
5,820
100.0
5,649
70.0
6,079
83.3
5,850
Gemini 3 Flash
In-context
–
60.0
31,639
70.0
23,602
40.0
174,567
56.7
76,603
Appendix
Table 2: Multi-turn evaluation across methods. Sem denotes the Semantic Similarity scorer and Entail denotes the Entailment scorer for Semantic XPath . We report average pass rate and token usage with GPT-5 mini and Gemini 3 Flash as backbones across three domains: Travel Itinerary, To Do List, and Meal Kit Recommendation.
Conversational memory equips AI assistants to retain, update, and retrieve useful information from past interactions for coherent, personalized dialogue.
Large language models still struggle with reliable long-term conversational memory: simply enlarging context windows or applying naive retrieval often introduces noise and destabilizes responses. We present APEX-MEM, a conversational memory system that combines three key innovations: (1) a property graph which uses domain-agnostic ontology to structure conversations as temporally grounded events in an entity-centric framework, (2) append-only storage that preserves the full temporal evolution of information, and (3) a multi-tool retrieval agent that understands and resolves conflicting or evolving information at query time, producing a compact and contextually relevant memory summary. This retrieval-time resolution preserves the full interaction history while suppressing irrelevant details. APEX-MEM achieves 88.88% accuracy on LOCOMO's Question Answering task and 86.2% on LongMemEval, outperforming state-of-the-art session-aware approaches and demonstrating that structured property graphs enable more temporally coherent long-term conversational reasoning.
Long-horizon memory systems increasingly improve how evidence is stored and retrieved, yet the generator must still reason over fragments whose cross-session relationships are implicit. We study generation-time memory organization as a distinct design dimension and introduce GRAVITY (Generation-time Relational Anchoring Via Injected Topological MemorY), a host-independent auxiliary memory layer. GRAVITY consolidates raw dialogue into entity profiles, temporal event traces, and cross-session topic summaries, then retrieves and injects query-relevant records through the prompt interface. Across five heterogeneous memory systems on LongMemEval and LoCoMo, it improves every host--benchmark baseline under two distinct LLM configurations. Controlled analyses separate gains from organizing already available evidence and from consolidating information across the full history. Under a matched LightMem pipeline, the entity--event--topic representation reaches 83.9% on LoCoMo, 3.6% above the strongest of six alternative auxiliary representations. These results show that generation-time structure is a portable complement to existing memory retrieval, while its interaction with host evidence depends on the benchmark and host.
Yushi Sun, Bowen Cao, Dong Fang +2
LIGHTSPEED, Shenzhen, China · The Chinese University of Hong Kong, Hong Kong, China
Conversational AI agents commonly lack persistent memory across sessions. The obvious fixes like injecting full chat histories into the context window, or delegating to a third-party memory service, either exhaust the model's context budget or send personal data through infrastructure the user does not control. We describe a memory store that avoids both problems: an agent-local Neo4j property graph augmented with HNSW vector indexes and a full bitemporal data model. Each memory is stored as an immutable identity node linked to versioned content nodes carrying two closed-open time intervals: valid time (when the fact was true in the world) and transaction time (when the database recorded it). This design supports point-in-time semantic retrieval without physically overwriting history. Semantic edges between related memories are maintained automatically at write time using cosine similarity over 1024-dimensional embeddings. We evaluate the system on LongMemEval, a 500-question benchmark spanning six question types designed to stress long-term memory. Across 60 sampled questions, the current-state semantic search path achieves 46.7% R@10 overall, rising to 80% on knowledge-update questions. The time-travel path yields 80% R@10 on knowledge-update but decreases recall on temporal-reasoning questions (50% to 37.5%), a consequence of post-filter dilution that points directly to a concrete design improvement. We discuss what these results reveal about the limits of pure retrieval for different question types and what each failure mode suggests for future work.