AutoRAGBench: A Benchmark for LLM Agents Automating RAG System Development

Hang Zhang, Yuzhi Pan, Ziyao Zhong, Chaokun Wang, Shuo Cao, Zeyu Huang, Yue Xue, Fang Niu, Bofan Xie, Guanchen Ge, Zecheng Li, Leqi Zheng, Ziyang Liu, Wei Wang, Miao GuarXiv 2026 · arXiv

TL;DR

AutoRAGBench is the first benchmark designed to evaluate how well LLM agents can autonomously build and refine Retrieval-Augmented Generation (RAG) systems from scratch in an open code space. The study reveals that top-tier agents, such as GPT-6.1 Sol, can significantly outperform human-designed baselines and existing automated frameworks by iteratively optimizing their code and retrieval strategies within a fixed time and compute budget.

What Problem Does This Paper Address?

While Retrieval-Augmented Generation (RAG) is a standard technique for grounding LLMs in external data, building an effective RAG system is notoriously difficult. It requires a series of bespoke engineering choices—how to chunk documents, which embedding model to use, how to handle multi-hop queries, and how to rerank results—that vary wildly across different domains (e.g., medical vs. legal).

Currently, "automated RAG" tools typically search through a narrow, predefined set of configurations. This paper asks a more ambitious question: Can an LLM agent act like a human software engineer? Can it analyze a new corpus, write custom Python code, run experiments, and refine its design autonomously? To answer this, the authors created AutoRAGBench to measure both the quality of the final system and the efficiency of the agent's development process.

Fig. 1. Building a RAG assistant for internal documents. Developers spend considerable time and effort implementing, testing, and refining RAG methods, whereas an LLM agent can efficiently refine the system over successive iterations.

Methods

The authors provide agents with a "Build Phase": six hours, one NVIDIA H800 GPU, and a clean, isolated Debian container. Agents are given task instructions and training data but no starter code. They must:

  1. Analyze the corpus and question types.
  2. Implement a RAG pipeline (writing code, installing libraries, downloading auxiliary models).
  3. Test and Iterate based on experimental feedback from a local validation set.

The evaluation framework is unique because it separates the retriever (built by the agent) from the reader (the model that answers the question). To ensure the results are robust, the final retrieved evidence is fed into five different held-out "answering models" (readers) that the agent never saw during development. The authors also audit the "development trajectories" to see how agents allocated their time between preparation, coding, and analysis.

Datasets

AutoRAGBench comprises nine tasks across five distinct categories to ensure a comprehensive evaluation:

  • Open-domain QA: NQ-open.
  • Document-based multi-hop QA: HotpotQA, MuSiQue, and MH-RAG.
  • Domain-specific QA: PubMedQA (medicine) and QASPER (NLP papers).
  • Fact Verification: FEVER.
  • Knowledge-graph QA: WebQSP and CWQ.
The task suite covers a diverse range of records and evaluation metrics.

Key Insights and Ideas

  • Task-Specific Ingenuity: Agents didn't just apply a generic "vector search" to everything. For Knowledge Graph tasks, they implemented graph traversal logic. For multi-hop tasks like HotpotQA, they developed "title-bridge" expansion and custom passage-pair scorers.
  • The Power of Iteration: Iteration is critical. 93.5% of the builds improved over their first version, with a median gain of 5.5 points. However, the authors noted that larger gains on the validation set didn't always translate to better performance on hidden test data, suggesting a risk of "overfitting" to the development questions.
  • Improving on Humans: In a fascinating experiment, agents were given the code for existing human-designed SOTA systems (like HippoRAG or LightRAG) and asked to improve them. GPT-6.1 Sol improved these systems by an average of 16.6 points while keeping their core mechanisms intact.
  • The Latency-Accuracy Trade-off: There is a clear Pareto frontier. More accurate systems generally involve more complex "multi-step" retrieval or heavy reranking, which increases latency. Top agents were better at finding the "sweet spot" on this frontier.

Key Results

The main results show a clear hierarchy in agent performance, with the best agents comfortably surpassing human-designed baselines.

  • Top Performer: GPT-6.1 Sol (with Codex CLI) achieved the highest average score of 56.1.
  • Beating the Baseline: This top agent outperformed the Reference RAG (46.4) and a composite Human-SOTA baseline (44.4) by significant margins.
  • Agent vs. Framework: The agents outperformed specialized automated RAG frameworks like Agentic AutoRAG and FlashRAG, largely because the agents could write custom code for things like graph traversal that weren't in the frameworks' predefined search spaces.
Main results across nine tasks, showing GPT-6.1 Sol leading the rankings.

Limitations and Future Work

The authors identify several areas for further exploration:

  • Compute/Time Constraints: The six-hour limit and single GPU might prevent agents from building extremely large-scale indices or training massive rerankers.
  • Reader Model Size: The evaluation used relatively small answering models (3B-4B parameters). It is unclear if the rankings would shift if much larger models (e.g., 70B+) were used as readers.
  • Scope: The current benchmark is limited to text-based RAG. Future versions could include multimodal data (images, tables) and more complex development scenarios.
  • Overfitting: As mentioned, some agents showed a tendency to optimize for the specific validation questions provided, which didn't always help with general test performance.

Summary updated

Abstract

Retrieval-augmented generation (RAG) is a well-established paradigm for augmenting large language models (LLMs) with information retrieved from external corpora. However, developing effective RAG systems requires substantial engineering effort and iterative experimentation, as effective design choices vary across tasks and domains. With rapid advances in LLM agent capabilities, we ask how well these agents can autonomously build RAG systems and how effectively they can improve them through iteration. In this paper, we propose AutoRAGBench, the first benchmark to evaluate how well LLM agents develop RAG systems from scratch in an open code space. It comprises nine RAG system development tasks. For each task, agents build RAG systems from scratch without starter code or prescribed strategies, under a six-hour budget on a single H800 GPU. They analyze task data, implement RAG pipelines, and iteratively refine their designs based on experimental feedback. We evaluate nine agent configurations and analyze both the effectiveness of the resulting RAG systems and their development trajectories. GPT-6.1 Sol with Codex CLI achieves the highest average score of 56.1. The composite Human-SOTA baseline averages 44.4. These results show that LLM agents can automate effective RAG system development. When starting from a human-designed system on each of seven tasks, GPT-6.1 Sol with Codex CLI improves the score by 16.6 points on average.
BibTeX
@misc{zhang2026autoragbench,
  author = {Hang Zhang and Yuzhi Pan and Ziyao Zhong and Chaokun Wang and Shuo Cao and Zeyu Huang and Yue Xue and Fang Niu and Bofan Xie and Guanchen Ge and Zecheng Li and Leqi Zheng and Ziyang Liu and Wei Wang and Miao Gu},
  title = {{AutoRAGBench: A Benchmark for LLM Agents Automating RAG System Development}},
  year = {2026},
  eprint = {2611.25582},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.25582},
}
Figure