Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/circlemind-ai/fast-graphrag
RAG that intelligently adapts to your use case, data, and queries
https://github.com/circlemind-ai/fast-graphrag
Last synced: about 2 months ago
JSON representation
RAG that intelligently adapts to your use case, data, and queries
- Host: GitHub
- URL: https://github.com/circlemind-ai/fast-graphrag
- Owner: circlemind-ai
- License: mit
- Created: 2024-10-30T18:05:08.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-10-30T19:19:27.000Z (2 months ago)
- Last Synced: 2024-10-30T19:21:04.481Z (2 months ago)
- Size: 7.55 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- StarryDivineSky - circlemind-ai/fast-graphrag
- awesome-LLM-resourses - Fast-GraphRAG
- awesome-github-repos - circlemind-ai/fast-graphrag - RAG that intelligently adapts to your use case, data, and queries (Python)
- awesome - circlemind-ai/fast-graphrag - RAG that intelligently adapts to your use case, data, and queries (Python)
README
Streamlined and promptable Fast GraphRAG framework designed for interpretable, high-precision, agent-driven retrieval workflows.
Looking for a Managed Service? »
Install |
Quickstart |
Community |
Report Bug |
Request Feature> [!NOTE]
> Using *The Wizard of Oz*, `fast-graphrag` costs $0.08 vs. `graphrag` $0.48 — **a 6x costs saving** that further improves with data size and number of insertions. Stay tuned for the official benchmarks, and join us as a contributor!## Features
- **Interpretable and Debuggable Knowledge:** Graphs offer 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.
- **Dynamic Data:** Automatically generate and refine graphs to best fit your domain and ontology needs.
- **Incremental Updates:** Supports real-time updates as your data evolves.
- **Intelligent Exploration:** Leverages PageRank-based graph exploration for enhanced accuracy and dependability.
- **Asynchronous & Typed:** Fully asynchronous, with complete type support for robust and predictable workflows.Fast GraphRAG is built to fit seamlessly into your retrieval pipeline, giving you the power of advanced RAG, without the overhead of building and designing agentic workflows.
## Install
**Install from PyPi (recommended)**
```bash
pip install fast-graphrag
```**Install from source**
```bash
# clone this repo first
cd fast-graphrag
poetry install
```## Quickstart
Set the OpenAI API key in the environment:
```bash
export OPENAI_API_KEY="sk-..."
```Download a copy of *A Christmas Carol* by Charles Dickens:
```bash
curl https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/refs/heads/main/mock_data.txt > ./book.txt
```Use the Python snippet below:
```python
from fast_graphrag import GraphRAGDOMAIN = "Analyze this story and identify the characters. Focus on how they interact with each other, the locations they explore, and their relationships."
EXAMPLE_QUERIES = [
"What is the significance of Christmas Eve in A Christmas Carol?",
"How does the setting of Victorian London contribute to the story's themes?",
"Describe the chain of events that leads to Scrooge's transformation.",
"How does Dickens use the different spirits (Past, Present, and Future) to guide Scrooge?",
"Why does Dickens choose to divide the story into \"staves\" rather than chapters?"
]ENTITY_TYPES = ["Character", "Animal", "Place", "Object", "Activity", "Event"]
grag = GraphRAG(
working_dir="./book_example",
domain=DOMAIN,
example_queries="\n".join(EXAMPLE_QUERIES),
entity_types=ENTITY_TYPES
)with open("./book.txt") as f:
grag.insert(f.read())print(grag.query("Who is Scrooge?").response)
```The next time you initialize fast-graphrag from the same working directory, it will retain all the knowledge automatically.
## Examples
Please refer to the `examples` folder for a list of tutorial on common use cases of the library:
- `custom_llm.py`: a brief example on how to configure fast-graphrag to run with different OpenAI API compatible language models and embedders.## Contributing
Whether it's big or small, we love contributions. Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated. Check out our [guide](https://github.com/circlemind-ai/fast-graphrag/blob/main/CONTRIBUTING.md) to see how to get started.
Not sure where to get started? You can join our [Discord](https://discord.gg/DvY2B8u4sA) and ask us any questions there.
## Philosophy
Our mission is to increase the number of successful GenAI applications in the world. To do that, we build memory and data tools that enable LLM apps to leverage highly specialized retrieval pipelines without the complexity of setting up and maintaining agentic workflows.
## Open-source or Managed Service
This repo is under the MIT License. See [LICENSE.txt](https://github.com/circlemind-ai/fast-graphrag/blob/main/LICENSE) for more information.
The fastest and most reliable way to get started with Fast GraphRAG is using our managed service. Your first 100 requests are free every month, after which you pay based on usage.
To learn more about our managed service, [book a demo](https://circlemind.co/demo) or see our [docs](https://docs.circlemind.co/quickstart).