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

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