RAGMark: A Comprehensive Framework for Benchmarking Retrieval-Augmented Generation Systems

Zlatan Feric, Amir Taherin, Bin Ren, Yanzhi Wang, Jennifer Dy, David KaeliarXiv 2026

TL;DR

RAGMark is a novel, modular benchmarking framework designed to profile advanced Retrieval-Augmented Generation (RAG) systems in multi-GPU environments. By tracking fine-grained, per-stage hardware metrics (like latency, energy, and memory) alongside answer quality, it reveals how upstream pipeline stages interact. Notably, the framework demonstrates that combining document reranking with prompt compression yields compounding system benefits, slashing energy consumption by up to 66% without sacrificing accuracy.

What Problem Does This Paper Address?

While Retrieval-Augmented Generation (RAG) has become the standard pattern for grounding Large Language Models (LLMs) in external knowledge and mitigating hallucinations, modern RAG pipelines have evolved far beyond simple "retrieve-then-generate" architectures. They now incorporate complex intermediate stages like query rewriting, cross-encoder reranking, and prompt compression.

Figure 1. Workflow comparison: standalone LLM vs. RAG. The factually accurate answer is shown in green.

This architectural complexity introduces a massive configuration space. System performance is shaped by a web of moving parts: embedding models, vector database index types, retrieval depths ($top-k$), and generator scales. Prior benchmarking tools either treat RAG as a black-box monolith or focus exclusively on LLM inference. As a result, engineers lack visibility into how choices made early in the pipeline (e.g., index placement or retrieval depth) cascade to impact downstream hardware bottlenecks, memory bandwidth, and energy consumption.

Methods

To bridge this gap, the authors developed RAGMark, a configuration-driven, highly extensible benchmarking framework built for detailed per-query and per-stage profiling.

Figure 2. RAGMark overview. The framework takes configuration inputs (RAG components, database, hardware placement, evaluation datasets), executes one of two pipelines (sequential or iterative) with per-stage profiling, and produces resource, accuracy, and trace outputs for analysis.

Key implementation features include:

  • Modular Architecture: RAG stages are isolated into distinct, plug-and-play Python classes (Embedding, Retriever, Reranker, Compressor, Generator), making it easy to swap components or evaluate both sequential and multi-round iterative RAG pipelines.
  • Efficient Parameter Sweeps: To avoid the massive time overhead of repeatedly rebuilding vector indexes or reloading multi-billion parameter models, RAGMark initializes components once and reuses them across experimental configurations.
  • Unified Measurement Infrastructure: It integrates low-level hardware tracking via the NVIDIA Management Library (NVML) alongside PyTorch memory APIs. This allows it to capture millisecond-scale latency breakdowns (separating Time-to-First-Token [TTFT] from decode time), true GPU memory allocation, streaming multiprocessor (SM) occupancy, and integrated power draw.

Datasets

RAGMark evaluates system performance and accuracy across five classic open-domain QA benchmarks and one multi-hop benchmark:

  • Natural Questions (NQ)
  • TriviaQA
  • SQuAD
  • WebQuestions
  • PopQA
  • HotpotQA (used specifically to test complex, multi-hop reasoning in iterative RAG scenarios)

The external knowledge source used for retrieval is a compressed 2018 English Wikipedia dump, pre-processed into approximately 9.2 million text passages.

Key Insights and Ideas

  • The Compounding Benefit of Reranking + Compression: Intuitively, adding both a reranker and a prompt compressor sounds like adding double the computational overhead. However, RAGMark revealed a compounding benefit: reranking discards irrelevant documents entirely, which drastically shrinks the text input size fed into the compressor. This cuts the compressor's overhead in half while passing an incredibly dense context to the LLM.
  • Bottleneck Shifting: In a naive RAG pipeline, autoregressive token generation completely dominates latency. However, introducing context-reduction techniques shifts the system bottleneck away from compute-bound prefill stages toward memory-bandwidth-bound decode stages, or even back to the preprocessing models themselves.
  • Hardware Placement Inversions: For single-query workloads, hosting an Inverted File Index (IVF) on the CPU actually outperforms a GPU-resident index due to the elimination of GPU launch and data transfer overheads. However, as batch sizes scale up, the GPU's parallel processing power quickly reclaims the advantage.

Key Results

The authors ran extensive case studies using the Llama-3 family (1B, 3B, and 8B models) on an NVIDIA A100 cluster.

Figure 3. Resource utilization trends across four RAG pipeline configurations.
  • Energy Savings: Stacking reranking and prompt compression (Case 4) led to a massive 66% reduction in total GPU energy consumption for the Llama-3-8B model at a retrieval depth of $top-k=10$ compared to the naive baseline.
  • Latency Reductions: Reranking alone slashed Llama-3-8B TTFT by 49% at $top-k=10$ by pulling the prefill stage back into a linear scaling region. Prompt compression via LLMLingua-2 went even further, dropping TTFT by 66% and decode latency by 46%.
  • Preserved Accuracy: Crucially, these dramatic hardware efficiencies came at almost zero cost to model intelligence; across all configurations, downstream ROUGE accuracy scores fluctuated by less than 0.02.

Limitations and Future Work

While RAGMark provides unprecedented granularity, the current version relies on standard Hugging Face interfaces to maximize component compatibility. This means it does not yet reflect the performance profiles of highly optimized, production-grade serving backends like vLLM or TensorRT-LLM (though the authors note that vLLM support is actively under development). Additionally, the framework is currently optimized for small-scale multi-GPU nodes rather than massive, distributed cluster environments.

Summary updated

BibTeX
@misc{feric2026ragmark,
  author = {Zlatan Feric and Amir Taherin and Bin Ren and Yanzhi Wang and Jennifer Dy and David Kaeli},
  title = {{RAGMark: A Comprehensive Framework for Benchmarking Retrieval-Augmented Generation Systems}},
  year = {2026},
  eprint = {2609.05760},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2609.05760},
}
Figure