The GraphRAG Pipeline: Indexing and Querying
The complete two-phase GraphRAG pipeline covering text chunking, entity extraction, knowledge graph construction, community detection, and multi-strategy querying.
The GraphRAG pipeline operates in two major phases: Indexing and Querying. Indexing Phase: 1) Text Chunking — Documents are split into manageable chunks (typically 300-600 tokens). 2) Entity & Relationship Extraction — An LLM extracts entities and their relationships. 3) Knowledge Graph Construction — Entities become nodes and relationships become edges. 4) Community Detection — The Leiden algorithm identifies hierarchical communities. 5) Community Summarization — LLM generates summaries for each community. Querying Phase: GraphRAG supports Local Search (entity-based), Global Search (community-based), and DRIFT Search (Dynamic Reasoning and Inference with Flexible Traversal).