AgentTrustCI:面向Java大语言模型智能体的构建时策略、 grounding与轨迹测试
AgentTrustCI: Build-Time Policy, Grounding, and Trajectory Tests for Java LLM Agents
AI总结:
提出Java/JUnit 5框架AgentTrustCI,通过策略、grounding、轨迹检查在构建时验证Java LLM智能体行为,在55个合成案例中表现出良好分类能力,为Java发布管道提供行为契约表达模式。
摘要:
基础设施安全无法确定大语言模型(LLM)智能体是否选择了允许的工具、是否将答案基于工具输出、是否遵循了所需工作流。AgentTrustCI是一个Java/JUnit 5框架,它将这些应用层期望表示为对记录轨迹的策略、grounding(基于工具输出)和轨迹检查。确定性重放实现支持可重复的构建时测试;判断器接口为可选语义评估提供扩展点。在涵盖七个企业领域的55个合成案例中,完整流程正确分类了所有30个注入故障和25个通过控制项,包括10个非平凡控制项,且未遗漏12个指定关键案例中的任何一个。由于语料库故意每层隔离10个故障,每个单层配置正确分类了35个案例。通过不允许序列获得的grounded(基于工具输出)答案体现了轨迹检查的额外覆盖范围。重复测量将验证器执行与进程启动和报告分开量化。这些结果确立了所编写回归套件的覆盖范围,而非生产准确性。我们描述了生产轨迹验证协议、可选LLM判断器集成以及随工作流演变的期望维护。该贡献是在现有Java发布管道内表达行为契约的实用模式。
英文摘要:
Infrastructure security does not establish whether an LLM agent selected an allowed tool, grounded its answer in tool output, or followed a required workflow. AgentTrustCI is a Java/JUnit 5 framework that expresses these application-layer expectations as policy, grounding, and trajectory checks over recorded traces. A deterministic replay implementation supports repeatable build-time tests; a judge interface provides an extension point for optional semantic evaluation. On 55 synthetic cases spanning seven enterprise domains, the full pipeline correctly classifies all 30 injected faults and 25 passing controls, including ten non-trivial controls, and misses none of 12 designated critical cases. Each single-layer configuration correctly classifies 35 cases because the corpus deliberately isolates ten faults per layer. A grounded answer obtained through a disallowed sequence illustrates the additional coverage of trajectory checks. Repeated measurements quantify validator execution separately from process startup and reporting. These results establish coverage of the authored regression suite, not production accuracy. We describe a production-trace validation protocol, optional LLM-judge integration, and maintenance of expectations as workflows evolve. The contribution is a practical pattern for expressing behavioral contracts within an existing Java release pipeline.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。