Skip to main content

No project description provided

Project description

circlemind fast-graphrag

fast-graphrag is released under the MIT license. PRs welcome! Circlemind Page

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)

pip install fast-graphrag

Install from source

# clone this repo first
cd fast-graphrag
poetry install

Quickstart

Set the OpenAI API key in the environment:

export OPENAI_API_KEY="sk-..."

Download a copy of A Christmas Carol by Charles Dickens:

curl https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/refs/heads/main/mock_data.txt > ./book.txt

Use the Python snippet below:

from fast_graphrag import GraphRAG

DOMAIN = "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", "Activty", "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.

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 to see how to get started.

Not sure where to get started? You can join our Discord 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 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.

circlemind fast-graphrag demo

To learn more about our managed service, book a demo or see our docs.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fast_graphrag-0.0.2.post0.tar.gz (34.2 kB view details)

Uploaded Source

Built Distribution

fast_graphrag-0.0.2.post0-py3-none-any.whl (44.5 kB view details)

Uploaded Python 3

File details

Details for the file fast_graphrag-0.0.2.post0.tar.gz.

File metadata

  • Download URL: fast_graphrag-0.0.2.post0.tar.gz
  • Upload date:
  • Size: 34.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for fast_graphrag-0.0.2.post0.tar.gz
Algorithm Hash digest
SHA256 d5c79ce821ec0f34d9a79697ae92fb4b45e3179f566650cfe98b862b7d6f0a88
MD5 838ecaa750dc7b7a4ba1f85f12e40e5d
BLAKE2b-256 9ab4bb24d97d5d40ae035d91b9f6e11857c81760ac22e40ac6510b0e77f1fc31

See more details on using hashes here.

File details

Details for the file fast_graphrag-0.0.2.post0-py3-none-any.whl.

File metadata

File hashes

Hashes for fast_graphrag-0.0.2.post0-py3-none-any.whl
Algorithm Hash digest
SHA256 ea96c51553fc679cb940fcb2f56cbe65a8077402bbb956d176e16237affcc8b0
MD5 91fcd4a2d9c8e2f093843803e72908d7
BLAKE2b-256 e9128b2cd922c7ee3433c80474eeb1e1d6aaa8ee7ddb5715e83fd02fb6b6c1ce

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page