GraphRAG
GraphRAG: build a knowledge graph from documents, link the query to entities, retrieve and rank a subgraph, serialise it as context and generate, with retrieval strategies, variants, graph databases, evaluation, use cases and future directions.
Cheat sheet · Offered as a template
In this diagram
- GraphRAG
- Graph-based Retrieval-Augmented Generation
- What is GraphRAG?
- Extends RAG by using knowledge graphs for retrieval and reasoning.
- Captures entities, relationships and context explicitly.
- Enables deeper understanding, connection discovery and better answers.
- Ideal for complex, multi-hop and relationship-heavy queries.
- Core Components
- User Query
- Graph Retriever (Find Relevant Subgraph)
- Retrieved Subgraph
- Context Builder (Serialize Subgraph)
- LLM Generator
- Response
- Graph Retriever : Finds relevant nodes & edges from the graph.
- Context Builder : Converts subgraph into text for LLM.
- LLM Generator : Generates accurate answer with graph context.
- GraphRAG Pipeline
- Raw Documents
- • Entities • Relationships • Attributes • Events
- Information Extraction
- Knowledge Graph
- Graph Construction
- Graph Database
- Indexing
- Retrieve Relevant Subgraph
- Retrieval
- Convert Subgraph to Context (Text)
- Augmentation
- LLM (Generate Answer)
- Generation
- Documents (PDF, DOC, …)
- LLM / NLP Extraction • Entity Recognition • Relation Extraction • Attribute Extraction
- Knowledge Graph ● Entity (Person) ● Entity (Org) ● Entity (Concept) — Relationship ● Attribute / Value
- Query in GraphRAG
- Entity Linking (Map to Graph)
- Subgraph Retrieval (Multi-hop Expansion)
- Rank & Filter (Subgraph Selection)