Abstract
Retrieval-Augmented Generation (RAG) has become a standard paradigm for grounding Large Language Models (LLMs) in factual, real-time data. However, the optimization of RAG serving systems is currently hindered by a lack of realistic, multi-stage workload traces. We introduce RAGPulse, the first open-source, real-world RAG workload trace. Collected from a production university Q&A service serving over 40,000 users, RAGPulse reveals unique characteristics—such as highly skewed document access, strong temporal locality, and dynamic input composition—that generic LLM traces fail to capture. This dataset provides a vital foundation for developing next-generation caching and batching strategies tailored for RAG architectures.
Introduction
While Large Language Models (LLMs) demonstrate remarkable capabilities, they are limited by static knowledge cutoffs and a tendency toward hallucinations. Retrieval-Augmented Generation (RAG) addresses these issues by fetching relevant external documents to augment the model's prompt. Despite its effectiveness, serving RAG at scale is computationally expensive and architecturally complex.
Current research into LLM serving optimization often relies on generic inference traces (e.g., Chatbot Arena). These traces are insufficient for RAG because they ignore the multi-stage nature of the workflow: Retrieve, Augment, and Generate. Performance bottlenecks in RAG systems are distributed across vector database lookups, context re-ranking, and the complex interaction between retrieved passages and the model's KV cache. Without RAG-specific data, system architects are unable to accurately simulate or optimize these interactions.
The RAGPulse Dataset
The RAGPulse dataset is derived from "Twen," a production RAG system at Tianjin University. The trace contains 7,106 request records sampled over one week. To ensure utility for the research community while maintaining user privacy, the authors employed several key techniques:
- Hash-Based Anonymization: Original queries and retrieved documents are replaced with unique hash IDs. This preserves structural and temporal relationships without exposing sensitive content.
- Multi-Stage Metadata Capture: Unlike standard traces that only track prompt and response lengths, RAGPulse tracks the full lineage of a request, including IDs for system prompts, retrieved passages, chat history, and web search results.
- Benchmarking Support: The researchers provided a "text reconstruction" strategy, allowing users to generate random tokens that match the original lengths of hashed IDs for high-fidelity simulation of KV cache behavior.
Key Insights and Workload Characteristics
Statistical analysis of RAGPulse yielded several critical insights for system design:
The "Hot Document" Phenomenon
Document access in real-world RAG is highly skewed. A small subset of core knowledge chunks is retrieved repeatedly by different users. This suggests that Retrieval Caching—caching the results of vector searches or the KV cache of frequently used documents—presents a significant optimization opportunity.
Temporal Locality and Periodicity
Requests arriving in close temporal proximity often access the same or highly similar documents. This confirms that content-aware batching—grouping requests that share context—could drastically reduce redundant computation. Furthermore, the workload follows clear human cycles, with peaks during working hours and significant drops at night.
Dynamic Input Composition
The "shape" of a request changes significantly with its length. For short requests, the system prompt is the dominant component. However, for longer requests (exceeding 3,000 tokens), retrieved passages and dialogue history can account for nearly 40% of the total token count. This heterogeneity means that processing overhead is not uniform across requests.
Key Results
- Token Clustering: Input lengths primarily cluster around 3,500 tokens, while outputs are significantly shorter, typically averaging around 500 tokens.
- Inter-request Overlap: The trace demonstrates a high "Overlap Ratio," proving that real-world users frequently query trending topics or common policies simultaneously.
Limitations and Future Work
While RAGPulse is a significant step forward, it currently covers only one week of data from a specific university policy domain. Future iterations aim to include longer-term traces to capture how knowledge bases evolve and "Agent" traces to model more complex, multi-turn reasoning and tool-use behaviors.
The RAGPulse dataset and associated benchmarking tools are available at https://github.com/flashserve/RAGPulse.
Summary updated