paperbot · PL 论文追踪

全部论文 待读 收藏

RefineAct: Automatic Runtime Verification of LLM Agent Actions

RefineAct:LLM 智能体动作的自动运行时验证
ASE Proceedings of the 41st IEEE/ACM International Conference on Automated Software Engineering2026引用 1 inbox
Fraol Batole, Foutse Khomh, Hridesh Rajan
crossref: 2026-10-09

AI 速览

一句话:从自然语言指令自动推导 Prolog 规约并在运行时拦截智能体动作,将失败率从 77% 降至 39%。

LLM 智能体在调用外部工具时可能偏离用户意图,造成删除关键文件、泄露隐私或执行不可信代码等不可逆伤害。与传统软件不同,智能体缺乏可据以在执行前检查行为的规约,现有防护依赖提示工程或事后评估,无法填补这一缺口。本文提出 RefineAct,一个运行时验证框架,自动从用户自然语言指令中推导任务特定规约并在执行过程中强制执行。它分三阶段工作:意图形式化将指令翻译为捕获用户目标与安全需求的一阶 Prolog 谓词;基于精化的规划将规约分解为带前后条件链与风险动作模式的具体动作计划;运行时验证拦截智能体提议的每个动作,查询 Prolog 知识库以验证前置条件满足与约束遵从,并返回决定动作继续、需用户确认或被阻止并附纠正反馈的处置状态。在 ToolEmu 基准五个领域的 144 个智能体任务上,RefineAct 将失败发生率从 77% 降至 39%,同时将任务完成质量从 1.0 提升至 1.9(0–3 量表),表明在运行时推导并执行规约可同时提升 LLM 智能体行为的安全性与有用性。

问题
LLM 智能体调用外部工具时缺乏可供执行前检查的规约,现有提示工程或事后评估无法防止偏离用户意图的不可逆伤害。
方法
RefineAct 自动将自然语言指令形式化为 Prolog 谓词,经基于精化的规划生成带前后条件与风险模式的动作计划,并在运行时拦截每个动作、查询知识库验证约束,决定继续、确认或阻止并给出纠正反馈。
评估
在 ToolEmu 基准五个领域的 144 个智能体任务上评估,失败发生率从 77% 降至 39%,任务完成质量从 1.0 提升至 1.9(0–3 量表)。
原文摘要(Abstract)

LLM-based agents that invoke external tools can cause irreversible harm when their actions diverge from user intent, from deleting critical files to exposing private data or executing untrusted code. Unlike traditional software, where test suites and contracts define expected behavior, LLM agents operate without a specification: there is no artifact against which to check their actions before execution. Existing safeguards rely on prompt engineering or post-hoc evaluation, neither of which closes this gap. We present RefineAct, a runtime verification framework that automatically derives a task-specific specification from the user’s natural-language instruction and enforces it during agent execution. RefineAct operates in three stages: (1) intent formalization translates instructions into first-order Prolog predicates capturing the user’s goal and safety requirements; (2) refinement-based planning decomposes the specification into a concrete action plan with pre-/postcondition chains and risky-action patterns; and (3) runtime verification intercepts each agent-proposed action, queries the Prolog knowledge base to verify precondition satisfaction and constraint compliance, and returns a disposition state that determines whether the action proceeds, requires user confirmation, or is blocked with corrective feedback. We evaluate RefineAct on 144 agent tasks across five domains from the ToolEmu benchmark. RefineAct reduces failure incidence from 77% to 39% while improving task completion quality from 1.0 to 1.9 on a 0–3 scale, demonstrating that deriving and enforcing specifications at runtime can improve both safety and helpfulness of LLM agent behavior.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@inproceedings{paperbot12229,
  title = {RefineAct: Automatic Runtime Verification of LLM Agent Actions},
  author = {Fraol Batole and Foutse Khomh and Hridesh Rajan},
  booktitle = {ASE},
  year = {2026},
  doi = {10.1145/3832783.3834409}
}