๐ 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
This video walks through the main features of the project.
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:8000This 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:8000For advanced config and usage๏ผ๐ Full Guide (English) | ๐ ๅฎๆดๆๅ๏ผไธญๆ๏ผ
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},
}







