Fast GraphRAG is a streamlined and promptable Graph Retrieval-Augmented Generation (GraphRAG) framework designed for interpretable, high-precision, agent-driven retrieval workflows. It is designed to seamlessly integrate into retrieval pipelines, allowing users to obtain advanced RAG capabilities without building and designing complex agent workflows.
Key Capabilities
- Interpretable and debuggable knowledge: The graph provides a human-navigable view of knowledge that can be queried, visualized, and updated.
- Fast, low-cost, and efficient: Designed to run at scale without heavy resource or cost requirements. Official examples show that with The Wizard of Oz, fast-graphrag costs $0.08, compared with $0.48 for graphrag, saving 6x the cost, and it further improves as data scale and number of insertions increase.
- Dynamic data: Automatically generates and optimizes graphs to best fit domain and ontology requirements.
- Incremental updates: Supports real-time updates as data evolves.
- Intelligent exploration: Uses PageRank-based graph exploration to enhance accuracy and reliability.
- Asynchronous and typed: Fully asynchronous, with complete type support, for robust and predictable workflows.
Usage
Fast GraphRAG supports installation from source (recommended for best performance) or from PyPI (recommended for stability). Before use, the OpenAI API key must be set in the environment. Official Python code snippet examples are provided, and it is explained that all knowledge will be automatically retained the next time it is initialized from the same working directory.
The official examples folder contains tutorials for common use cases:
custom_llm.py: How to configure fast-graphrag to run different OpenAI API-compatible language models and embedders.checkpointing.ipynb: How to use checkpoints to avoid irreversible data corruption.query_parameters.ipynb: How to use different query parameters, especially how to use thewith_references=Trueparameter to include citations of the information used in the provided answer.
Applicable Scenarios
Fast GraphRAG is suitable for scenarios that require advanced retrieval-augmented generation capabilities, especially applications with requirements for interpretability, cost efficiency, and dynamic data updates. It is suitable for developers who want to integrate graph retrieval into existing pipelines without building complex agent workflows.
Limitations and Notes
- Use requires an OpenAI API key, but it supports configuring other OpenAI API-compatible models and embedders.
- An official hosted service is provided, with the first 100 requests per month free, after which it is pay-as-you-go.
- The project uses the MIT license.
- It currently uses a personalized PageRank algorithm to explore the graph and find the most relevant information; the relevant principles can be found in the HippoRAG paper.
- Other specific features, pricing details, platform support, etc. are not currently provided.