EraRAG is a novel hierarchical graph construction framework that supports dynamic updates through localized selective re-partitioning, enabling efficient and scalable retrieval with strong static accuracy and stable performance under corpus changes.
- Accuracy: Achieves state-of-the-art performance across diverse question types, including multi-hop and long-document QA tasks.
- Efficiency: Significantly reduces both graph construction time and token consumption compared to existing RAG baselines.
- Incremental Updates: Supports fast and efficient integration of new documents without requiring global tree reconstruction, enabling dynamic corpus adaptation.
EraRAG and controled baselines are built on the unified framework proposed by In-depth study of graphrag. Requirements.txt is included to help get you started. To run EraRAG, use the following command:
python main.py -opt <Method>.yaml -dataset_name <Datasetname> -external_tree <External tree path> -root <rootname> -query <wether to query>
On default, EraRAG will treat the input corpus as new corpus and enforce a global reconstruction. To make a insertion to a existing tree, set Dynamic.yaml key parameters as follows.
force: False
add: True
We have incorporated several baseline methods and benchmark datasets:
Our proposed EraRAG framework achieves significant retrieval performance against state of the art graph-based RAG frameworks.
Thanks to the proposed selective reconstruction mechanism, EraRAG is able to perform fast insertions on evolving corpora, surpassing benchmarks on time and token cost reduction.
We acknowledge these excellent works for providing open-source code: GraphRAG, RAPTOR, LightRAG, HippoRAG, In-depth study of graphrag.


