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:
type
string
default:"text"
Input data format: text, csv, json, or jsonl
encoding
string
default:"utf-8"
Character encoding for input files
file_pattern
string
Regex pattern to match input files (defaults based on type)
id_column
string
Column name for document IDs (CSV/JSON only)
title_column
string
Column name for document titles (CSV/JSON only)
text_column
string
Column name for document text content (CSV/JSON only)

Chunking configuration

Configure how documents are split into chunks:
type
string
default:"tokens"
Chunking strategy: tokens or sentence
size
integer
default:"1200"
Maximum chunk size in tokens
overlap
integer
default:"100"
Number of overlapping tokens between chunks
encoding_model
string
default:"o200k_base"
Tokenizer model for splitting text
prepend_metadata
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:
embedding_model_id
string
required
Reference to embedding model configuration
batch_size
integer
default:"16"
Maximum number of texts to embed in one batch
batch_max_tokens
integer
default:"8191"
Maximum total tokens per batch
names
array
Which embeddings to generate: text_unit_text, entity_description, community_full_content

Graph extraction

Configure LLM-based entity and relationship extraction:
completion_model_id
string
required
Reference to completion model configuration
prompt
string
Path to extraction prompt file
entity_types
array
default:"[organization, person, geo, event]"
List of entity types to extract
max_gleanings
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:
max_length
integer
default:"500"
Maximum output tokens per summary
max_input_tokens
integer
default:"4000"
Maximum input tokens to collect for summarization

Graph clustering

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

Graph pruning

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

Community reports

Configure community report generation:
graph_prompt
string
Prompt for graph-based community summarization
text_prompt
string
Prompt for text-based community summarization
max_length
integer
default:"2000"
Maximum output tokens per report
max_input_length
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:
embeddings
boolean
default:"false"
Export embeddings to parquet files
graphml
boolean
default:"false"
Export graph to GraphML format
raw_graph
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