Graph RAG
Graph RAG builds a knowledge graph from the corpus during ingestion — entities, relationships, facts — and retrieves via graph traversal alongside vector search, improving recall on relational queries.
Standard vector RAG retrieves chunks by similarity. Graph RAG (popularised by Microsoft GraphRAG and Anthropic's contextual retrieval evolutions in 2024-2026) adds a knowledge graph built during ingestion: entities (people, products, concepts), relationships (X works at Y, X subsumes Y), and propositions. Retrieval traverses the graph for relational context plus standard vector search. Empirically beats vector-only RAG on questions that require multi-hop reasoning ("Which products use the same supplier as X?"). Cost trade-off: graph construction is expensive (LLM-driven), and graph storage adds ops. Worth it for high-value relational corpora.
When to use graph rag
- Corpora with rich relational structure (org charts, supply chains, scientific literature).
- Multi-hop questions where standard RAG fails.
Common mistakes
- Building a graph for corpora where flat chunks would suffice — cost without benefit.
- Skipping the standard vector retrieval — graph alone misses semantic similarity.
FAQ
What is graph rag?
Graph RAG builds a knowledge graph from the corpus during ingestion — entities, relationships, facts — and retrieves via graph traversal alongside vector search, improving recall on relational queries.
When should I use graph rag?
Corpora with rich relational structure (org charts, supply chains, scientific literature). Multi-hop questions where standard RAG fails.
What are the most common mistakes with graph rag?
Building a graph for corpora where flat chunks would suffice — cost without benefit. Skipping the standard vector retrieval — graph alone misses semantic similarity.
Related terms
- Retrieval-augmented generation (RAG) — Retrieval-augmented generation (RAG) injects relevant documents into the prompt at query time so the model answers from your data instead of its training memory.
- Embeddings — Embeddings are dense numeric vectors that represent the meaning of text, images, or other data, allowing similarity to be measured as vector distance.
- Contextual retrieval — Contextual retrieval prepends a chunk's surrounding context (document title, section, summary) to each chunk before embedding, dramatically improving retrieval relevance on long documents.
- Multimodal RAG — Multimodal RAG retrieves images, audio, video, or tables alongside (or instead of) text, embedding each modality with a compatible encoder so they can be searched and ranked together.
Last updated: 2026-06-01. Raw markdown: https://promtable.com/glossary/graph-rag.md.