TAI3: Testing Agent Integrity in Interpreting User Intent

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Feng, Shiwei, Xu, Xiangzhe, Chen, Xuan, Zhang, Kaiyuan, Ahmed, Syed Yusuf, Su, Zian, Zheng, Mingwei, Zhang, Xiangyu
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866915573238071296
author Feng, Shiwei
Xu, Xiangzhe
Chen, Xuan
Zhang, Kaiyuan
Ahmed, Syed Yusuf
Su, Zian
Zheng, Mingwei
Zhang, Xiangyu
author_facet Feng, Shiwei
Xu, Xiangzhe
Chen, Xuan
Zhang, Kaiyuan
Ahmed, Syed Yusuf
Su, Zian
Zheng, Mingwei
Zhang, Xiangyu
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2506_07524
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle TAI3: Testing Agent Integrity in Interpreting User Intent
Feng, Shiwei
Xu, Xiangzhe
Chen, Xuan
Zhang, Kaiyuan
Ahmed, Syed Yusuf
Su, Zian
Zheng, Mingwei
Zhang, Xiangyu
Software Engineering
Artificial Intelligence
Computers and Society
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.
title TAI3: Testing Agent Integrity in Interpreting User Intent
topic Software Engineering
Artificial Intelligence
Computers and Society
url https://arxiv.org/abs/2506.07524