Graph retrieval

GraphRAG explained: what it is, what it costs and when it beats vector search

What Microsoft’s GraphRAG does, how its indexing and query modes work, the cost warning in its own documentation, and how it differs from the company brain’s directory graph.

GraphRAG is Microsoft’s open-source approach to retrieval-augmented generation that builds a knowledge graph from your documents, groups it into communities and summarises each one. It is aimed at questions about a whole corpus, such as its main themes, which plain vector search handles poorly. The cost is heavy indexing work with a language model. The Swfte company brain is a different thing: a graph of the organisation built from directory sources, not from documents.

Last verified 2026-10-07. Sources are listed at the end of the page.

What is GraphRAG?

Microsoft’s documentation defines GraphRAG as “a structured, hierarchical approach to Retrieval Augmented Generation (RAG), as opposed to naive semantic-search approaches using plain text snippets.”

The research paper behind it, “From Local to Global: A Graph RAG Approach to Query-Focused Summarization” by Edge and colleagues, first appeared on arXiv on 24 April 2024 and was revised on 19 February 2025. It starts from a limit of conventional RAG: global questions about an entire corpus, such as “What are the main themes in the dataset?”, are summarisation tasks, not retrieval tasks. The authors report substantial improvements over a conventional RAG baseline in the comprehensiveness and diversity of answers, on datasets reaching 1 million tokens. Those are the authors’ results on their own datasets.

How does GraphRAG index a corpus?

The indexing pipeline, as Microsoft describes it, runs a language model over every part of the input.

  1. Slice into text units

    The corpus is split into TextUnits, the analysable units for the rest of the process.

  2. Extract entities, relationships and claims

    A language model reads each text unit and extracts the entities, the relationships between them and key claims. This is the step that makes the graph.

  3. Detect communities

    The graph is clustered hierarchically using the Leiden technique, so closely connected entities form communities at several levels.

  4. Summarise communities

    A summary, or report, is generated for each community and its constituents from the bottom up. Global search later reads these.

  5. Embed text

    The pipeline embeds text into vector space and writes the embeddings to the configured vector store. Other outputs are stored as Parquet tables by default.

What are local, global, DRIFT and basic search?

Microsoft’s query documentation names four modes. The descriptions below follow its wording.

ModeHow Microsoft describes itSuits
GlobalReasons about questions on the corpus as a whole by using the community summaries. Works in a map step over report chunks and a reduce step that aggregates the key points.Questions about the whole corpus: themes, patterns, overall positions.
LocalReasons about specific entities by fanning out to their neighbours. Starts from entities semantically related to the question and gathers linked text units, relationships and community reports.Questions about a named thing and what surrounds it.
DRIFTSimilar to local search, with the added context of community information.Entity questions where the wider community matters.
BasicStandard top-k vector search.Questions answered by one or two passages.

What does GraphRAG indexing cost?

Microsoft’s own Getting Started page opens with a warning that GraphRAG “can consume a lot of LLM resources”, and it strongly recommends starting with the tutorial dataset until you understand how the system works. The page also suggests trying fast, inexpensive models first.

Query time has a cost too. The global search documentation says lower hierarchy levels, with their detailed reports, tend to give more thorough responses but may increase the time and LLM resources needed, because of the volume of reports.

This page gives no dollar or token figure for indexing. The Microsoft pages read on 2026-10-07 did not publish one for a typical corpus, and the cost depends on your corpus size, the model and the prompts. Run the tutorial dataset, read the token usage it reports, and extrapolate with care.

When does graph retrieval beat vector retrieval, and when does it not?

This is our reading of Microsoft’s documentation and paper, not a benchmark. Test it on your own questions.

Question typeVector retrievalGraphRAG
What are the main themes across this set of reports?Retrieves a few passages and misses the overall picture.The case the paper targets: global search reads community summaries covering the corpus.
How do these people, projects and decisions connect?Finds passages that mention each one, but not the links.Local search follows relationships from the entity outward.
What does section 4 of this policy say about leave?Answered by one passage. Basic search is enough.Adds indexing cost with little for the graph to do.
What changed since last month?Possible if the index is updated and documents carry dates.The pages read today did not state how re-indexing of changed documents is handled, so check the current documentation before relying on it.
Who owns this system, and who approves changes?A document may say, and may be out of date.A graph built from directory data answers it directly. See the section below on the company brain.

How should you decide whether to try GraphRAG?

  1. List the questions

    Write 20 real questions. Mark each as a lookup, a link between things or a whole-corpus question. If almost none are whole-corpus questions, stop here.

  2. Measure the baseline

    Run those questions through plain vector or hybrid retrieval and score the answers. See the RAG pipeline for what to log.

  3. Run the tutorial dataset

    Follow Microsoft’s advice and index the sample data first. Microsoft documents the install as a pip install of the graphrag package.

  4. Compare on a small slice of your corpus

    Index a small part of your own data with an inexpensive model. Compare the answers and the token usage against the baseline.

  5. Check permissions

    A community summary mixes text from many documents. Decide how it respects the access of each source document before any shared use, because the summary can repeat content a reader may not be allowed to see.

Where Swfte fits: the company brain is a graph, but not a GraphRAG index

The company brain is an evidence-backed, time-aware graph of the organisation, built from directory sources: Active Directory and LDAP, Microsoft Entra ID, Okta and Google Workspace, read-only. It holds people, groups, org units and reporting lines, with seven evidence statuses and as-of reads. This is Built, and it is readable through the appliance’s local API.

It is not an LLM-extracted graph of your documents. No entities are pulled out of text, no communities are detected and no community summaries are written. Swfte does not claim GraphRAG support. Document connectors are Roadmap. Search over documents, with per-object access lists and hybrid keyword and vector retrieval, is In progress, and “ask your company” is In progress. Cortex reading the brain is Roadmap.

The two ideas meet at questions such as who owns a system or who approves a change. A graph of people and reporting lines answers those as structured reads, with a status that says how well the fact is evidenced. A GraphRAG index answers questions about what documents say. If you need that second kind, you can run Microsoft’s open-source library yourself, and you do not need Swfte for it. See the knowledge graph for the structure.

Sources and last verified

Every dated or technical fact on this page was read from the pages below on 2026-10-07. Anything that could not be confirmed is left out or marked as not verified.

Frequently asked questions

What is GraphRAG?

GraphRAG is Microsoft’s retrieval-augmented generation approach that uses a language model to extract entities and relationships from documents, clusters the graph into communities with the Leiden technique and writes a summary for each. Queries then use those summaries or graph neighbourhoods instead of plain text snippets.

Is GraphRAG better than vector RAG?

Only for some questions. Its paper targets global questions about a whole corpus, where conventional RAG struggles. For a lookup answered by one passage, Microsoft’s basic search, which is standard top-k vector search, is enough. Decide by running your own questions through both and comparing quality and cost.

Is GraphRAG expensive?

It can be. Microsoft’s Getting Started page warns that GraphRAG can consume a lot of LLM resources and recommends starting with the tutorial dataset and inexpensive models. Indexing runs a language model over the whole corpus. This page states no figure, because the cost depends on corpus size, model and prompts.

What is the difference between local and global search in GraphRAG?

Local search starts from entities related to the question and fans out to their neighbours, text units and community reports. Global search uses the community summaries in a map and reduce process to answer questions about the corpus as a whole. Choose by whether the question is about a thing or about everything.

Does Swfte support GraphRAG?

No. The Swfte company brain is a graph of people, groups and reporting lines built from directory sources, with evidence statuses. It does not extract entities from documents or build community summaries. Document search is in progress and uses keyword and vector retrieval, not a GraphRAG index.

Can I use GraphRAG on documents with different access rights?

Only with care. Community summaries combine text from many documents, so a summary can contain content that some readers may not open in the source system. Decide how summaries inherit the access of their sources, or restrict the index to material every reader may see. The Microsoft pages read here do not address this.

Tell us which questions you need answered and we will say which retrieval fits.

Centralise your knowledge in Cortex

The desktop AI workspace: 20+ providers, local models, knowledge bases with RAG that cite their sources, MCP tools and agents, with sensitive work staying on the laptop by default.