Logo IconGuided Mind
v2.4Sign In
RAG Types

Graph RAG

Knowledge graph with community detection for complex, multi-hop reasoning across documents.

Graph RAG builds a knowledge graph from your documents, extracting entities and relationships. It uses community detection to group related concepts, enabling complex multi-hop reasoning that vector search alone cannot achieve.

How it Works

  1. Extraction: Entities (people, organizations, concepts) and relationships are extracted from documents
  2. Graph Building: A knowledge graph connects all entities across your document collection
  3. Community Detection: Related entities are grouped into communities with auto-generated summaries
  4. Query Time: Queries leverage both graph structure and community context

RAG Wizard Configuration

Step 1: Project Setup

  • Domain: Best for complex domains with many interconnections
  • Use Case: "Research", "Knowledge Discovery", or "Document Analysis"

Step 2: Data Sources

Graph RAG shines with document collections that reference each other:

  • Research papers with citations
  • Legal documents with cross-references
  • Technical documentation with dependencies
  • Business policies with interconnected rules

Step 3: Document Processing

SettingRecommended Value
Chunking MethodDocument-Based
Chunk Size1000-2000 tokens
Overlap100 tokens
Respect Sentence BoundariesEnabled

Graph RAG requires larger chunks to preserve entity context. Avoid chunk sizes below 500 tokens.

Step 4: Pipeline Configuration

SettingValue
Search MethodGraph
Embedding ModelAny supported model
Community DetectionEnabled
LLM for ExtractionEnabled

Graph-Specific Settings

ParameterDefaultDescription
Entity TypesAutoEntity categories to extract
Relationship TypesAutoRelationship patterns to detect
Min Community Size3Minimum entities per community
Max Communities50Cap on community count

Step 5: API Endpoints

Generate your API key and integrate using REST API, Python SDK, or MCP Protocol:

curl -X POST "https://api.guidedmind.ai/rag/search" \
-H "X-API-Key: rk_your_key_here" \
-H "Content-Type: application/json" \
-d '{
  "query": "How does the expense policy relate to travel approval?",
  "options": {
    "limit": 5,
    "threshold": 0.5,
    "search_method": "graph"
  }
}'

Visualizing Your Graph

After processing, access the Graph Editor from your project dashboard to:

  • Explore entity relationships visually
  • Browse communities and their summaries
  • Filter by entity type or relationship
  • Export graph data

When to Use Graph RAG

ScenarioFit
Cross-document relationshipsExcellent
Multi-hop reasoningExcellent
Knowledge discoveryExcellent
Complex domain mappingGood
Simple Q&AOverkill
Real-time search neededPoor (slower)

Performance Considerations

MetricValue
Build Time5-30 min (depends on doc count)
Query Latency300-800ms
Storage Overhead2-3x document size
Best ForUnder 1000 documents

Graph RAG is compute-intensive. Start with a small document set (50-100 docs) to validate quality before scaling up.

Comparison with Other RAG Types

FeatureNaiveHybridGraph
Semantic Search
Keyword Search
Cross-Document Links
Multi-Hop Reasoning
Build SpeedFastFastSlow
Query SpeedFastMediumSlow
StorageLowLowHigh