GraphRAG
less than a minute
Index of GraphRAG
To ensure experimental consistency and command availability, please follow these instructions to install GraphRAG:
conda create -n graphrag python=3.9
conda activate graphrag
pip install graphrag==1.2.0
graphrag init --root path/to/main_folder
This will create two files in the main_folder
directory:
.env
: Contains environment variables for the GraphRAG pipeline- Defines
GRAPHRAG_API_KEY=<API_KEY>
for OpenAI/Azure OpenAI authentication - Replace with your own API key
- Delete file if using alternate authentication (e.g. managed identity)
- Defines
settings.yaml
: Contains configurable pipeline settings- Modify to customize pipeline behavior
More details about GraphRAG configuration and usage can be found in the official documentation.
Then index by running
graphrag index --root path/to/main_folder
Answer and Evaluation
First, prepare your test questions according to the benchmark format. You’ll need to create a test set parquet file containing questions and their corresponding answer keys. Once ready, you can run the evaluation with:
python -m /eval/eval_graph -f path/to/main_folder -q path/to/question_parquet
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.