Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/microsoft/graphrag/llms.txt

Use this file to discover all available pages before exploring further.

GraphRAG uses several enumeration types to constrain configuration values to valid options.

ReportingType

The reporting configuration type for the pipeline. Module: graphrag.config.enums Base class: str, Enum

Values

file
str
default:"file"
The file reporting configuration type. Writes reporting output to local files.
blob
str
default:"blob"
The blob reporting configuration type. Writes reporting output to Azure Blob Storage.

Example

from graphrag.config.enums import ReportingType

# Use in configuration
reporting_type = ReportingType.file
print(reporting_type)  # "file"

AsyncType

Enum for the type of async to use for concurrent operations. Module: graphrag.config.enums Base class: str, Enum

Values

AsyncIO
str
default:"asyncio"
Use Python’s asyncio for asynchronous operations. Provides true async/await concurrency.
Threaded
str
default:"threaded"
Use thread-based concurrency for asynchronous operations. Default mode for most operations.

Example

from graphrag.config.enums import AsyncType

# Use in configuration
async_mode = AsyncType.Threaded

SearchMethod

The type of search to run. Module: graphrag.config.enums Base class: Enum

Values

LOCAL
str
default:"local"
Local search method. Searches within a local context using entities and relationships.
GLOBAL
str
default:"global"
Global search method. Performs map-reduce search across community reports.
DRIFT
str
default:"drift"
DRIFT search method. Dynamic reasoning and inference with followup trajectories.
BASIC
str
default:"basic"
Basic search method. Simple vector similarity search.

Example

from graphrag.config.enums import SearchMethod

# Use string representation
search_type = SearchMethod.LOCAL
print(str(search_type))  # "local"

IndexingMethod

Enum for the type of indexing to perform. Module: graphrag.config.enums Base class: str, Enum

Values

Standard
str
default:"standard"
Traditional GraphRAG indexing, with all graph construction and summarization performed by a language model. Provides highest quality but slower performance.
Fast
str
default:"fast"
Fast indexing, using NLP for graph construction and language model for summarization. Significantly faster than standard indexing.
StandardUpdate
str
default:"standard-update"
Incremental update with standard indexing. Updates an existing index with new documents using LLM-based extraction.
FastUpdate
str
default:"fast-update"
Incremental update with fast indexing. Updates an existing index with new documents using NLP-based extraction.

Example

from graphrag.config.enums import IndexingMethod

# Use in indexing configuration
method = IndexingMethod.Fast

NounPhraseExtractorType

Enum for the noun phrase extractor options used in NLP-based graph extraction. Module: graphrag.config.enums Base class: str, Enum

Values

RegexEnglish
str
default:"regex_english"
Standard extractor using regex. Fastest option, but limited to English language text.
Syntactic
str
default:"syntactic_parser"
Noun phrase extractor based on dependency parsing and named entity recognition (NER) using SpaCy. More accurate than regex but slower.
CFG
str
default:"cfg"
Noun phrase extractor combining context-free grammar (CFG) based noun-chunk extraction and NER. Balanced approach between speed and accuracy.

Example

from graphrag.config.enums import NounPhraseExtractorType

# Use in NLP extraction configuration
extractor = NounPhraseExtractorType.RegexEnglish

ModularityMetric

Enum for the modularity metric to use in graph clustering. Module: graphrag.config.enums Base class: str, Enum

Values

Graph
str
default:"graph"
Graph modularity metric. Standard modularity calculation for community detection.
LCC
str
default:"lcc"
Largest connected component modularity metric.
WeightedComponents
str
default:"weighted_components"
Weighted components modularity metric. Takes edge weights into account when calculating modularity.

Example

from graphrag.config.enums import ModularityMetric

# Use in clustering configuration
metric = ModularityMetric.Graph

Usage in configuration

Enums are used throughout the GraphRAG configuration to provide type safety and validation:
# settings.yaml example
reporting:
  type: file  # Uses ReportingType.file
  base_dir: logs

async_mode: threaded  # Uses AsyncType.Threaded

extract_graph_nlp:
  text_analyzer:
    extractor_type: regex_english  # Uses NounPhraseExtractorType.RegexEnglish
When loading configuration, string values are automatically converted to the appropriate enum types.