GraphRAG

GraphRAG


Chunk-based retrieval has a blind spot. Ask "what themes run through these two hundred support tickets" and no single chunk contains the answer, because the answer only exists across the whole set. Vector search returns the ten chunks closest to the question and none of them help.

GraphRAG builds an intermediate structure first. An indexing pass reads the corpus, extracts entities and the relationships between them, and assembles a graph. Community detection then groups tightly connected regions of that graph, and the model writes a summary of each community. Those summaries become their own retrievable layer.

A local question still walks the graph from the relevant entity outward. A global question reads the community summaries instead, which is how the method answers corpus-wide questions that chunk retrieval cannot reach.

The trade is indexing cost. Extracting entities from every document means running a model over the entire corpus once, which is far more expensive than embedding it. Refreshing the graph when documents change is also more involved, so GraphRAG suits stable corpora better than fast-moving ones.

From generative AI strategy to custom agent development and retrieval architectures, we help you scale AI responsibly.
Discuss your AI project