EraRAG: Efficient and Incremental Retrieval Augmented Generation for Growing Corpora

Fangyuan Zhang, Zhengjun Huang, Yingli Zhou, Qintian Guo, Zhixun Li, Wensheng Luo, Di Jiang, Yixiang Fang, Xiaofang ZhouarXiv 2025

Abstract

Graph-based Retrieval-Augmented Generation (Graph-RAG) enhances large language models (LLMs) by structuring retrieval over an external corpus. However, existing approaches typically assume a static corpus, requiring expensive full-graph reconstruction whenever new documents arrive, limiting their scalability in dynamic, evolving environments. To address these limitations, we introduce EraRAG, a novel multi-layered Graph-RAG framework that supports efficient and scalable dynamic updates. Our method leverages hyperplane-based Locality-Sensitive Hashing (LSH) to partition and organize the original corpus into hierarchical graph structures, enabling efficient and localized insertions of new data without disrupting the existing topology. The design eliminates the need for retraining or costly recomputation while preserving high retrieval accuracy and low latency. Experiments on large-scale benchmarks demonstrate that EraRag achieves up to an order of magnitude reduction in update time and token consumption compared to existing Graph-RAG systems, while providing superior accuracy performance.

Introduction

Retrieval-Augmented Generation (RAG) has become a cornerstone for providing Large Language Models (LLMs) with access to external, up-to-date knowledge. Recent advancements in "Graph-RAG" have further improved performance by structuring data into hierarchical graphs, enabling complex multi-hop reasoning. However, a significant bottleneck remains: most Graph-RAG systems are designed for static corpora.

In real-world scenarios, such as news feeds or academic repositories, data is constantly evolving. Current systems typically require a full graph reconstruction whenever new documents are added. This "rebuild from scratch" approach is prohibitively expensive, consuming massive amounts of computation time and LLM tokens. EraRAG addresses this by introducing a system that adapts to new data locally and incrementally, preserving the existing semantic structure without the need for global recomputation.

The EraRAG Framework

The core innovation of EraRAG is its multi-layered graph construction powered by Hyperplane-based Locality-Sensitive Hashing (LSH). This approach ensures that the system remains efficient even as the corpus grows.

The EraRAG architecture consists of a static phase for initial construction and a dynamic phase for localized, incremental updates.

Reproducible Grouping and Summarization

Unlike traditional clustering methods that can be non-deterministic, EraRAG projects document embeddings onto a set of fixed, random hyperplanes. This generates binary hash codes that consistently map semantically similar text chunks into the same "buckets." Chunks within these buckets are then summarized by an LLM to create higher-level nodes, forming a recursive hierarchical structure.

Incremental Update Mechanism

When new data arrives, EraRAG calculates its hash and places it in the corresponding bucket. The update only affects the specific "branch" of the hierarchy associated with that bucket. To maintain balance and semantic coherence, the system employs a "merge-and-split" strategy governed by size thresholds ($S_{min}$ and $S_{max}$). This localized update process ensures that the "semantic map" of the corpus remains stable, with new data simply filling in the existing topology rather than forcing a complete reorganization.

Experimental Evaluation

EraRAG was evaluated across several diverse benchmarks, including PopQA (factual recall), HotpotQA (multi-hop reasoning), and QuALITY (deep reading comprehension).

EraRAG demonstrates superior efficiency in token processing and graph reconstruction time while maintaining higher accuracy than baselines.

Key Results

  • Efficiency Gains: EraRAG achieved up to a 95% reduction in building time and token costs during incremental updates compared to full-rebuild baselines. For small-scale insertions, updates were completed in approximately 20 seconds.
  • Accuracy: In static evaluations, EraRAG outperformed strong baselines like RAPTOR and HippoRAG on 8 out of 10 metrics. Notably, it improved accuracy on the QuALITY dataset by 4.8% over RAPTOR.
  • Scalability: The system maintained stable performance across different backbone LLMs, including GPT-4o-mini and Llama-3.1-8B, proving its robustness for various deployment scenarios.

Conclusion and Future Work

EraRAG bridges the gap between retrieval efficiency and adaptability for evolving corpora. By confining updates to localized "ripples" within a stable LSH-based hierarchy, it provides a practical path forward for RAG systems operating in dynamic environments.

Future work will focus on addressing the summarization bottleneck. Currently, LLM-based re-summarization accounts for over 98% of the update time in higher layers. Transitioning these tasks to smaller, specialized models could further reduce latency. Additionally, optimizing the initial "scaffolding" of the graph and refining chunk size trade-offs remain key areas for ongoing research.

Summary updated

BibTeX
@misc{zhang2025erarag,
  author = {Fangyuan Zhang and Zhengjun Huang and Yingli Zhou and Qintian Guo and Zhixun Li and Wensheng Luo and Di Jiang and Yixiang Fang and Xiaofang Zhou},
  title = {{EraRAG: Efficient and Incremental Retrieval Augmented Generation for Growing Corpora}},
  year = {2025},
  eprint = {2506.20963},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2506.20963},
}
Figure