RAGO: Systematic Performance Optimization for Retrieval-Augmented Generation Serving

Wenqi Jiang, Suvinay Subramanian, Cat Graves, Gustavo Alonso, Amir Yazdanbakhsh, Vidushi Dadu

Retrieval-Augmented Generation (RAG) has become a cornerstone for deploying Large Language Models (LLMs) that require up-to-date or private knowledge. By fetching relevant documents to ground model responses, RAG effectively mitigates hallucinations. However, serving these systems at scale is significantly more complex than standard LLM serving. While standard LLMs primarily involve prefix (prompt processing) and decode (token generation) stages, RAG introduces a "zoo" of heterogeneous components—including document encoders, query rewriters, vector search engines, and rerankers—often distributed across diverse hardware like CPUs and GPUs.

The RAGO Framework

To address the hardware and workload heterogeneity of RAG, the authors propose RAGO, a systematic framework for performance optimization. The core of RAGO is RAGSchema, a modular abstraction that defines the "DNA" of a RAG workload, including its pipeline structure and specific attributes like database size and retrieval frequency.

The RAG serving pipeline includes multiple stages beyond standard LLM serving, such as encoding, rewriting, and retrieval.

Using this schema, the RAGO Optimizer performs an exhaustive search over millions of possible schedules to find the "Pareto frontier"—the optimal trade-offs between latency and throughput. The optimizer focuses on three key architectural decisions:

  1. Task Placement: Deciding whether to collocate models on the same chips to share resources or disaggregate them to avoid interference.
  2. Resource Allocation: Determining the exact number of accelerators (XPUs) or CPU servers assigned to each stage.
  3. Batching Policy: Tuning batch sizes for each stage to balance high throughput with low Time-to-First-Token (TTFT).

Key Insights and Workload Characterization

The authors identified several non-obvious bottlenecks through their analysis:

  • The Encoding Bottleneck: In long-context scenarios, the document encoder (often a small ~120M parameter model) can become the primary bottleneck. If under-provisioned, it can starve the much larger LLM by failing to process retrieval indices fast enough.
  • Iterative Stalls: Systems that perform "iterative retrieval" during generation often suffer from idleness. The decoder frequently pauses to wait for search results, leading to a 2.77× degradation in normalized latency if batch sizes are misaligned.
  • Collocation Benefits: Unlike standard LLM serving, RAG often benefits from collocating early stages (rewriter, reranker, and prefix). This allows compute-intensive tasks to share a larger pool of accelerators, significantly reducing TTFT.

Performance Results

RAGO was evaluated using the Llama-3 family (1B to 405B parameters) against a hyperscale database containing 64 billion passages.

Performance Pareto frontiers comparing RAGO-optimized RAG systems against LLM-only baselines.

The framework achieved up to a 2× improvement in throughput (QPS) and a 55% reduction in latency (TTFT) compared to standard LLM-serving extensions. Furthermore, the study demonstrated that an 8B RAG system could outperform a 70B LLM-only system in cost-efficiency (QPS/chip) by a factor of 1.5× while maintaining superior knowledge accuracy.

Conclusion and Future Work

RAGO provides a systematic approach to the complex search space of RAG serving. While the current framework focuses on performance metrics like QPS and TTFT, future iterations could explore dynamic scheduling to adapt to real-time request fluctuations and model the relationship between system performance and generation quality.

Summary updated

BibTeX
@inproceedings{jiang2025rago,
  author = {Wenqi Jiang and Suvinay Subramanian and Cat Graves and Gustavo Alonso and Amir Yazdanbakhsh and Vidushi Dadu},
  title = {{RAGO: Systematic Performance Optimization for Retrieval-Augmented Generation Serving}},
  booktitle = {ISCA},
  year = {2025},
}
Figure