TL;DR
This paper introduces STITCH, a novel agentic memory system that grounds retrieval in "contextual intent" – a structured representation of an agent's current goal and action. This approach significantly improves long-horizon reasoning by filtering out irrelevant but semantically similar memories. The authors also introduce CAME-Bench, a new benchmark designed to specifically test context-aware retrieval in complex, goal-oriented scenarios.
What Problem Does This Paper Address?
Large Language Models (LLMs) are increasingly used in long, complex tasks that require them to remember and reason over extended interactions. A major challenge is that similar pieces of information (entities, facts) can appear multiple times in a conversation, but with different underlying goals or contexts. Traditional memory systems often struggle with this, leading them to retrieve irrelevant information that looks similar but is contextually wrong. This "memory noise" hinders robust reasoning, especially as interactions get longer and more intricate. Existing benchmarks often simplify these scenarios, failing to capture the true difficulty of real-world long-horizon tasks.
Methods
The core innovation is STITCH (Structured Intent Tracking in Contextual History). STITCH models the "contextual intent" of each step in an agent's interaction history. This intent is a structured cue composed of three parts:
- Thematic Scope: A label for the current overarching goal or thematic segment (e.g., "Day 2 Itinerary"). This helps group related steps across longer periods.
- Event Type: A label for the basic action being performed (e.g., "Hotel Booking," "Price Inquiry"). This captures recurring action patterns.
- Key Entity Types: Labels for the types of information that are important for the current goal (e.g., "Price," "Rating"). This acts like a lightweight schema to anchor relevant details.
During inference, STITCH uses this contextual intent to filter and prioritize memory snippets. It actively suppresses semantically similar but contextually incompatible history, ensuring that only relevant information is considered. The system also includes a coreference resolution module that uses this structural alignment to resolve ambiguous references before storing them.
Datasets
The authors introduce CAME-Bench (Context-Aware Agent Memory Evaluation Benchmark), a synthetic dataset designed to evaluate context-aware retrieval in long, goal-oriented trajectories. CAME-Bench features interleaved, non-turn-taking interactions, multi-domain coverage, and varying difficulty levels. They also evaluate STITCH on LongMemEval and LoCoMo, existing benchmarks for long-context QA and conversational memory, respectively.
Key Insights and Ideas
- Contextual Intent is Crucial: Simply retrieving based on semantic similarity is insufficient for long-horizon tasks. Grounding retrieval in the agent's current goal and action (contextual intent) is key to overcoming memory noise.
- Structured Cues Reduce Ambiguity: The three components of contextual intent (thematic scope, event type, key entity types) work together to disambiguate repeated mentions and anchor facts to functional roles.
- Evaluation Needs to Be Realistic: Existing benchmarks often simplify interactions. CAME-Bench's design, with its focus on interleaved goals and dynamic contexts, better reflects real-world challenges.
- Trade-offs in Memory Design: The paper highlights trade-offs between ingestion cost and retrieval efficiency, and between schema stability and immediate adaptability in dynamic labeling.
Key Results
STITCH achieves state-of-the-art performance on CAME-Bench, outperforming the strongest baseline by 35.6% on the largest subset. The gains are most significant as trajectory length increases, demonstrating STITCH's scalability. On LongMemEval, STITCH also performs strongly. Ablation studies show that all components of contextual intent (thematic scope, event type, coreference resolution) contribute to performance, with thematic scope being particularly impactful in reducing context noise.
Limitations and Future Work
The authors acknowledge that STITCH's ingestion pipeline incurs multiple LLM calls, leading to higher per-step costs than lightweight embedding-only baselines. They also note that their dynamic label evolution strategy involves a trade-off between schema stability and immediate adaptability, with a buffered update strategy introducing minor latency. Future work could explore hierarchical schema induction and lightweight structural predictors to further balance efficiency and performance. The paper also suggests that for broad synthesis tasks, a hierarchical structure for event taxonomies might be beneficial.
Summary updated