StackLift
All terms

Glossary

GraphRAG

RAG that retrieves through a knowledge graph to answer multi-step and whole-corpus questions.

GraphRAG is a form of retrieval-augmented generation that builds or uses a knowledge graph of entities and relationships, and retrieves by following those links in addition to matching text. It helps with questions that span several documents or ask for a broad summary, where standard vector RAG tends to return isolated passages.

The usual flow extracts entities and relationships from your documents, stores them as a graph, and at question time combines graph traversal with vector search. Some versions also group the graph into communities and summarize each one, which supports questions about the whole collection.

GraphRAG takes more work to build and keep current than standard RAG, because the graph has to be extracted, checked and updated. Most teams start with vector RAG and add a graph only for the questions it cannot answer.

Start in 60 seconds

Put this to work on your project.

Get an AI-assisted, architect-reviewed scope, cost range, and timeline. Free, no login.

The complete guide

GraphRAG: the complete guide

Updated November 18, 2026 ยท Published by , Founder, StackLift AI. Written with AI assistance; how we make content.

Short answer

GraphRAG is retrieval-augmented generation that retrieves through a knowledge graph of entities and relationships, not only through text similarity. It helps with questions that connect several documents or ask for a summary of a whole collection, where standard vector RAG tends to return isolated passages.

What is GraphRAG?

Standard RAG splits documents into chunks, turns each chunk into an embedding and, at question time, fetches the chunks closest in meaning to the question. That works well when the answer sits in one or two passages.

GraphRAG adds a knowledge graph: a map of the entities in your documents (people, products, contracts, systems, places) and the relationships between them. At question time the system can follow those links, so it can answer questions such as which suppliers are connected to this delayed part, or what are the main themes across all of these reports.

The term became popular after Microsoft Research described a graph-based approach to answering questions about whole text collections. Since then it has become a family of techniques, not a single product.

Why does GraphRAG matter?

Vector search finds passages that sound like the question. It does not know that a clause in one contract amends a clause in another, or that three incident reports describe the same root cause. When the answer depends on connections, a list of similar passages leaves the language model to guess how they relate.

  • Multi-hop questions: the answer needs facts from several documents joined together.
  • Global questions: what are the main risks across this whole archive, which a few top passages cannot answer.
  • Explainability: a path through the graph shows why an answer was given.
  • Disambiguation: two people with the same name are separate nodes, not one blur of text.
  • Structured and unstructured data together: database records and documents linked in one view.

If your users mostly ask lookup questions, you may not need any of this. The value shows when questions are about relationships and patterns.

How does GraphRAG work, step by step?

  1. Prepare the documents: clean, split into chunks and keep source references.
  2. Extract entities and relationships from each chunk, often with a language model guided by a schema you define.
  3. Resolve duplicates, so that the same company written three ways becomes one node.
  4. Store the graph in a graph database or a relational store, alongside vector embeddings of the text.
  5. Optionally detect communities of closely linked nodes and write a summary of each, which supports whole-collection questions.
  6. At question time, find the starting entities, traverse the graph, and combine the results with vector and keyword search.
  7. Give the retrieved facts and passages to the language model, and ask it to answer with citations.
  8. Update the graph as documents change, and test that the answers stay correct.

Steps two and three decide quality. A graph full of wrong or duplicated links gives confident wrong answers, which is worse than missing links.

What kinds of GraphRAG approaches exist?

Common approaches
ApproachWhat it isBest for
Local graph retrievalStart from entities in the question and read their neighborsSpecific questions about connected things
Community summariesGroup the graph into clusters and summarize eachBroad questions across a whole collection
Graph plus vector hybridCombine graph traversal with vector and keyword retrievalGeneral production use
Existing graph, query by language modelA model writes graph queries (Cypher, SPARQL) against a graph you already haveCompanies with a curated enterprise graph
Lightweight entity linksStore entity tags on chunks and expand through shared tagsA cheap first step without a full graph database

The lightweight option is underrated. Tagging chunks with entities and following shared tags gets some of the benefit with far less machinery.

GraphRAG vs. standard RAG: which do you need?

Standard RAG and GraphRAG compared
PointStandard (vector) RAGGraphRAG
Good atFinding passages that match the questionConnecting facts across documents and summarizing collections
Setup effortLower: chunk, embed, retrieveHigher: extract, resolve, store and maintain a graph
Indexing costEmbedding callsMany more model calls to extract entities and relationships
UpdatesRe-embed changed documentsUpdate chunks, nodes and links, and re-check summaries
ExplainabilityShows the passages usedShows passages and the path through the graph
Typical riskMisses connectionsWrong or stale links

Most teams should start with vector RAG plus hybrid search and reranking. Add a graph only for the question types they cannot answer. The RAG implementation playbook shows how to find those gaps with a test set.

What are real-world examples of GraphRAG?

  • A legal team asks which agreements contain a clause that conflicts with a new regulation, across amendments and side letters.
  • A manufacturer traces a part defect through suppliers, batches, machines and service tickets.
  • A financial services firm maps companies, owners and counterparties to answer exposure questions during due diligence.
  • A healthcare operations team links policies, procedures and forms so staff can find everything affected by a policy change.
  • A software company connects services, owners, incidents and runbooks so an assistant can answer who depends on this API.
  • A research group summarizes themes across a large archive of interview notes.

Each example has two things in common: many documents, and questions about how things connect.

Notice also what the user gets back. Instead of five similar paragraphs, they get an answer that names the entities involved, states how they relate and points to the source passages for each link. That structure is what makes the answer checkable, and checkable answers are what regulated and high-stakes teams need before they trust an assistant with real work.

When is GraphRAG not the right choice?

A graph earns its cost only when connections carry the answer. If your content is a set of independent articles, such as help-center pages or product manuals, and users ask about one topic at a time, vector search with a reranker will serve them well. Building a graph there adds an expensive layer that nobody will notice.

  • Your documents change constantly and a stale link is worse than no link.
  • You cannot define the entity types that matter, so extraction would be guesswork.
  • Your questions are mostly lookups, definitions or how-to steps.
  • You lack a test set, so you could not tell whether the graph improved anything.
  • Source permissions are complex and not yet modeled, which makes graph traversal risky.

In these cases, improve chunking, add keyword search and reranking, and revisit the graph later. See chunking for the first place most retrieval quality is won or lost.

What tools and technologies are used?

Common building blocks
LayerExamples
Graph databasesNeo4j, Amazon Neptune, Memgraph, ArangoDB
Relational and vector storesPostgreSQL with pgvector, Elasticsearch, Qdrant, Weaviate
Extraction modelsClaude, GPT and Gemini models, or fine-tuned smaller models
FrameworksLlamaIndex, LangChain and LangGraph, Microsoft's open-source GraphRAG project
EvaluationTest question sets, human review and model graders

You do not always need a dedicated graph database. For a modest graph, relational tables with join queries in PostgreSQL can be enough, and they keep your stack smaller. See vector database vs. pgvector for the related trade-off.

How do you adopt GraphRAG sensibly?

  1. Write twenty or more real questions users ask, and mark which need connections or summaries.
  2. Build standard hybrid RAG and score it on those questions.
  3. Look at the failures. If they are about missing connections, a graph is justified.
  4. Define a small schema of entity and relationship types that matter, not everything that could be extracted.
  5. Extract on a sample, review it by hand and fix the rules before running at full scale.
  6. Add graph retrieval next to, not instead of, vector search, and compare scores.
  7. Plan updates and deletions from the start.

Run the comparison on the same questions at each stage, and keep the scores in one place. That record is what lets you decide, with evidence, whether the next layer of complexity is worth adding.

Keeping the schema small is the most useful discipline. A graph with fifty relationship types is hard to extract accurately and harder to maintain.

What are the common GraphRAG mistakes?

Mistakes and fixes
MistakeWhat happensFix
Starting with a graphCost and complexity before any proof of needMeasure standard RAG first
Extracting everythingNoisy graph, slow queries, wrong linksA small schema tied to real questions
No entity resolutionDuplicate nodes split the factsMatch and merge names, with review for edge cases
Ignoring access controlA path through the graph exposes restricted documentsCarry permissions on nodes and chunks, and filter at query time
Never refreshingStale links give outdated answersUpdate on document change and schedule checks
No evaluationImpressive demos, unreliable answersA fixed question set scored on every change

Access control deserves extra care. Graphs make it easy to wander from a permitted document to a restricted one, so permissions must apply to every node and edge you return.

How do you measure whether GraphRAG is working?

Score it against standard RAG on the same question set. Look at answer correctness, whether the answer cites the right sources, and how often it handles multi-document questions that the baseline missed. Also measure the failure you most fear, which is a confident answer built on a wrong link.

Operational signals matter too: indexing time, query latency, cost per question and how long it takes for a document change to show up in answers. Pair these with AI observability so you can trace a bad answer back to the nodes and passages that produced it.

What does GraphRAG mean for cost and timeline?

Compared with standard RAG, the extra effort is in the graph: designing the schema, running extraction over every document with a language model, resolving duplicates, reviewing samples and keeping everything in sync as content changes. Indexing can need many more model calls than embeddings alone, so volume matters.

Ongoing cost comes from re-extraction, storage, queries and the engineering time to maintain it. See LLM pricing for model costs and AI LLM integration cost for project ranges. The free estimate scopes retrieval work feature by feature.

How StackLift approaches GraphRAG

StackLift begins with discovery and an architect-reviewed scope that tests whether a graph is needed. The usual path is hybrid RAG first, a question set agreed with you, then a graph for the questions that remain unanswered.

Engineers own the design, agents work on feature branches, and security review, observability and rollback are in the plan from sprint one. See LLM integration and the knowledge graph entry.

Questions people ask

Is GraphRAG better than RAG?

Not always. It is better for questions about connections and whole collections. For simple lookup questions, standard RAG is simpler, cheaper and often just as accurate.

Do I need a graph database for GraphRAG?

No. Many setups use a graph database such as Neo4j, but a modest graph can live in relational tables. Choose based on the size and shape of your graph and your team's skills.

What is the difference between a knowledge graph and GraphRAG?

A knowledge graph is the data structure of entities and relationships. GraphRAG is the technique of using a graph to retrieve context for a language model's answer.

How is GraphRAG built?

Documents are split, a language model extracts entities and relationships, duplicates are merged, and the graph is stored beside vector embeddings. At question time the system searches both.

Is GraphRAG expensive to run?

Building the graph usually needs more model calls than embedding alone, and keeping it current takes engineering time. Start small and measure the benefit before scaling up.

Can GraphRAG reduce hallucinations?

It can help by giving the model connected, sourced facts, but it does not remove hallucination. Citations, checks and human review for high-stakes answers still apply.

Can I use GraphRAG with an existing database?

Yes. Relational data often maps naturally to nodes and edges, and a model can be given tools to query it. Combine it with document retrieval for the unstructured parts.

How do I keep a GraphRAG index up to date?

Track which documents changed, re-extract those, update or remove affected nodes and edges, and refresh any community summaries. Schedule consistency checks, because small errors accumulate.

Sources

Sources and further reading

The standards, rules, research and official documentation this page draws on.