基于 LLM 的代理系统在复杂领域, 中表现出了卓越的能力,但同时也面临着级联错误和调试困难的问题。关键错误检测旨在定位失败轨迹中导致最终失败的最早错误步骤。然而, 的进展面临两个主要挑战。首先,长轨迹使得识别个体错误,变得困难,因为判断步骤的证据可能分散在遥远的指令,观察,和先前的上下文中。其次, 失败的轨迹通常包含多个局部错误,这些错误具有不同的下游影响, 只有其中一些仍然对最终失败负责。在这项工作,中,我们提出了 TrajDebug, 一个错误生命周期跟踪框架,该框架通过多粒度历史压缩和基于证据的错误识别,来解决长轨迹错误发现问题,并通过跟踪每个错误的解决状态和最终影响来支持关键归因。我们进一步构建 TrajErrBench, 基准,包含来自 Tau2Bench 和 SWE-Bench Pro, 的 486 个手动注释的失败轨迹,涵盖实际的工具使用和编码场景。跨不同代理基准的实验表明,TrajDebug 在现有基准, 上实现了最佳整体性能,并且应用研究进一步表明,其诊断为提高下游代理的成功提供了可操作的反馈。我们将发布代码和数据以方便进一步的研究。

LLM-based agentic systems have shown remarkable capabilities in complex domains, while suffering from cascading errors and difficulty in debugging. Critical error detection aims to locate the earliest error step in a failed trajectory that is responsible for the final failure. However, progress faces two main challenges. First, long trajectories make it difficult to identify individual errors, since the evidence for judging a step may be scattered across distant instructions, observations, and prior context. Second, failed trajectories often contain multiple local errors with different downstream effects, only some of which remain responsible for the final failure. In this work, we propose TrajDebug, an error-lifecycle tracing framework that addresses long-trajectory error discovery with multi-granularity history compression and evidence-based error identification, and supports critical attribution by tracing each error的 resolution status and terminal impact. We further construct TrajErrBench, a benchmark of 486 manually annotated failed trajectories from Tau2Bench and SWE-Bench Pro, covering realistic tool-use and coding scenarios. Experiments across diverse agent benchmarks show that TrajDebug achieves the best overall performance over existing baselines, and application studies further demonstrate that its diagnoses provide actionable feedback for improving downstream agent success. We will release the codes and data to facilitate further research.

科目:人工智能(cs.AI)

Subjects: Artificial Intelligence (cs.AI)