arXiv:2607.02599cs.SEcs.AI2026-07被引 3

用逻辑语言衡量和训练大模型用工具时的流程合规性

AgentLTL: A Trace-Verification Framework for Measuring, Enforcing, and Training Procedural Compliance in Tool-Using LLM Agents

论文配图:AgentLTL: A Trace-Verification Framework for Measuring, Enforcing, and Training Procedural Compliance in Tool-Using LLM Agents
图 1 · 摘自论文原文
  • 用一阶线性时序逻辑定义流程规则,自动检验执行过程
  • 在线拦截违规操作,微调时作为密集奖励提升合规率38%
  • 适合安全关键场景中对工具使用流程有严格要求的研究者

使用工具的大型语言模型代理通常通过最终答案正确性或模型评判进行评估,但均无法捕捉答案生成过程。在安全关键场景中,流程本身即为正确性的组成部分。本文提出AgentLTL,一种源自一阶线性时序逻辑(FO-LTL)的语言,用于表达对代理轨迹的流程规则。该框架生成确定性、无需裁判的合规评分。单一规范可支持两种用途:其一是“约束”——对已完成轨迹评分,或在线检查每个前缀以在执行前拦截工具调用;其二是微调——评分作为密集奖励。在涵盖顺序、分支、循环和归因的基准测试中,块-警告约束使七种模型中的五种合规性提升。使用相同奖励微调后,在保留模式上的准确率与合规率分别提升+38%和+17.5%,包括未见过的工具名别名。结果表明模型学习的是程序结构而非表面命名与流程。

原文摘要 · Abstract (English)

Tool-using LLM agents are usually evaluated by final-answer correctness or LLM judges. Neither captures how an answer was produced. In safety-critical settings, the procedure itself is part of correctness. In this paper, we introduce AgentLTL, a language derived from First-Order Linear Temporal Logic (FO-LTL) that expresses procedural rules over agent traces. It yields a deterministic, judge-free compliance score. In this framework, a single specification drives two usages. The first is harnessing: the constraints score completed traces, or gate tool calls by checking each prefix online, before execution. The second is finetuning: the score serves as a dense reward. On a benchmark spanning ordering, branching, iteration, and grounding, block-and-warn harnessing improves compliance on five of seven models. Finetuning with the same reward yields +38 and +17.5 percentage point gains in accuracy and compliance on held-out patterns, including unseen tool-name aliases. These findings are consistent with the model acquiring procedural structure rather than memorizing surface tool names and procedures.

流程合规LLM代理形式化验证强化学习

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。