> ## Documentation Index
> Fetch the complete documentation index at: https://docs.falkordb.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> FalkorDB is a graph database that speaks the Redis protocol. Queries are issued as OpenCypher through the GRAPH.QUERY and GRAPH.RO_QUERY commands, not over Bolt or a SQL connection.
> FalkorDB implements a subset of OpenCypher with proprietary extensions. Do not assume Neo4j-only syntax or procedures are available — check /cypher/cypher-support and /cypher/known-limitations before using a clause.
> FalkorDB is the successor to RedisGraph, but they are separate products. Do not present RedisGraph commands, versions, or limitations as current FalkorDB behavior.
> Use the official clients listed in /getting-started/clients rather than generic Redis or Neo4j drivers, and prefer the language the user is already working in.
> Configuration parameters are set with GRAPH.CONFIG SET or at startup; cite the exact parameter name from /getting-started/configuration rather than inventing one.
> This site covers four products: FalkorDB (core), FalkorDB Cloud, FalkorDB Enterprise, and the GraphRAG SDK. Name which one an answer applies to, since setup and operations differ.

# GraphRAG SDK

> The most accurate Graph RAG framework. Build knowledge graphs from documents and query them with natural language, on FalkorDB.

**The most accurate Graph RAG framework. Built on [FalkorDB](https://www.falkordb.com/).**

GraphRAG SDK builds knowledge graphs from documents and answers questions over them using graph-based retrieval-augmented generation. Every pipeline step is a swappable strategy behind an abstract interface.

## Key Highlights

* **#1 on GraphRAG-Bench** — 66.09 ACC on Novel and 76.87 on Medical ([benchmark](/graphrag/benchmark))
* **Simple API** -- `ingest()` + `completion()` with sensible defaults
* **100+ LLM providers** via LiteLLM (OpenAI, Azure, Anthropic, Cohere, Ollama, and more)
* **Fully modular** -- swap chunking, extraction, resolution, retrieval, and reranking strategies
* **Production-ready** -- async-first, connection pooling, circuit breaker, batched writes
* **Full provenance** -- every answer traces back to its source document and chunk

## Quick Start

```bash theme={null}
pip install graphrag-sdk[litellm]
docker run -p 6379:6379 falkordb/falkordb
```

```python theme={null}
import asyncio
from graphrag_sdk import GraphRAG, ConnectionConfig, LiteLLM, LiteLLMEmbedder

async def main():
    async with GraphRAG(
        connection=ConnectionConfig(host="localhost", graph_name="my_graph"),
        llm=LiteLLM(model="openai/gpt-4o"),
        embedder=LiteLLMEmbedder(model="openai/text-embedding-3-small"),
    ) as rag:
        await rag.ingest("my_document.pdf")
        await rag.finalize()
        answer = await rag.completion("What is the main topic?")
        print(answer.answer)

asyncio.run(main())
```

## Next Steps

* [Getting Started](/graphrag/getting-started) -- Full tutorial from install to first query
* [Architecture](/graphrag/architecture) -- How the 9-step pipeline works
* [Strategies](/graphrag/strategies) -- All swappable strategy ABCs and built-in options
* [Ontology Discovery](/graphrag/ontology-discovery) -- Auto-draft a schema from a corpus (`method="llm"` or `method="grounded"` with DBpediaCatalog)
* [Ontology Evolution](/graphrag/ontology-evolution) -- Safely change schema on a populated graph
* [Incremental Updates](/graphrag/incremental-updates) -- `update()`, `delete_document()`, `apply_changes()`, `finalize()`
* [Benchmark](/graphrag/benchmark) -- Methodology and reproduction instructions
* [API Reference](/graphrag/api-reference) -- Full API documentation
