Papers
Topics
Authors
Recent
Search
2000 character limit reached

STELLAR: A Search-Based Testing Framework for Large Language Model Applications

Published 1 Jan 2026 in cs.SE | (2601.00497v2)

Abstract: LLM-based applications are increasingly deployed across various domains, including customer service, education, and mobility. However, these systems are prone to inaccurate, fictitious, or harmful responses, and their vast, high-dimensional input space makes systematic testing particularly challenging. To address this, we present STELLAR, an automated search-based testing framework for LLM-based applications that systematically uncovers text inputs leading to inappropriate system responses. Our framework models test generation as an optimization problem and discretizes the input space into stylistic, content-related, and perturbation features. Unlike prior work that focuses on prompt optimization or coverage heuristics, our work employs evolutionary optimization to dynamically explore feature combinations that are more likely to expose failures. We evaluate STELLAR on three LLM-based conversational question-answering systems. The first focuses on safety, benchmarking both public and proprietary LLMs against malicious or unsafe prompts. The second and third target navigation, using an open-source and an industrial retrieval-augmented system for in-vehicle venue recommendations. Overall, STELLAR exposes up to 4.3 times (average 2.5 times) more failures than the existing baseline approaches.

Summary

  • The paper introduces STELLAR, which uses evolutionary optimization to systematically uncover failures in LLM systems.
  • It discretizes the input space into stylistic, content, and perturbation features and integrates contextual examples via a RAG approach.
  • Evaluation reveals STELLAR detects failures up to 4.3 times more frequently than baseline methods, enhancing overall LLM robustness.

"STELLAR: A Search-Based Testing Framework for LLM Applications" (2601.00497)

Introduction

"STELLAR: A Search-Based Testing Framework for LLM Applications" discusses the growing deployment of LLM-based systems across diverse domains such as customer service and autonomous driving. These applications face challenges related to their complex input space and potential for generating harmful or fictitious responses. The paper introduces STELLAR, a framework leveraging search-based testing to systematically uncover inappropriate outputs in these models. STELLAR innovatively models test generation as an optimization problem, using evolutionary algorithms to explore feature combinations that can expose system failures.

Approach

Feature Discretization and Test Representation

STELLAR discretizes the high-dimensional input space of LLM applications into stylistic, content-related, and perturbation features, allowing for systematic exploration. This approach contrasts with prior works that focus on prompt optimization or coverage heuristics. By encoding test inputs into numerical vectors, STELLAR facilitates the use of optimization algorithms to control and guide the generation of diverse input combinations.

Test Generation Using Optimization

STELLAR dynamically generates test inputs by integrating feature perturbations into domain-specific prompt templates. It employs a Retrieval-Augmented Generation (RAG) approach to retrieve contextual examples for input refinement. The testing process is represented as an optimization problem where fitness functions guide the search towards failure-inducing test cases, leveraging LLM-based judgments and numerical distance measures to evaluate system responses.

Genetic Optimization Process

Through simulated binary crossover and uniform mutation, STELLAR iteratively refines test inputs, improving the probability of failure discovery. After each optimization cycle, the failure oracle classifies inputs based on fitness scores to identify inappropriate or faulty responses. Figure 1

Figure 1

Figure 1: Results for RQ1RQ_1 in evaluating STELLAR's effectiveness in failure discovery across multiple LLM configurations.

Evaluation

Experimental Setup

STELLAR was evaluated on two use cases: SafeQA for evaluating safety under malicious prompts and NaviQA for in-car venue recommendations. The effectiveness of STELLAR was benchmarked against randomized and combinatorial methods. Across various LLM configurations and frameworks, STELLAR consistently revealed a greater number of failures, demonstrating its superiority over baseline approaches.

Results and Implications

STELLAR exposed failures up to 4.3 times more frequently than existing methodologies, indicating substantial improvements in failure detection and verification. The framework’s ability to uncover diverse failure types suggests practical implications for enhancing LLM robustness and reliability in real-world applications. Figure 2

Figure 2

Figure 2

Figure 2

Figure 2: NaviQA-I test case failures indicating STELLAR's superiority.

Discussion

STELLAR represents a significant advancement in systematic LLM testing by employing evolutionary optimization techniques. It supports failure diversity, essential for debugging and improving model robustness. This paper highlights the framework's scalability and adaptability to complex multi-dimensional input spaces, suggesting paths for future research in extending STELLAR to multi-modal applications and multi-turn dialogue systems.

Conclusion

STELLAR offers an innovative testing paradigm combining discrete feature modeling with evolutionary search. Its proven effectiveness in exposing failures across various LLM-based systems makes it a valuable tool for developers and researchers aiming to enhance application robustness and reliability. Future work will focus on extending these capabilities to accommodate broader input paradigms and conversational dynamics, furthering its applicability across diverse AI domains.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Collections

Sign up for free to add this paper to one or more collections.