Table of Contents
Fetching ...

U-Fold: Dynamic Intent-Aware Context Folding for User-Centric Agents

Jin Su, Runnan Fang, Yeqiu Li, Xiaobin Wang, Shihao Cai, Pengjun Xie, Ningyu Zhang, Fajie Yuan

TL;DR

The paper tackles the context-length bottleneck of LLM-based user-centric agents by identifying two failure modes—loss of fine-grained constraints and drift in user intent—and introducing U-Fold, a dynamic context-folding framework. U-Fold maintains the full dialogue and tool history while building an intent-aware, compact context at each turn via Conversation Summarization and Dynamic Data Extraction, enabling robust long-horizon reasoning. Across benchmarks tau-bench, tau^2-bench, and VitaBench, U-Fold consistently outperforms ReAct and prior folding baselines, with notable gains on long, noisy tasks and improvements up to 27.0%. The work demonstrates the value of dynamic, intent-aware context management for realistic user-centric applications and points to future directions in automatic intent-change detection and broader benchmarking.

Abstract

Large language model (LLM)-based agents have been successfully deployed in many tool-augmented settings, but their scalability is fundamentally constrained by context length. Existing context-folding methods mitigate this issue by summarizing past interactions, yet they are typically designed for single-query or single-intent scenarios. In more realistic user-centric dialogues, we identify two major failure modes: (i) they irreversibly discard fine-grained constraints and intermediate facts that are crucial for later decisions, and (ii) their summaries fail to track evolving user intent, leading to omissions and erroneous actions. To address these limitations, we propose U-Fold, a dynamic context-folding framework tailored to user-centric tasks. U-Fold retains the full user--agent dialogue and tool-call history but, at each turn, uses two core components to produce an intent-aware, evolving dialogue summary and a compact, task-relevant tool log. Extensive experiments on $τ$-bench, $τ^2$-bench, VitaBench, and harder context-inflated settings show that U-Fold consistently outperforms ReAct (achieving a 71.4% win rate in long-context settings) and prior folding baselines (with improvements of up to 27.0%), particularly on long, noisy, multi-turn tasks. Our study demonstrates that U-Fold is a promising step toward transferring context-management techniques from single-query benchmarks to realistic user-centric applications.

U-Fold: Dynamic Intent-Aware Context Folding for User-Centric Agents

TL;DR

The paper tackles the context-length bottleneck of LLM-based user-centric agents by identifying two failure modes—loss of fine-grained constraints and drift in user intent—and introducing U-Fold, a dynamic context-folding framework. U-Fold maintains the full dialogue and tool history while building an intent-aware, compact context at each turn via Conversation Summarization and Dynamic Data Extraction, enabling robust long-horizon reasoning. Across benchmarks tau-bench, tau^2-bench, and VitaBench, U-Fold consistently outperforms ReAct and prior folding baselines, with notable gains on long, noisy tasks and improvements up to 27.0%. The work demonstrates the value of dynamic, intent-aware context management for realistic user-centric applications and points to future directions in automatic intent-change detection and broader benchmarking.

Abstract

Large language model (LLM)-based agents have been successfully deployed in many tool-augmented settings, but their scalability is fundamentally constrained by context length. Existing context-folding methods mitigate this issue by summarizing past interactions, yet they are typically designed for single-query or single-intent scenarios. In more realistic user-centric dialogues, we identify two major failure modes: (i) they irreversibly discard fine-grained constraints and intermediate facts that are crucial for later decisions, and (ii) their summaries fail to track evolving user intent, leading to omissions and erroneous actions. To address these limitations, we propose U-Fold, a dynamic context-folding framework tailored to user-centric tasks. U-Fold retains the full user--agent dialogue and tool-call history but, at each turn, uses two core components to produce an intent-aware, evolving dialogue summary and a compact, task-relevant tool log. Extensive experiments on -bench, -bench, VitaBench, and harder context-inflated settings show that U-Fold consistently outperforms ReAct (achieving a 71.4% win rate in long-context settings) and prior folding baselines (with improvements of up to 27.0%), particularly on long, noisy, multi-turn tasks. Our study demonstrates that U-Fold is a promising step toward transferring context-management techniques from single-query benchmarks to realistic user-centric applications.
Paper Structure (25 sections, 9 equations, 7 figures, 3 tables, 1 algorithm)

This paper contains 25 sections, 9 equations, 7 figures, 3 tables, 1 algorithm.

Figures (7)

  • Figure 1: While vanilla context folding may drop critical constraints after multi-turn interactions and thus lead to incorrect actions, U-Fold preserves fine-grained information through dynamic context folding.
  • Figure 2: Overview of the U-Fold pipeline. U-Fold consists of two core components for dynamic context folding: (i) a Summarization Module that tracks the evolution of the conversation and maintains an explicit to-do list, and (ii) a Data Extraction Module that filters redundant structured tool outputs and retains only task-relevant information.
  • Figure 3: Context folding analysis of U-Fold against ReAct. (a) U-Fold substantially slows context length growth over interaction rounds while preserving task performance. (b) U-Fold win rate over ReAct across bins of final context length (a proxy for task difficulty), where final context length is ReAct's context size at task completion. For each length bin, the win rate is the ratio between the number of tasks solved by U-Fold and those solved by ReAct. U-Fold’s relative advantage increases as final context length grows.
  • Figure 4: Distribution of tool-call counts under different agentic strategies. Static context folding methods repeatedly invoke tools to recover information lost during the context compression.
  • Figure 5: Error analysis on 50 randomly sampled tasks. We report the proportion of successes and three types of failures. U-Fold substantially reduces all error types, especially errors caused by missing user information.
  • ...and 2 more figures