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.
Compromise signals — malicious or tampered code (leaked secrets, backdoors, a dropped executable) — reduce the score, and known dependency CVEs carry a bounded penalty (they warrant review but never QUARANTINE — update the dependency to clear). Other dangerous-by-capability traits are risk surface, expected for some capabilities. Every finding is mapped to its OWASP control below.
Findings mapped to the OWASP Top 10 for LLM Applications (2025) and the OWASP Machine Learning Security Top 10. Expand any flagged control for the exact findings — compromise reduces the score; expected/risk-surface do not, except a known CVE, which carries a small bounded penalty (high/critical → Review).
The same gate an agent runs before installing (POST /api/v1/trust/graphrag-knowledge-graph-rag/check). Click a policy:
Consume GraphRAG programmatically. Authenticate with an API key or session — see Authorize an agent.
# Agents: CHECK BEFORE YOU INSTALL (no auth) — score, grade, level, capability manifest
curl https://ai-supply.store/api/v1/trust/graphrag-knowledge-graph-rag
# Gate against your org policy (returns { pass, violations })
curl -X POST https://ai-supply.store/api/v1/trust/graphrag-knowledge-graph-rag/check \
-H "Content-Type: application/json" \
-d '{"minGrade":"B","denyPermissions":["shell"],"denyUnknownEgress":true}'
# CLI
npx ai-supply add graphrag-knowledge-graph-rag
# REST (install → download)
curl -X POST https://ai-supply.store/api/v1/listings/graphrag-knowledge-graph-rag/install \
-H "Authorization: Bearer $AIM_KEY"
# MCP tool
install_listing({ "slug": "graphrag-knowledge-graph-rag" })OpenAPI spec →Curated mirror — latest upstream source. See the repository for tagged releases.