Installation
The GraphRAG CLI is included when you install the graphrag package:Available commands
The CLI provides the following commands:graphrag init- Initialize a new GraphRAG project with default configurationgraphrag index- Build a knowledge graph index from your documentsgraphrag update- Update an existing knowledge graph index with new datagraphrag query- Query a knowledge graph index using various search methodsgraphrag prompt-tune- Generate custom prompts tuned to your domain and data
Global options
All commands support the following global options:Display help information for a command
Getting started
To get started with GraphRAG:-
Initialize a new project:
-
Add your documents to the
inputdirectory -
Build the knowledge graph:
-
Query your knowledge graph:
Configuration
After runninggraphrag init, you’ll find:
settings.yaml- Main configuration file.env- Environment variables (API keys, etc.)prompts/- Directory containing prompt templatesinput/- Directory for your source documents