[Paper Review] STELLAR: A Search-Based Testing Framework for Large Language Model Applications
STELLAR automates test input generation for LLM-based apps using evolutionary search over discretized feature spaces (content, style, perturbation) to uncover faulty or unsafe responses, outperforming baselines like random search and ASTRAL across safety and navigation use cases.
Large Language Model (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.
Motivation & Objective
- Motivate robust testing of LLM-based applications beyond static benchmarks and manual prompt tuning.
- Discretize natural language inputs into content, style, and perturbation features to manage high-dimensional input spaces.
- Develop an automated, evolutionary search framework to uncover failure-inducing inputs.
- Evaluate STELLAR on safety-focused and navigation-oriented LLM systems and compare against baselines.
Proposed method
- Model the test generation as a search-based optimization problem with a fitness-driven objective.
- Discretize input space into features F = {F_S (style), F_C (content), F_P (perturbation)} with domain constraints C_F.
- Encode feature vectors for optimization and apply constraint handling prior to test generation.
- Generate executable test inputs by instantiating a domain-specific prompt and using retrieval-augmented generation (RAG).
- Evaluate test inputs with a possibly multi-objective fitness function and an oracle to identify failures.
- Employ genetic operators (tournament selection, SBX crossover for ordinal features, uniform/mutation for categorical features) and NSGA-II for survival.

Experimental results
Research questions
- RQ1RQ0: How accurate are LLM-based judges in evaluating test pass/fail outcomes?
- RQ2RQ1: How effective is STELLAR in identifying failures of LLM applications?
- RQ3RQ2: How diverse are the generated failures?
Key findings
- STELLAR exposes up to 4.3× (average 2.5×) more failures than baseline approaches.
- Across SafeQA and NaviQA, STELLAR consistently finds more failing inputs than random search, combinatorial, and coverage-based baselines like ASTRAL.
- A judge based on LLM evaluation achieves binary F1 scores up to 0.79 and continuous F1 around 0.79 for SafeQA, with NaviQA results in the 0.65–0.73 range for binary F1.
- Diversity analysis via clustering indicates meaningful coverage of failure types across approaches.
- The study demonstrates STELLAR’s effectiveness across a safety-focused case and two navigation-oriented, retrieval-augmented systems (open-source and industrial).
- The framework integrates a domain-specific prompt template, RAG retrieval, and an evolutionary search that balances exploration and exploitation.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.