arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2506.07524cs.SEcs.AIcs.CY
收藏

TAI3:测试智能体在理解用户意图方面的完整性

TAI3: Testing Agent Integrity in Interpreting User Intent

Purdue University(普渡大学)

Shiwei Feng, Xiangzhe Xu, Xuan Chen, Kaiyuan Zhang, Syed Yusuf Ahmed, Zian Su, Mingwei Zheng, Xiangyu Zhang

AI总结:

TAI3是一个以API为中心的压测框架,通过语义分区和变异生成测试,有效揭示LLM智能体在理解用户意图时的完整性违规,显著提升错误暴露率和查询效率。

摘要:

LLM智能体越来越多地被部署来自动化现实世界任务,通过自然语言指令调用API。尽管功能强大,但它们常常因误解用户意图而出现问题,导致智能体的行为偏离用户预期目标,尤其是在外部工具包不断演进的情况下。传统软件测试假设结构化输入,因此在处理自然语言的模糊性方面存在不足。我们提出了TAI3,一个以API为中心的压测框架,系统性地揭示LLM智能体中的意图完整性违规。与以往专注于固定基准或对抗性输入的工作不同,TAI3基于工具包文档生成现实任务,并应用有针对性的变异来暴露细微的智能体错误,同时保持用户意图不变。为了指导测试,我们提出了语义分区,根据工具包API参数及其等价类将自然语言任务组织成有意义的类别。在每个分区内,种子任务被变异,并由一个轻量级预测器排序,该预测器估计触发智能体错误的可能性。为了提高效率,TAI3维护一个数据类型感知的策略记忆,从过去的案例中检索并调整有效的变异模式。在80个工具包API上的实验表明,TAI3有效揭示意图完整性违规,在错误暴露率和查询效率方面显著优于基线。此外,TAI3使用较小的LLM进行测试生成,能很好地泛化到更强的目标模型,并适应跨领域的演进API。

英文摘要:

LLM agents are increasingly deployed to automate real-world tasks by invoking APIs through natural language instructions. While powerful, they often suffer from misinterpretation of user intent, leading to the agent's actions that diverge from the user's intended goal, especially as external toolkits evolve. Traditional software testing assumes structured inputs and thus falls short in handling the ambiguity of natural language. We introduce TAI3, an API-centric stress testing framework that systematically uncovers intent integrity violations in LLM agents. Unlike prior work focused on fixed benchmarks or adversarial inputs, TAI3 generates realistic tasks based on toolkits' documentation and applies targeted mutations to expose subtle agent errors while preserving user intent. To guide testing, we propose semantic partitioning, which organizes natural language tasks into meaningful categories based on toolkit API parameters and their equivalence classes. Within each partition, seed tasks are mutated and ranked by a lightweight predictor that estimates the likelihood of triggering agent errors. To enhance efficiency, TAI3 maintains a datatype-aware strategy memory that retrieves and adapts effective mutation patterns from past cases. Experiments on 80 toolkit APIs demonstrate that TAI3 effectively uncovers intent integrity violations, significantly outperforming baselines in both error-exposing rate and query efficiency. Moreover, TAI3 generalizes well to stronger target models using smaller LLMs for test generation, and adapts to evolving APIs across domains.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑