Table of Contents
Fetching ...

Semantic XPath: Structured Agentic Memory Access for Conversational AI

Yifan Simon Liu, Ruifan Wu, Liam Gallagher, Jiazhou Liang, Armin Toroghi, Scott Sanner

TL;DR

Semantic XPath, a tree-structured memory module to access and update structured conversational memory, is proposed, a candidate for the next generation of long-term, task-oriented ConvAI systems built on structured memory.

Abstract

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.

Semantic XPath: Structured Agentic Memory Access for Conversational AI

TL;DR

Semantic XPath, a tree-structured memory module to access and update structured conversational memory, is proposed, a candidate for the next generation of long-term, task-oriented ConvAI systems built on structured memory.

Abstract

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.
Paper Structure (32 sections, 17 equations, 7 figures, 2 tables)

This paper contains 32 sections, 17 equations, 7 figures, 2 tables.

Figures (7)

  • 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 demonstrationfn:demo. 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.
  • ...and 2 more figures