为LLM代理强制执行时间约束
Enforcing Temporal Constraints for LLM Agents
AI总结:
Agent-C通过运行时保证确保LLM代理遵守时间安全属性,提高任务实用性并实现完美安全性。
摘要:
基于LLM的代理被应用于安全关键性应用,但当前的防护系统无法防止违反时间安全政策的违规行为,这些政策规定了代理行为的顺序和序列。例如,代理可能在用户认证之前访问敏感数据或处理未经授权的支付方法的退款,这些违规行为需要对动作序列进行推理,而不仅仅是单个动作。现有的防护措施依赖于不精确的自然语言指令或事后监控,并无法提供正式保证,确保代理满足时间约束。我们提出了Agent-C,一种新的框架,提供运行时保证,确保LLM代理遵守正式的时间安全属性。Agent-C引入了一种领域特定的语言来表达时间属性(例如,认证在访问数据之前),将规范转换为一阶逻辑,并使用SMT求解来在生成令牌期间检测不合规的代理行为。当LLM尝试生成非合规的工具调用时,Agent-C利用受限制的生成技术来确保LLM生成的每个行为都符合规范,并生成一个符合规范的替代行为以替代非合规的代理行为。我们评估了Agent-C在两个真实世界应用中的表现:零售客户服务和航空公司票务系统,并对多种语言模型(开源和闭源)进行了评估。我们的结果表明,Agent-C实现了完美的安全性(100%符合,0%危害),同时比最先进的防护措施和无限制的代理提高了任务实用性。在SoTA闭源模型上,Agent-C提高了符合性(Claude Sonnet 4.5从77.4%提高到100%,GPT-5从83.7%提高到100%),同时同时提高了实用性(71.8%到75.2%和66.1%到70.6%),代表了可靠代理推理的新SoTA前沿。
英文摘要:
LLM-based agents are deployed in safety-critical applications, yet current guardrail systems fail to prevent violations of temporal safety policies, requirements that govern the ordering and sequencing of agent actions. For instance, agents may access sensitive data before authenticating users or process refunds to unauthorized payment methods, violations that require reasoning about sequences of action rather than an individual action. Existing guardrails rely on imprecise natural language instructions or post-hoc monitoring, and provide no formal guarantees that agents will satisfy temporal constraints. We present Agent-C, a novel framework that provides run-time guarantees ensuring LLM agents adhere to formal temporal safety properties. Agent-C introduces a domain-specific language for expressing temporal properties (e.g., authenticate before accessing data), translates specifications to first-order logic, and uses SMT solving to detect non-compliant agent actions during token generation. When the LLM attempts to generate a non-compliant tool call, Agent-C leverages constrained generation techniques to ensure that every action generated by the LLM complies with the specification, and to generate a compliant alternative to a non-compliant agent action. We evaluate Agent-C across two real-world applications: retail customer service and airline ticket reservation system, and multiple language models (open and closed-source). Our results demonstrate that Agent-C achieves perfect safety (100% conformance, 0% harm), while improving task utility compared to state-of-the-art guardrails and unrestricted agents. On SoTA closed-source models, Agent-C improves conformance (77.4% to 100% for Claude Sonnet 4.5 and 83.7% to 100% for GPT-5), while simultaneously increasing utility (71.8% to 75.2% and 66.1% to 70.6%, respectively), representing a new SoTA frontier for reliable agentic reasoning.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。