PrefixGuard: 从LLM-代理轨迹到在线故障预警监控
PrefixGuard: Online Failure Warning and Trace-Grounded Diagnosis for LLM Agents
AI总结:
PrefixGuard通过离线StepView诱导和监督学习训练监控器,有效提升异构轨迹上的在线故障预警性能,实现0.900/0.710/0.533/0.557 AUPRC的高精度预警。
摘要:
大型语言模型(LLM)代理现在执行长工具使用任务,最终结果检查往往太晚进行干预。在线预警需要轻量级的前缀监控器,但手动编写事件模式易碎且部署时LLM判断成本高。我们引入PrefixGuard,一个轨迹到监控器的框架,包含离线StepView诱导步骤后接监督监控器训练。StepView从原始轨迹样本中诱导确定性类型步骤适配器,监控器从终端结果学习事件抽象和前缀风险评分器。在WebArena、τ²-Bench、SkillsBench和TerminalBench上,最强的PrefixGuard监控器达到0.900/0.710/0.533/0.557 AUPRC。使用每个表示的最强后端,它们在原始文本控制上平均提高+0.137 AUPRC。LLM判断在相同前缀预警协议下仍明显较弱。我们还推导出一个可观察性上限,该上限将基于面积下精度-召回曲线(AUPRC)的分数分离监控器错误与缺乏证据的失败。对于有限状态审计,事后确定性有限状态自动机(DFA)提取在WebArena和τ²-Bench上仍紧凑(29和20个状态),但在SkillsBench和TerminalBench上扩展到151和187个状态。最后,首次警报诊断显示,强大的排名不意味着部署实用性:WebArena排名良好但无法支持低误报警报,而τ²-Bench和TerminalBench保留更多可操作的早期警报。这些结果使PrefixGuard成为具有明确诊断的实用监控器合成配方,当前缀警告转化为可操作干预时。
英文摘要:
Large language model (LLM) agents execute multi-step tasks, but terminal verdicts arrive too late for intervention. Agent traces mix messages, tool calls, and feedback, making it difficult to learn failure signals from terminal outcomes. Even if a model learns to predict failure from execution prefixes, its predictions alone cannot show which actions, feedback, or unmet conditions need inspection. Existing work studies online failure prediction and diagnosis from completed trajectories, yet few methods connect timely warning to a compact symbolic model of execution behavior. We introduce \textbf{PrefixGuard}, a neuro-symbolic method that uses learned events to connect online failure warning with finite-state execution diagnosis. A gated recurrent unit (GRU) predicts horizon-specific failure risk from these events. A deterministic finite automaton (DFA) organizes their histories into compact risk-labeled paths for replay and rule-monitor composition. Across all 24 benchmark--horizon settings, PrefixGuard exceeds the strongest evaluated baseline in mean test area under the precision--recall curve (AUPRC). Average gains range from 12.0 to 21.9 percentage points. At a nominal 10\% FAR budget, averaged test recall spans 56.1\%--93.0\% across benchmarks. On one frozen $τ^2$-Bench DFA, model checking five specifications identifies violations in 21 of 265 benchmark-successful runs.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。