Graph RAG
Graph-based retrieval augmented generation
Graph RAG
Graph RAG combines knowledge graphs with retrieval augmented generation for complex queries.
Quick Start
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
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
praisonai-ts graph-rag info --json