Diversity-Guided Search-Based Testing of Large Language Model Applications
Lev Sorokin, Ivan Vasilev, Ken E. Friedl, Andrea Stocco
Key points
From the paper's conclusion- Introduced a search-based testing framework for LLM-based applications that incorporates failure diversity as an explicit optimization objective, with discretization along stylistic, content-related, and perturbation dimensions.
- Guided variants detected substantially more failures than random and combinatorial search in nearly all configurations, with diversified search covering a broader range of failure types and greedy repopulation offering the best tradeoff.
- The search-based testing framework with failure diversity effectively detects more failures and covers a broader range of failure types compared to random and combinatorial search.
Abstract
Large Language Model (LLM)-based applications are increasingly deployed across domains including customer service, education, and mobility. These systems are prone to inaccurate, fictitious, or harmful responses, and their vast, high-dimensional input space makes systematic testing particularly challenging. In this paper, we present a search-based testing framework for LLM-based applications that incorporates failure diversity as an explicit optimization objective. Building on a discretization along stylistic, content-related, and perturbation dimensions, our framework maintains an archive of generated tests and rewards distance from that archive, while a repopulation operator periodically replaces non-failing tests in the population to sustain exploration. The repopulation operator is parameterized by its sampling strategy: replacement candidates are drawn either uniformly or by greedy distance maximization, two settings we compare empirically. We evaluate both against several baselines across three case studies---LLM safety, in-car navigation, and in-vehicle function control---covering five systems under test, eight LLMs, and 18 distinct test configurations, with over one million executed tests. Our results show that all guided variants detect substantially more failures than random and combinatorial search in nearly all configurations. Among them, diversified search detects fewer failures, but covers a broader range of failure types in all case studies, with greedy repopulation offering the best tradeoff.
Read the paper
Discussion · 1
Science Skim's AI key points, plus readers' public thoughts
- Introduced a search-based testing framework for LLM-based applications that incorporates failure diversity as an explicit optimization objective, with discretization along stylistic, content-related, and perturbation dimensions.
- Guided variants detected substantially more failures than random and combinatorial search in nearly all configurations, with diversified search covering a broader range of failure types and greedy repopulation offering the best tradeoff.
- The search-based testing framework with failure diversity effectively detects more failures and covers a broader range of failure types compared to random and combinatorial search.
Readers' thoughts
No reader thoughts yet.
Related papers
- Challenges in Testing Large Language Model Based Software: A Faceted TaxonomyACM Transactions on Software Engineering and Methodology · 2026
- On the Role of Large Language Models in Robustness-Guided Requirement FalsificationProceedings of the ACM on Software Engineering · 2026
- AgentTester: Improve Coverage in Automated Test Generation With Multi‐Agent as OptimizerSoftware Testing, Verification and Reliability · 2026
- Towards Practical Automata-Based Steering of Large Language Models for Diverse Structured GenerationFormal Aspects of Computing · 2026
- Automated adversarial red-teaming for evaluating robustness in LLM-based recommender systems.Discover artificial intelligence · 2026
- EMBERS: Empirically Motivated Robustness Testing of Deep Research Systems via Defect-Guided FuzzingarXiv · 2026