How tencentcloudadp/youtu-graphrag works
Project type and purpose
• This is a full-stack Python application (“Youtu-GraphRAG”) that exposes a web UI for Graph-RAG (Retrieval-Augmented Generation) workflows.
• Its goal is to ingest large schemas and corpora, build hierarchical knowledge graphs, perform schema-aware multi-hop retrieval (via FAISS + LLMs), apply community detection, decompose complex queries, and render answers + graph visualizations in a browser.
File structure
• Top-level “frontend/” + “assets/” ⇒ browser UI (index.html, JavaScript, images).
• “main.py” and “backend.py” ⇒ web server (likely Flask/FastAPI) implementing REST endpoints.
• “config/” ⇒ YAML-driven centralized configuration + loader.
• “models/constructor/” ⇒ KTBuilder (knowledge-tree constructor), “models/retriever/” ⇒ KTRetriever, AgenticDecomposer, FAISS filter.
• “utils/” ⇒ LLM API calls, graph processing, community detection, evaluation & logging.
• “retriever/faiss_cache_new/” ⇒ on-disk FAISS indices (node, community, triple, chunk caches).
• “schemas/” ⇒ JSON schema definitions for various benchmarks/domains.
• “data/” and “output/” ⇒ seed/demo data and generated graphs/chunks.
• Dockerfile, setup_env.sh, start.sh ⇒ container + shell scripts for deployment.
README for additional insights
• Key capabilities:
– Schema-guided, four-level knowledge tree construction
– Dually-perceived hierarchical community detection
– Agentic retrieval and iterative reflection (IRCoT)
– Parallel sub-question processing and LLM integration
– Unified YAML configuration and multi-domain transfer