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.
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:
- Analyze the corpus and question types.
- Implement a RAG pipeline (writing code, installing libraries, downloading auxiliary models).
- 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.
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.
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