Configuration modes
GraphRAG supports a default configuration mode that is designed to work out-of-the-box with minimal setup. You can configure GraphRAG through:Init command
Get started quickly with the
graphrag init commandSettings file
Customize behavior through
settings.yaml configurationQuick start
The simplest way to get started is by running the initialization command:settings.yaml- Main configuration file.env- Environment variables for API keysprompts/- Default LLM prompts
Configuration structure
GraphRAG configuration is organized into several key areas:Language models
Language models
Configure completion and embedding models, including provider settings, authentication, retry logic, and rate limiting.View LLM configuration details
Input and processing
Input and processing
Set up document ingestion, text chunking, and preprocessing options for your data pipeline.Includes support for CSV, TXT, and JSON formats with configurable chunking strategies.
Storage and caching
Storage and caching
Configure storage backends for inputs, outputs, and caching to optimize performance and cost.View storage configuration details
Graph extraction
Graph extraction
Tune entity extraction, relationship detection, and graph construction parameters.Choose between LLM-based and NLP-based extraction methods.
Community detection
Community detection
Configure hierarchical clustering and community report generation.Uses Leiden algorithm for graph partitioning with customizable parameters.
Query methods
Query methods
Set up local, global, drift, and basic search with custom prompts and context limits.Each search method has dedicated configuration options.
Environment variables
GraphRAG supports environment variable substitution in configuration files using${VAR_NAME} syntax:
.env
Environment variables are automatically loaded from
.env files in your project root.Configuration defaults
GraphRAG includes sensible defaults for most settings. You only need to configure:
For a complete list of default values, see the defaults.py file in the source code.
Next steps
Initialize your project
Run
graphrag init to create your configurationConfigure LLM models
Set up your language models and embeddings
Settings reference
Explore all available configuration options
Storage setup
Configure input, output, and cache storage