graphrag

Manual Prompt Tuning ⚙️

The GraphRAG indexer, by default, will run with a handful of prompts that are designed to work well in the broad context of knowledge discovery. However, it is quite common to want to tune the prompts to better suit your specific use case. We provide a means for you to do this by allowing you to specify a custom prompt file, which will each use a series of token-replacements internally.

Each of these prompts may be overridden by writing a custom prompt file in plaintext. We use token-replacements in the form of {token_name}, and the descriptions for the available tokens can be found below.

Indexing Prompts

Entity/Relationship Extraction

Prompt Source

Tokens

Summarize Entity/Relationship Descriptions

Prompt Source

Tokens

Claim Extraction

Prompt Source

Tokens

See the configuration documentation for details on how to change this.

Generate Community Reports

Prompt Source

Tokens

Query Prompts

Prompt Source

Tokens

Mapper Prompt Source

Reducer Prompt Source

Knowledge Prompt Source

Global search uses a map/reduce approach to summarization. You can tune these prompts independently. This search also includes the ability to adjust the use of general knowledge from the model’s training.

Tokens

Prompt Source

Tokens