Overview
To cover the basic use cases for GraphRAG query, you should have two or three tables derived from your data:1
Entities table
The list of entities (nodes) in your graph
2
Relationships table
The list of relationships (edges) in your graph
3
Text units table (optional)
Source text chunks the graph was extracted from. Required for some query methods
Required tables
Entities
For graph summarization purposes, you need the following fields from the full entities schema:Example entities.parquet
Example entities.parquet
Relationships
For graph summarization purposes, you need the following fields from the full relationships schema:Example relationships.parquet
Example relationships.parquet
Text units (optional)
Text units are chunks of your documents sized to fit into the context window of your model. Some search methods use these. See the full text_units schema for all fields.Example text_units.parquet
Example text_units.parquet
Workflow configuration
GraphRAG allows you to specify only the specific workflow steps you need. For basic graph summarization and query, configure the following in yoursettings.yaml:
- Global search only
- All search types
- FastGraphRAG variant
For Global Search (community-based summarization):This will:
settings.yaml
- Run Leiden community detection on your graph
- Generate LLM-based community reports
This is the minimal configuration for GraphRAG Global Search.
Setup steps
Here’s how to put it all together:1
Prepare your data
Create Parquet files for entities and relationships (and optionally text_units) following the schemas above.
2
Configure workflows
Update your
settings.yaml to only run the workflows you need:settings.yaml
3
Run indexing
Run the GraphRAG indexer:This will:
- Skip document loading and graph extraction (already done)
- Perform community detection on your existing graph
- Generate community reports
- (Optionally) generate embeddings
4
Query your graph
Once indexing completes, you can query using GraphRAG:
Complete example
Here’s a complete end-to-end example:convert_graph.py
Configuration file
Here’s a completesettings.yaml for bring-your-own-graph scenarios:
settings.yaml
Limitations and considerations
Missing descriptions
Missing descriptions
If your graph doesn’t have entity or relationship descriptions:
- Use
create_community_reports_textinstead ofcreate_community_reports - Ensure you have text_units with valid entity/relationship links
- Consider adding synthetic descriptions based on entity names/types
Edge weights
Edge weights
Edge weights are critical for Leiden community detection:
- Provide meaningful weights (0.0 to 1.0 recommended)
- Higher weight = stronger connection
- If unknown, use 1.0 for all edges
Text units
Text units
Text units are optional for Global Search but required for:
- Local Search
- DRIFT Search
- Text-based community reports
Graph size
Graph size
For large graphs:
- Adjust
max_cluster_sizeincluster_graphsettings - Consider using
use_lcc: trueto focus on the main component - Community detection may take significant time
Next steps
Outputs
Understand the output table schemas
Querying
Learn how to query your graph
Global search
Use community-based search on your graph
Configuration
Configure community detection parameters