客户服务域中遵守策略的工具调用代理必须在调用工具并遵守域策略的同时保持轮流任务状态。任务状态由相关事实,标识符,约束,以及通过用户交互和工具调用观察到的条件组成。在标准代理中,, 任务状态不会单独表示。观察, 工具返回,,并且策略指令被放置在提示, 中,让代理在每次决定下一步做什么时根据提示重建相关状态。此设计使状态管理隐式, 创建两种常见的故障模式。代理可能检索到正确的事实,但随后将其决策基于陈旧,、缺失, 或不正确的信息;,并且语法上有效的工具调用仍可能违反取决于当前任务状态的域策略。我们引入了 \textsc{LedgerAgent}, ,这是一种用于工具调用代理的推理时间方法,该方法在单独的分类帐中维护观察到的任务状态并将状态呈现到提示中。分类帐还用于在执行环境更改工具调用之前检查与状态相关的策略约束, 阻止策略违规。在四个客户服务领域以及开放式和封闭式权重模型的混合面板, \textsc{LedgerAgent} 中,与基于标准提示的工具调用方法, 相比,平均通过率\textasciicircum{}k 得到了提高,在更严格的多试验一致性指标下收益最大。
Policy-adherent tool-calling agents in customer-service domains must maintain task states across turns while calling tools and obeying domain policies. Task states consist of relevant facts, identifiers, constraints, and conditions observed through user interaction and tool calls. In standard agents, task states are not represented separately. Observations, tool returns, and policy instructions are placed in the prompt, leaving agents to reconstruct the relevant states from the prompt each time they decide what to do next. This design makes state management implicit, creating two common failure modes. An agent may retrieve the right facts but later ground its decision in stale, missing, or incorrect information; and a syntactically valid tool call may still violate a domain policy that depends on the current task state. We introduce \textsc{LedgerAgent}, an inference-time method for tool-calling agents that maintains observed task states in a separate ledger and renders the states into the prompt. The ledger is also used to check state-dependent policy constraints before environment-changing tool calls are executed, blocking policy violations. Across four customer-service domains and a mixed panel of open- and closed-weight models, \textsc{LedgerAgent} improves average pass\textasciicircum{}k over a standard prompt-based tool-calling approach, with the largest gains under stricter multi-trial consistency metrics.
科目: 人工智能 (cs.AI); 计算和语言 (cs.CL)
Subjects: Artificial Intelligence (cs.AI); Computation and Language (cs.CL)