RAG-TESTER: Automated End-to-End Testing of Retrieval-Augmented Large Language Models
Ange Maiztegi, Jon Ayerdi, Miren Illarramendi, Aitor Arrieta
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.
Create a lesson
Metadata
- Categories
- cs.AI, cs.SE
Related papers
Confidence scores for gated automation of large language models
Shared title terminologycs.AILuiz G. A. Alves, Aaron Vermeersch
RareLens: Towards End-to-End Rare Disease Care via Aligning Divergent Large Language Model Reasoning
Shared title terminologycs.AIXi Chen, Hongru Zhou, Shiyu Feng et al.
Stress-testing large language model agents in a robotic chemistry laboratory
Shared title terminologycs.AILulu Guo, Yingkai Sun, Xiaobo Li et al.
Did the Model Forecast It, or Already Know It? Evaluating Large Language Models for Novel Drug-Target Prioritisation with a Temporal Knowledge-Graph Oracle
Shared title terminologycs.AIPui Chung Siu, Yuan Liang, Claudia Cabrera et al.
The Disruptive Impact of Large Language Models on Capture the Flag Competitions and the Path Toward Fair Play
Shared title terminologycs.AIMichael Macaulay, Harmony Bouabid, Guo Gen Ang et al.
Real-time Spatial Retrieval Augmented Generation for Urban Environments
Shared title terminologycs.AIDavid Nazareno Campo, Javier Conde, Álvaro Alonso et al.