GraphRAG-SDK is a free, open source databases project written in Python and released under Apache-2.0. It has 1,002 GitHub stars, 140 forks and 41 open issues, and was last pushed 28 hours ago. On this registry it ranks #78 of 81 tracked projects in Databases, with 5 head-to-head comparisons available.

What is GraphRAG-SDK?

GraphRAG-SDK is an open-source Python framework from FalkorDB for building retrieval-augmented generation applications on top of a knowledge graph, aimed at developers and teams who need cited, verifiable answers in production rather than demo-grade prototypes.

What it is

GraphRAG-SDK is a modular GraphRAG framework built on the FalkorDB graph database. It lives in the Infrastructure & Operations / Databases category of this registry and is written in Python under the Apache-2.0 licence. The project carries topics covering falkordb, genai, graph-database, graphrag, knowledge-graph, llm, rag, and sdk, and describes itself as a framework that takes raw documents to cited answers in under five minutes. Extraction is constrained by an ontology, so the graph stores typed, checkable facts instead of free-form model output, and the framework is designed for multi-tenant use with graph traversal as a first-class retrieval path.

The concrete problem it solves is retrieval failure, which the project argues is the usual cause of hallucination in RAG: the model is asked to answer from context that never contained the answer. A knowledge graph attacks that at the retrieval layer and keeps the evidence attached to the answer. The specific thing it replaces is the vector-only retrieval harness โ€” the benchmark table places "RAG (w rerank) (Vector RAG)" at an overall score of 55.39 against the FalkorDB GraphRAG SDK's 71.48, and relationship traversal is presented as retrieving connected evidence that vector similarity misses.

Key capabilities

  • Ontology-constrained knowledge graph construction, so the graph holds typed, checkable facts rather than free-form model output.
  • MENTIONED_IN provenance edges that trace entity mentions back to their source chunks.
  • return_context=True, which returns the retrieval trail so an application can validate context before using it.
  • Abstention support: generation can be gated on retrieval, returning an explicit "evidence-insufficient" response, demonstrated in graphrag_sdk/examples/grounded_answers_with_abstention.py.
  • Multi-hop relationship traversal for facts that rarely live in a single similar chunk.
  • Multi-tenant operation and text-to-Cypher retrieval.
  • Benchmark-leading accuracy: 66.09 on Novel (multi-document), 76.87 on Medical (single-document), 71.48 overall.

Who uses it and how

  • Teams building GenAI applications where factual reliability matters and generated claims must be traceable to source chunks.
  • Applications that need to gate generation and abstain when retrieved evidence is insufficient, using the grounding and abstention example as a starting point.
  • Multi-tenant deployments serving more than one isolated graph or tenant from the same framework.
  • Teams evaluating GraphRAG quality against published results: the Novel dataset has 20 documents and 2,010 questions, and Medical has 1 corpus with 2,062 questions.
  • Reproducers of the benchmark, which ran with gpt-4o-mini on Azure OpenAI at temperature 0.7 for both graph construction and generation, text-embedding-3-large at 1024 dimensions, text-to-Cypher retrieval enabled, and the benchmark's own generation_eval.py unmodified as the judge.

Getting started

The README excerpt states a five-minute setup from raw documents to cited answers, and documentation is hosted under FalkorDB at docs.falkordb.com/graphrag. The facts provided do not name a pip package, Docker image, or compose file, so check the repository and the FalkorDB GraphRAG documentation for the exact install and run commands.

How it compares

Among graph and retrieval systems, the SDK sits at the top of the published leaderboard it cites, ahead of G-reasoner (66.12), AutoPrunedRetriever (65.36), HippoRAG2 (60.67), Fast-GraphRAG (58.07), LightRAG (53.84), HippoRAG (51.92), and MS-GraphRAG local (48.05). It leads vector RAG with reranking (55.39) by the widest margin on the multi-document Novel set, where the scores are 66.09 versus 48.35. Comparison figures come from the published leaderboard unchanged, and the overall figure is the project's own summary across the two datasets.

When to use it โ€” and when not to

A self-hoster must operate FalkorDB as the graph backend and supply an LLM and embedding provider, since the documented benchmark configuration depends on Azure OpenAI models. Teams that only need similarity search over chunks, or that cannot run a graph database alongside their application, are a poor fit. Note also that this registry entry records 41 open issues, and the README excerpt is thin on installation and API specifics, so expect to rely on the external documentation; the Apache-2.0 licence, by contrast, is unambiguous.

project readme (upstream, from github) โ€” read inline

GraphRAG-SDK

The simplest, most accurate GraphRAG framework built on FalkorDB

Benchmark-leading accuracy ยท Reduce LLM hallucinations ยท FalkorDB-fast ยท Multi-tenant ยท Graph traversal ยท 5-minute setup

PyPI version Downloads Python 3.10+ License: Apache 2.0 CI Discord GitHub Stars

knowledge-graph-construction-b

Most GraphRAG systems work in demos and break under production constraints. GraphRAG SDK was built from real deployments around a simple idea: the retrieval harness matters more than the model. The result is a modular, benchmark-leading framework with predictable cost and sensible defaults that gets you from raw documents to cited answers in under 5 minutes.

It is designed to reduce LLM hallucinations: answers can be grounded in context retrieved from the knowledge graph, while applications inspect that context, validate generated claims, and gate generation when evidence is insufficient. MENTIONED_IN provenance edges trace entity mentions to their source chunks โ€” see the Reducing LLM Hallucinations guide and the grounded answers with abstention example.


Why GraphRAG for factual reliability?

Hallucinations in RAG are usually a retrieval failure, not a model failure: the model is asked to answer from context that never contained the answer. A knowledge graph attacks that at the retrieval layer, and keeps the evidence attached to the answer.

  • Relationship traversal retrieves the connected evidence vector similarity misses โ€” multi-hop facts rarely live in one chunk that happens to be similar to the question.
  • Retrieved context is traceable to source chunks; MENTIONED_IN edges trace entity mentions, and return_context=True returns the retrieval trail for application-level validation.
  • The ontology constrains what can be extracted, so the graph stores typed, checkable facts instead of free-form model output.
  • Your application can abstain when evidence is insufficient โ€” gate generation on retrieval and return an explicit "evidence-insufficient" response (example).
  • Benchmark accuracy is the measurable outcome of all of the above โ€” see the table below.

โ†’ Full guide: Reducing LLM hallucinations ยท API reference: Reliability and Grounding


Benchmarks

Rank System Novel (Multi-Doc) Medical (Single-Doc) Overall
1 FalkorDB GraphRAG SDK โ—„ 66.09 76.87 71.48
2 G-reasoner 58.94 73.30 66.12
3 AutoPrunedRetriever 63.72 67.00 65.36
4 HippoRAG2 56.48 64.85 60.67
5 Fast-GraphRAG 52.02 64.12 58.07
6 RAG (w rerank) (Vector RAG) 48.35 62.43 55.39
7 LightRAG 45.09 62.59 53.84
8 HippoRAG 44.75 59.08 51.92
9 MS-GraphRAG (local) 50.93 45.16 48.05

How these are computed. Per dataset, ACC is the unweighted mean of the four task-category scores, matching the GraphRAG-Bench leaderboard convention:

Dataset ACC = (Fact Retrieval + Complex Reasoning + Contextual Summarize + Creative Generation) / 4 Overall = (Novel ACC + Medical ACC) / 2

Overall is our own summary across the two datasets; the leaderboard ranks each dataset separately. Novel has 20 documents and 2,010 questions, Medical 1 corpus and 2,062 questions. FalkorDB scored August 2026 with gpt-4o-mini (Azure OpenAI) at temperature 0.7 for both graph construction and generation, text-embedding-3-large at 1024 dimensions, text-to-Cypher retrieval enabled, and the benchmark's own generation_eval.py unmodified as the judge. Competitor numbers are from the published leaderboard, unchanged. See the GraphRAG accuracy benchmark page for the full FalkorDB vs vector RAG comparison, configuration, reproduction instructions and limitations, and the benchmark methodology page for per-category results and the full 15-system comparison.

Vectors match similar chunks. The graph traverses relationships. Every answer cites its source.


Quick Start

1. Install and start FalkorDB

pip install graphrag-sdk[litellm]
docker run -d -p 6379:6379 -p 3000:3000 --name falkordb falkordb/falkordb:latest
export OPENAI_API_KEY="sk-..."

For PDF ingestion, install the pdf extra instead: pip install graphrag-sdk[litellm,pdf]. Ingestion sanitizes unsupported control characters in IDs and string properties before graph upserts, which helps avoid FalkorDB Cypher parse errors on noisy PDFs.

2. Ingest a document

import asyncio
from graphrag_sdk import GraphRAG, ConnectionConfig, LiteLLM, LiteLLMEmbedder

async def main():
    async with GraphRAG(
        connection=ConnectionConfig(host="localhost", graph_name="my_graph"),  # graph_name = per-tenant isolation
        llm=LiteLLM(model="openai/gpt-5.5"),
        embedder=LiteLLMEmbedder(model="openai/text-embedding-3-large", dimensions=256),
    ) as rag:
        # Ingest raw text (pass a file path with the `pdf` extra installed for PDFs)
        result = await rag.ingest(
            text="Alice Johnson is a software engineer at Acme Corp in London.",
            document_id="my_doc",
        )
        print(f"Nodes: {result.nodes_created}, Edges: {result.relationships_created}")

        # Finalize: deduplicate entities, backfill embeddings, create indexes
        await rag.finalize()

        # Full RAG: retrieve + generate
        answer = await rag.completion("Where does Alice work?")
        print(answer.answer)

asyncio.run(main())

3. Define a schema (optional)

from graphrag_sdk import GraphSchema, EntityType, RelationType

schema = GraphSchema(
    entities=[
        EntityType(label="Person", description="A human being"),
        EntityType(label="Organization", description="A company or institution"),
        EntityType(label="Location", description="A geographic location"),
    ],
    relations=[
        RelationType(label="WORKS_AT", description="Is employed by", patterns=[("Person", "Organization")]),
        RelationType(label="LOCATED_IN", description="Is situated in", patterns=[("Organization", "Location")]),
    ],
)

async with GraphRAG(
    connection=ConnectionConfig(host="localhost", graph_name="my_graph"),
    llm=LiteLLM(model="openai/gpt-5.5"),
    embedder=LiteLLMEmbedder(model="openai/text-embedding-3-large", dimensions=256),
    schema=schema,
) as rag:
    ...  # ingest / completion as above

โ†’ Full walkthrough: Getting Started
โ†’ Compose your own pipeline: Custom Strategies


document-to-provenance-answer-flow-v1

Incremental Updates (v1.1.0)

Re-sync individual documents without rebuilding the graph. The canonical CI use case is updating the graph on PR merge โ€” added, modified, and deleted files in one batch:

async with GraphRAG(connection=ConnectionConfig(...), llm=..., embedder=...) as graph:
    result = await graph.apply_changes(
        added=["docs/new_feature.md"],
        modified=["docs/api.

readme truncated โ€” read the full docs on github

Frequently asked questions

Is GraphRAG-SDK free to use?

GraphRAG-SDK is open source under the Apache-2.0 licence. There is no licence fee and no seat count โ€” you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does GraphRAG-SDK do?

Build fast and accurate GenAI apps with GraphRAG SDK at scale ๐ŸŒŸ

What is GraphRAG-SDK written in?

GraphRAG-SDK is primarily written in Python. Its source is publicly available at https://github.com/FalkorDB/GraphRAG-SDK, and it has 1,002 GitHub stars.