⬡PipelineResearchFree
GraphRAG
Microsoft's graph-based RAG: build knowledge graphs from documents for global, multi-hop reasoning beyond vector search.
GraphRAG
GraphRAG is Microsoft Research's graph-based retrieval-augmented generation system. Where conventional RAG retrieves isolated text chunks, GraphRAG builds a knowledge graph of entities and relationships from your documents, enabling LLMs to reason across the entire corpus and answer complex, multi-hop questions that vector search cannot.
Key Features
- Graph indexing — extracts entities, relationships, and community summaries from documents using an LLM
- Global search — answer questions that require synthesizing information across the entire document set
- Local search — entity-anchored retrieval for specific, focused questions
- Community reports — hierarchical cluster summaries provide high-level corpus understanding
- DRIFT search — Dynamic Reasoning and Inference with Flexible Traversal for hybrid global/local queries
- Prompt tuning — auto-generate domain-adapted extraction prompts from a sample of your data
Quick Start
pip install graphrag
# Initialize and index a corpus
mkdir -p ./rag/input && cp my_docs/*.txt ./rag/input/
graphrag init --root ./rag
# Configure ./rag/settings.yaml with your OpenAI API key
graphrag index --root ./rag
# Query
graphrag query --root ./rag --method global --query "What are the main themes?"
Install via ai-supply
npx ai-supply add graphrag-knowledge-graph-rag
Curated mirror of the open-source GraphRAG project (MIT). Install upstream from the repository.