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

# Graph RAG

> Graph-based retrieval augmented generation

# Graph RAG

Graph RAG combines knowledge graphs with retrieval augmented generation for complex queries.

## Quick Start

```typescript theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
import { createGraphRAG, GraphStore } from 'praisonai';

const graphRag = createGraphRAG({
  llm: 'openai/gpt-4o-mini',
  graphStore: new GraphStore()
});

// Add documents
await graphRag.addDocument('TypeScript is a typed superset of JavaScript.');

// Query with graph context
const result = await graphRag.query('What is TypeScript?');
```

## Configuration

```typescript theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
interface GraphRAGConfig {
  llm?: string;
  graphStore: GraphStore;
  verbose?: boolean;
}
```

## Capabilities

* Build knowledge graphs from documents
* Query relationships between entities
* Combine graph traversal with vector search
* Extract entities and relationships
* Support complex multi-hop queries

## CLI Usage

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai-ts graph-rag info --json
```
