Skip to main content
GraphRAG can be configured using a settings.yaml or settings.json file in your project root. This page documents all available configuration options.

Environment variable substitution

Configuration values can reference environment variables using ${VAR_NAME} syntax:
.env
If a .env file is present in your project root, environment variables will be automatically loaded.

Language model configuration

Completion models

Define completion models for text generation tasks:
You can define multiple models and reference them by key in workflow configurations. See LLM Models for detailed examples.

Embedding models

Define embedding models for vector generation:

Input configuration

Input settings

Configure document input format and location:
string
default:"text"
Input data format: text, csv, json, or jsonl
string
default:"utf-8"
Character encoding for input files
string
Regex pattern to match input files (defaults based on type)
string
Column name for document IDs (CSV/JSON only)
string
Column name for document titles (CSV/JSON only)
string
Column name for document text content (CSV/JSON only)

Chunking configuration

Configure how documents are split into chunks:
string
default:"tokens"
Chunking strategy: tokens or sentence
integer
default:"1200"
Maximum chunk size in tokens
integer
default:"100"
Number of overlapping tokens between chunks
string
default:"o200k_base"
Tokenizer model for splitting text
array
Document metadata fields to prepend to each chunk

Storage configuration

See the Storage page for detailed storage configuration.

Workflow configurations

Text embedding

Configure text embedding generation:
string
required
Reference to embedding model configuration
integer
default:"16"
Maximum number of texts to embed in one batch
integer
default:"8191"
Maximum total tokens per batch
array
Which embeddings to generate: text_unit_text, entity_description, community_full_content

Graph extraction

Configure LLM-based entity and relationship extraction:
string
required
Reference to completion model configuration
string
Path to extraction prompt file
array
default:"[organization, person, geo, event]"
List of entity types to extract
integer
default:"1"
Number of additional extraction passes for thoroughness

NLP-based extraction

Configure NLP-based graph extraction (alternative to LLM):

Description summarization

Configure entity and relationship description summarization:
integer
default:"500"
Maximum output tokens per summary
integer
default:"4000"
Maximum input tokens to collect for summarization

Graph clustering

Configure Leiden hierarchical clustering:
integer
default:"10"
Maximum cluster size for export
boolean
default:"true"
Whether to use only the largest connected component
integer
default:"0xDEADBEEF"
Random seed for consistent clustering results

Graph pruning

Configure optional graph pruning to optimize modularity:
integer
default:"2"
Minimum node frequency to retain
integer
default:"1"
Minimum node degree (connections) to retain
float
default:"40.0"
Minimum edge weight percentile to retain
boolean
default:"true"
Remove ego nodes (nodes connected to everything)

Community reports

Configure community report generation:
string
Prompt for graph-based community summarization
string
Prompt for text-based community summarization
integer
default:"2000"
Maximum output tokens per report
integer
default:"8000"
Maximum input tokens for report generation

Claim extraction

Configure optional claim extraction:
Claim extraction is disabled by default and requires prompt tuning for your specific domain.

Snapshots

Configure optional data snapshots:
boolean
default:"false"
Export embeddings to parquet files
boolean
default:"false"
Export graph to GraphML format
boolean
default:"false"
Export raw extracted graph before merging

Query configurations

Configure local search for targeted queries:
Configure global search for broad queries:
Configure DRIFT search for iterative exploration:
Configure basic vector search:

Advanced settings

Workflows

Override the default workflow execution order:
Most users don’t need to customize workflows. Only specify this if you want precise control over execution order.

Concurrency settings

Control global concurrency for async operations:

Next steps

LLM models

Detailed guide to configuring language models

Storage

Configure storage backends and caching

Initialization

Learn about the init command

Start indexing

Begin processing your documents