Skip to main content
Several users have asked if they can bring their own existing graph and have it summarized for query with GraphRAG. This page describes a simple method that aligns with the existing GraphRAG workflows.

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
The approach is to run a custom GraphRAG workflow pipeline that assumes text chunking, entity extraction, and relationship extraction have already occurred.

Required tables

Entities

For graph summarization purposes, you need the following fields from the full entities schema:
FieldTypeRequiredDescription
idstrYesUnique identifier for the entity
titlestrYesName of the entity
descriptionstrYesTextual description of the entity
text_unit_idsstr[]OptionalList of source text chunks (if available)

Relationships

For graph summarization purposes, you need the following fields from the full relationships schema:
FieldTypeRequiredDescription
idstrYesUnique identifier for the relationship
sourcestrYesName of the source entity
targetstrYesName of the target entity
descriptionstrYesDescription of the relationship
weightfloatYesEdge weight (important for Leiden communities!)
text_unit_idsstr[]OptionalList of source text chunks (if available)
The weight field is critical because it is used to properly compute Leiden communities. Make sure to provide meaningful weights (e.g., 0.0 to 1.0 based on relationship strength).

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.

Workflow configuration

GraphRAG allows you to specify only the specific workflow steps you need. For basic graph summarization and query, configure the following in your settings.yaml:
For Global Search (community-based summarization):
settings.yaml
This will:
  1. Run Leiden community detection on your graph
  2. 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 complete settings.yaml for bring-your-own-graph scenarios:
settings.yaml

Limitations and considerations

If your graph doesn’t have entity or relationship descriptions:
  • Use create_community_reports_text instead of create_community_reports
  • Ensure you have text_units with valid entity/relationship links
  • Consider adding synthetic descriptions based on entity names/types
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 are optional for Global Search but required for:
  • Local Search
  • DRIFT Search
  • Text-based community reports
If you don’t have original source text, you can skip these query methods.
For large graphs:
  • Adjust max_cluster_size in cluster_graph settings
  • Consider using use_lcc: true to 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