Leveraging Trajectory Graphs for Pre-Execution Error Diagnosis in Agentic LLM Systems
Xu Zheng, Zhuomin Chen, Chaohao Lin, Hua Wei, Haifeng Chen, Wei Cheng, Dongsheng Luo
Abstract
Large Language Model~(LLM)-based agents have demonstrated exceptional performance across a wide range of complex interactive tasks. However, they often struggle with long-horizon interactive tasks common in domains, such as embodied AI. The complexity and vast action spaces in these settings lead to compounding errors, where a single suboptimal action can derail an entire trajectory, causing the agent to exhaust its limited step budget on inefficient or unrecoverable paths. To overcome this without costly fine-tuning, we draw inspiration from software debugging, where execution logs are analyzed to preemptively catch errors. We propose \textit{Trajectory Graph Copilot}, a novel framework that acts as a ``copilot'' for LLM agents by diagnosing potential action errors before they are executed. At its core,\textit{Graph Debugger} models historical trajectories as a probabilistic graph and uses a Graph Neural Network to identify sequential action patterns that frequently lead to failure. Functioning as a proactive diagnostic sandbox, our method provides early warnings on potentially flawed actions, prompting the agent to self-correct. This pre-action error diagnosis prevents costly mistakes, significantly enhancing the agent's ability to complete long-horizon tasks successfully. The extensive experiments on four benchmarks with three LLM agents demonstrate a pass ratio improvement on average.
Create a lesson
Related papers
Agent Skills Matter: Inferring Proprietary Skills from Execution Trajectories
Shared title terminologycs.AIJianing Geng, Ruiqi He, Zekun Fei et al.
UrbanDS: A Graph-Guided LLM Multi-Agent System for Data-Intensive Urban Tasks
Shared title terminologycs.AIZhilun Zhou, Jianghao Yu, Yuming Lin et al.
MeterRouter: Budget-Aware Dynamic Routing for Multi-Agent Systems
Shared title terminologycs.AIYue Xu, Leikun Yin, Ruiming Min et al.
Crucible: Evaluating LLM Agents in Executable Chemistry Research Environments
Shared title terminologycs.AIYinjun Liu, Xinye Li, Ruisen Peng et al.
Interactive Proofs as a Unified Framework for Evaluating and Leveraging Verifiable Proof Generation by LLM Agents
Shared title terminologycs.AIYankai Shu, Xingyu Zhao, Chuan Mao et al.
FIG-MAC: A Fine-grained Inspiration Graph Empowered Multi-Agent Collaboration for Automated Scientific Hypothesis Generation
Shared title terminologycs.AISiyuan Chen, Yuping Gao, Tai Huang et al.