Skip to content
Preprint

RAG-TESTER: Automated End-to-End Testing of Retrieval-Augmented Large Language Models

Jul 2026 · 0 citations · 54 references
Computer Science

TL;DR

RagTester is presented, an automated end-to-end testing approach for RAG systems that can effectively expose failures caused by the interaction between retrieval and generation components and support the assessment of RAG configurations before deployment.

Abstract

Retrieval-Augmented Generation (RAG) enables Large Language Models (LLMs) to use external and domain-specific knowledge, but its reliability depends on the interaction between the generative model, embedding model, retrieval mechanism, and prompt construction strategy. We present RagTester, an automated end-to-end testing approach for RAG systems. RagTester generates retrieval documents, test inputs, and expected outputs; executes the tests; and evaluates the resulting answers using an LLM as a judge. Its test-generation strategy targets complex passages, unsupported queries, and document-coverage criteria. We evaluate RagTester using eight LLMs and six embedding models, yielding 24 compatible configurations, and compare it with a baseline test-input generator. Across 72,000 test executions, RagTester detected 21,633 failures, 6.6% more than the baseline, and outperformed it in 20 of the 24 configurations. The detected failures include inaccurate retrieval, unsupported answers, incomplete use of retrieved context, and difficulties interpreting complex passages. These results show that coverage-oriented test generation can effectively expose failures caused by the interaction between retrieval and generation components and support the assessment of RAG configurations before deployment.

View source

Similar papers

Jul 2026

Testing Retrieval-Augmented Generation Systems with Chunk Coverage

Chunk Coverage (CC), an oracle-independent test adequacy criterion for testing the retrieval component of RAG systems, is introduced and results show that CC captures retrieval diversity relevant to effective testing without requiring test oracles.

Jinhan Kim, Samuele Pasini, Paolo Tonella · 1 citation
Aug 2026

RAG-test: a framework to evaluate RAG chatbot performance and measure productivity gains

This paper proposes RAG-Test, a developer-centric and unified framework that automates test case generation, attribution validation, and productivity estimation and introduces a theoretical productivity gains model, estimating chatbot efficiency improvements over search engines.

Shashank Parmar · 0 citations
#software testing Preprint Aug 2026

XREPOTEST: Benchmarking Multilingual Repository-Level Unit Test Generation for Large Language Models

XREPOTEST is introduced, a multilingual repository-level benchmark for unit test generation spanning five underexplored languages: Rust, Go, Julia, PHP, and Ruby, and Invocation Rate is proposed to assess whether generated tests meaningfully exercise the intended functionality.

L. Dung, Dong Cao Van, Nam Le Hai et al. · 0 citations
Open access Aug 2026

Optimizing Context and Cost in LLM ‐Based Unit Test Generation: A Study on External Dependency Retrieval Strategies

A systematic empirical study of multiple strategies for context enrichment and optimization in LLM‐based unit test generation, conducted on seven diverse projects (three open‐source and four proprietary industrial systems), encompassing 261 distinct methods establish this optimized context strategy as a cost‐effective solution for scalable, industrial‐grade automated test generation.

Javier Ferrer, Francisco Chicano · 0 citations
Jul 2026

When Knowledge Changes: Metamorphic Testing of RAG Systems with Mutations

This work introduces a metamorphic testing framework that evaluates the consistency of RAG systems under corpus evolution, formalising a fault taxonomy and 11 mutation operators that systematically perturb the system at both the pre-chunk (retrieval index) and post-chunk (retrieved context) levels.

Jinhan Kim, Samuele Pasini, Paolo Tonella · 1 citation

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.