graph-rag
Skill8 starsChanged 7 months agoMITView on GitHub
Use knowledge graphs to connect related information across documents for enhanced retrieval.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- VoDaiLocz/kilo-kit-mcptheir own version, first seen Aug 21, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- VoDaiLocz/kilo-kit-mcp★ 27same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository39 other files it gives its agents.
- AGENTS.mdAGENTS.md
- rag-skillsSkill
- choosing-a-chunking-frameworkSkill
- contextual-chunk-headersSkill
- hierarchical-chunkingSkill
- semantic-chunkingSkill
- chunkingSkill
- sliding-window-chunkingSkill
- rag-for-code-documentationSkill
- rag-for-multimodal-contentSkill
- data-type-handlingSkill
- index-versioning-and-reindexingSkill
- production-rag-deploymentSkill
- deploymentSkill
- generation-evaluation-metricsSkill
- rag-evaluation-frameworksSkill
- retrieval-evaluation-metricsSkill
- evaluation-metricsSkill
- optimize-retrieval-latencySkill
- performance-optimizationSkill
- agentic-rag-routingSkill
- multi-agent-rag-orchestrationSkill
- rag-agentsSkill
- adaptive-retrievalSkill
- context-enrichment-windowSkill
- crag-corrective-ragSkill
- explainable-retrievalSkill
- hybrid-search-bm25-denseSkill
- hyde-hypothetical-document-embeddingsSkill
- hype-hypothetical-prompt-embeddingsSkill
- multi-pass-retrieval-with-rerankingSkill
- query-transformation-strategiesSkill
- raptor-hierarchical-retrievalSkill
- self-ragSkill
- retrieval-strategiesSkill
- choosing-vector-db-by-datatypeSkill
- qdrant-for-production-ragSkill
- qdrant-setup-ragSkill
- vector-databasesSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 7 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 36
Use an LLM to identify entities and their relationships from document chunks.
- Distinctive: line 47
Create nodes for entities and edges for relationships, building a graph structure that can be queried and traversed.
- Distinctive: line 54
Use community detection algorithms (e.g., Leiden, Louvain) to find clusters of highly connected entities.
- Distinctive: line 86
When queries require connecting information from disparate sources
- Distinctive: line 89
When traditional chunk-based retrieval misses important connections
- Distinctive: line 93
When indexing cost and time are major constraints
- Distinctive: line 96
When implementation complexity must be minimized
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Overview
Graph RAG enhances traditional retrieval by constructing knowledge graphs from documents, identifying communities of related entities, and using these structures to improve retrieval. This approach excels at connecting disparate information and providing holistic understanding across large document collections.
Problem Statement
Traditional chunk-based retrieval has limitations:
- Fragmented Information: Related concepts split across different chunks
- No Context Connections: Retrieval can't connect information from separate sources
- Limited Global Understanding: Difficulty synthesizing information across entire corpus
- Missing Relationships: Entity relationships not captured in flat retrieval
- Poor Sensemaking: Struggles with tasks requiring global understanding
Key Concepts
- Entity Extraction: Identifying key entities (people, places, concepts) from text
- Relationship Extraction: Finding connections between extracted entities
- Graph Construction: Building knowledge graphs with entities as nodes and relationships as edges
- Community Detection: Clustering related entities to find thematic groups
- Community Summarization: Creating summaries for each community for efficient retrieval
- Local and Global Retrieval: Supporting both specific and comprehensive queries
Implementation Guide
Step 1: Extract Entities and Relationships
Use an LLM to identify entities and their relationships from document chunks.
Why: Entity extraction transforms unstructured text into structured knowledge, enabling graph-based retrieval that understands connections between concepts.
Direct the LLM to extract entities (people, places, concepts, etc.) and the relationships between them.
Step 2: Construct Knowledge Graph
Build a graph from extracted entities and relationships.
Why: A knowledge graph provides a structured representation of how entities connect across the document collection, enabling retrieval that traverses these connections.
Create nodes for entities and edges for relationships, building a graph structure that can be queried and traversed.
Step 3: Detect Communities
Apply community detection algorithms to identify clusters of related entities.
Why: Communities represent thematic groupings in the graph - entities that are closely connected form natural clusters that can be summarized together.
Use community detection algorithms (e.g., Leiden, Louvain) to find clusters of highly connected entities.
Step 4: Summarize Communities
Generate summaries for each community to provide context for retrieval.
Why: Community summaries condense related information into manageable pieces, enabling efficient retrieval while preserving thematic connections.
For each community, summarize the relevant documents and entity information into concise overviews.
Step 5: Implement Local Retrieval
Query using community summaries for specific, focused answers.
Why: Local retrieval provides precise, contextually relevant answers by matching queries to the most appropriate community summaries.
Match queries to community summaries and retrieve documents from the most relevant communities.
Step 6: Implement Global Retrieval
Synthesize information across all communities for comprehensive answers.
Why: Global retrieval is needed for queries that require understanding across multiple communities or the entire corpus.
Generate preliminary answers from each community and synthesize into a comprehensive response.
Step 7: Build Complete Graph RAG Pipeline
Combine all components into a cohesive system.
Why: A complete pipeline with both local and global retrieval modes ensures optimal performance for both specific and comprehensive queries.
For implementation patterns, see Microsoft GraphRAG, the GraphRAG documentation, and networkx community detection for implementation details.
When to Use This Skill
- Building RAG systems for large document collections with interconnected concepts
- When queries require connecting information from disparate sources
- For applications requiring global understanding and sensemaking
- For domains with clear entity relationships (biographies, technical domains)
- When traditional chunk-based retrieval misses important connections
When NOT to Use This Skill
- For small document collections where chunk retrieval is sufficient
- When indexing cost and time are major constraints
- For documents with weak entity relationships (unstructured narratives)
- For simple fact-finding queries that don't require synthesis
- When implementation complexity must be minimized
Related Skills
- RAPTOR - Alternative hierarchical approach
- Explainable Retrieval - Citation and traceability
- Adaptive Retrieval - Dynamic query processing
Metrics & Success Criteria
- Global Understanding: Improved performance on sensemaking tasks
- Connection Discovery: Ability to connect related information across sources
- Query Coverage: Better results for both specific and comprehensive queries
- Graph Quality: Meaningful entity and relationship extraction
- Summary Effectiveness: Community summaries capture essential information
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

