π Revolutionary framework moving Pareto Frontier with 33.6% lower token cost and 16.62% higher accuracy over SOTA baselines
π δΈζη β’ β Contributions β’ π Benchmarks β’ π Getting Started
Youtu-GraphRAG is a vertically unified agentic paradigm that jointly connects the entire framework as an intricate integration based on graph schema. We allow seamless domain transfer with minimal intervention on the graph schema, providing insights of the next evolutionary GraphRAG paradigm for real-world applications with remarkable adaptability.
π Multi-hop Reasoning/Summarization/Conclusion: Complex questions requiring multi-step reasoning
π Knowledge-Intensive Tasks: Questions dependent on large amounts of structured/private/domain knowledge
π Domain Scalability: Easily support encyclopedias, academic papers, commercial/private knowledge base and other domains with minimal intervention on the schema
Based on our unified agentic paradigm for Graph Retrieval-Augmented Generation (GraphRAG), Youtu-GraphRAG introduces several key innovations that jointly connect the entire framework as an intricate integration:
ποΈ 1. Schema-Guided Hierarchical Knowledge Tree Construction
- π± Seed Graph Schema: Introduces targeted entity types, relations, and attribute types to bound automatic extraction agents
- π Scalable Schema Expansion: Continuously expands schemas for adaptability over unseen domains
- π’ Four-Level Architecture:
- Level 1 (Attributes): Entity property information
- Level 2 (Relations): Entity relationship triples
- Level 3 (Keywords): Keyword indexing
- Level 4 (Communities): Hierarchical community structure
- β‘ Quick Adaptation to industrial applications: We allow seamless domain transfer with minimal intervention on the schema
π³ 2. Dually-Perceived Community Detection
- π¬ Novel Community Detection Algorithm: Fuses structural topology with subgraph semantics for comprehensive knowledge organization
- π Hierarchical Knowledge Tree: Naturally yields a structure supporting both top-down filtering and bottom-up reasoning that performs better than traditional Leiden and Louvain algorithms
- π Community Summaries: LLM-enhanced community summarization for higher-level knowledge abstraction
π€ 3. Agentic Retrieval
- π― Schema-Aware Decomposition: Interprets the same graph schema to transform complex queries into tractable and parallel sub-queries
- π Iterative Reflection: Performs reflection for more advanced reasoning through IRCoT (Iterative Retrieval Chain of Thought)
π§ 4. Advanced Construction and Reasoning Capabilities for real-world deployment
- π― Performance Enhancement: Less token costs and higher accuracy with optimized prompting, indexing and retrieval strategies
- π€ΉββοΈ User friendly visualization: In
output/graphs/
, the four-level knowledge tree supports visualization with neo4j importοΌmaking reasoning paths and knowledge organization vividly visable to users - β‘ Parallel Sub-question Processing: Concurrent handling of decomposed questions for efficiency and complex scenarios
- π€ Iterative Reasoning: Step-by-step answer construction with reasoning traces
- π Domain Scalability: Designed for enterprise-scale deployment with minimal manual intervention for new domains
π 5. Fair Anonymous Dataset 'AnonyRAG'
- Link: Hugging Face AnonyRAG
- Against knowledeg leakage in LLM/embedding model pretraining
- In-depth test on real retrieval performance of GraphRAG
- Multi-lingual with Chinese and English versions
βοΈ 6. Unified Configuration Management
- ποΈ Centralized Parameter Management: All components configured through a single YAML file
- π§ Runtime Parameter Override: Dynamic configuration adjustment during execution
- π Multi-Environment Support: Seamless domain transfer with minimal intervention on schema
- π Backward Compatibility: Ensures existing code continues to function
Extensive experiments across six challenging benchmarks, including GraphRAG-Bench, HotpotQA and MuSiQue, demonstrate the robustness of Youtu-GraphRAG, remarkably moving the Pareto frontier with 33.6% lower token cost compared to the sota methods and 16.62% higher accuracy over state-of-the-art baselines. The results indicate our adaptability, allowing seamless domain transfer with minimal intervention on schema.
youtu-graphrag/
βββ π config/ # Configuration System
β βββ base_config.yaml # Main configuration file
β βββ config_loader.py # Configuration loader
β βββ __init__.py # Configuration module interface
β
βββ π data/ # Data Directory
β
βββ π models/ # Core Models
β βββ π constructor/ # Knowledge Graph Construction
β β βββ kt_gen.py # KTBuilder - Hierarchical graph builder
β βββ π retriever/ # Retrieval Module
β β βββ enhanced_kt_retriever.py # KTRetriever - Main retriever
β β βββ agentic_decomposer.py # Query decomposer
β βββ βββ faiss_filter.py # DualFAISSRetriever - FAISS retrieval
β
βββ π utils/ # Utility Modules
β βββ tree_comm.py # community detection algorithm
β βββ call_llm_api.py # LLM API calling
β βββ eval.py # Evaluation tools
β βββ graph_processor.py # Graph processing tools
β
βββ π schemas/ # Dataset Schemas
βββ π assets/ # Assets (images, figures)
β
βββ π output/ # Output Directory
β βββ graphs/ # Constructed knowledge graphs
β βββ chunks/ # Text chunk information
β βββ logs/ # Runtime logs
β
βββ π retriever/ # Retrieval Cache
β
βββ main.py # π― Main program entry
βββ requirements.txt # Dependencies list
βββ setup_env.sh # install web dependency
βββ start.sh # start web service
βββ README.md # Project documentation
We provide two approaches to run and experience the demo service. Considering the differences in the underlying environment, we recommend using Docker as the preferred deployment method.
This approach relies on the Docker environment, which could be installed according to official documentation.
# 1. Clone Youtu-GraphRAG project
git clone https://github.com/TencentCloudADP/youtu-graphrag
# 2. Create .env according to .env.example
cd youtu-graphrag && cp .env.example .env
# Config your LLM api in .env as OpenAI API format
# LLM_MODEL=deepseek-chat
# LLM_BASE_URL=https://api.deepseek.com
# LLM_API_KEY=sk-xxxxxx
# 3. Build with dockerfile
docker build -t youtu_graphrag:v1 .
# 4. Docker run
docker run -d -p 8000:8000 youtu_graphrag:v1
# 5. Visit http://localhost:8000
curl -v http://localhost:8000
This approach relies on Python 3.10 and the corresponding pip environment, you can install it according to the official documentation.
# 1. Clone Youtu-GraphRAG project
git clone https://github.com/TencentCloudADP/youtu-graphrag
# 2. Create .env according to .env.example
cd youtu-graphrag && cp .env.example .env
# Config your LLM api in .env as OpenAI API format
# LLM_MODEL=deepseek-chat
# LLM_BASE_URL=https://api.deepseek.com
# LLM_API_KEY=sk-xxxxxx
# 3. Setup environment
./setup_env.sh
# 4. Launch the web
./start.sh
# 5. Visit http://localhost:8000
curl -v http://localhost:8000
For advanced config and usageοΌπ FullGuide
We welcome contributions from the community! Here's how you can help:
- π΄ Fork the project
- πΏ Create a feature branch (
git checkout -b feature/AmazingFeature
) - πΎ Commit your changes (
git commit -m 'Add some AmazingFeature'
) - π€ Push to the branch (
git push origin feature/AmazingFeature
) - π Create a Pull Request
- π± New Seed Schemas: Add high-quality seed schema and data processing
- π Custom Datasets: Integrate new datasets with minimal schema intervention
- π― Domain-Specific Applications: Extend framework for specialized use cases with 'Best Practice'
Hanson Dong - [email protected] Siyu An - [email protected]
@misc{dong2025youtugraphrag,
title={Youtu-GraphRAG: Vertically Unified Agents for Graph Retrieval-Augmented Complex Reasoning},
author={Junnan Dong and Siyu An and Yifei Yu and Qian-Wen Zhang and Linhao Luo and Xiao Huang and Yunsheng Wu and Di Yin and Xing Sun},
year={2025},
eprint={2508.19855},
archivePrefix={arXiv},
url={https://arxiv.org/abs/2508.19855},
}