Adding a knowledge graph to your RAG pipeline can make every query far more expensive. On GraphRAG-Bench, Microsoft GraphRAG's global search used about 331,375 tokens per query, against about 879 for vector RAG. A graph saves tokens only when traversal replaces retrieval breadth: you follow a few typed edges and send the model only what it needs.
Our newsletter
Get tutorials, AI agent recipes, webinars, and early product updates in your inbox every two weeks
How much more does graph RAG cost per query?
GraphRAG-Bench (arXiv:2506.05690, June 2025) measured tokens per query for several retrieval methods on the same benchmark:
| Method | Tokens per query |
|---|---|
| Vector RAG | ~879 |
| HippoRAG2 | ~1,020 |
| LightRAG | ~100,832 |
| Microsoft GraphRAG (global search) | ~331,375 |
That's about 377 times more tokens for the best-known graph method. The authors put it plainly: GraphRAG "significantly increases prompt length due to additional steps in knowledge retrieval and graph-based aggregation", which "improves retrieval breadth and organization but leads to inefficiencies due to prompt inflation."
Look at the spread between the graph methods, though. HippoRAG2 costs about the same as vector RAG (~1,020 tokens against ~879), is about 325 times cheaper than GraphRAG global search, and scored better on complex reasoning in the same benchmark. So the question to ask is how your graph retrieval is designed, more than whether you use a graph.
Where do the extra tokens come from?
From breadth. Microsoft Research describes the failure mode of its own global search: it "lacks understanding of the best communities to consider for local queries", so it explores the graph breadth first, whether or not a part of the graph is relevant to the question (LazyGraphRAG).
Can a graph cut tokens instead?
Yes, when the retrieval is built for it. Two results from 2024 and 2025:
LazyGraphRAG (Microsoft Research, November 2024) moves the LLM summarisation from indexing time to query time. Indexing costs the same as vector RAG, which is 0.1% of full GraphRAG's indexing cost. For global queries, it reports "comparable answer quality to GraphRAG Global Search ... but more than 700 times lower query cost". At a moderate budget it used 4% of global search's query cost and outperformed the other methods it was compared with, on both local and global queries.
TERAG (arXiv:2509.18667, September 2025) goes after the other side of the bill: the LLM tokens spent building the graph. It reaches "at least 80% of the accuracy of widely used graph-based RAG methods while consuming only 3%-11% of the output tokens", and ranks the graph with Personalized PageRank at retrieval time (the approach HippoRAG uses).
Both are graph methods, and both save by doing less LLM work. LazyGraphRAG shows where the query-time savings come from: deciding which part of the graph to read before reading it. Precision is the mechanism, and fewer tokens and better answers both follow from it.
What does precise traversal look like in SurrealDB?
It's one query that walks typed edges, applies your filters at every hop, and returns the small set of records the model needs. I measured this in Multi-hop graph traversal inside SurrealDB, on a synthetic knowledge graph:
LET $ctx = ($seed.{1..3+collect}
->related_to[WHERE relation_type IN $types AND confidence >= $min_conf]
->entity[WHERE kb = $kb AND active = true]
).distinct();Three hops from the seed reach 512 nodes. With the predicates inside the walk, the query returns 14 entities. That set is small enough to hand to a language model, and the unpruned one never was.
The same post compares this with breadth-first search written in application code, a loop that fetches one hop at a time:
| Application-side BFS | Server-side traversal | |
|---|---|---|
| Round trips | 6 | 1 |
| Bytes returned | ~4,900 | 241 |
Both return the same 14 entities (this Python script checks this before it prints anything, and you can run it yourself). I measured bytes returned to the application, not tokens. In that benchmark the loop filters client-side (in Python), so the extra bytes never reach a model. When an agent walks the graph itself it is less efficient because there's one tool call per hop: then every frontier it pulls lands in its context, and you pay for it again at each later step.
Usually you don't know where to start the walk, only the question. The vector index lives in the same database as the graph, so the seed lookup and the expansion can be one query (Step 8 of the traversal post). I haven't measured end-to-end token counts for a full graph RAG pipeline on SurrealDB, so treat the numbers above as the direction of the effect.
When is a graph the wrong tool?
When your questions are simple fact lookups. In GraphRAG-Bench, graph methods scored worse than vector RAG on simple fact retrieval (60.92% for vector RAG, 49.29% to 60.14% for the graph methods). They did better on multi-hop reasoning (+10.45 points) and contextual summarisation (+13.10 points).
So, before you add a graph, sort a sample of your real questions by type and measure three things for each type:
tokens per query (input and output),
accuracy against an answer you trust,
indexing cost, including the LLM calls it takes to build the graph.
If most of your questions are single facts, vector or full-text search may be enough. If they need several hops, or the answer depends on how things are connected, a graph can help, but only with retrieval that is built to read less.
Summary
The best-known graph RAG method spends about 377 times more tokens per query than vector RAG. Graph designs built to do less LLM work, like LazyGraphRAG and TERAG, cut that cost sharply. The savings come from precise retrieval, so measure tokens and accuracy per question type before and after you add a graph. In SurrealDB, you can filter on every hop of a traversal, so the model sees the few entities that matter rather than everything the graph can reach.
Get started
Take one retrieval path that returns too much, and rewrite it as one filtered traversal.