{"slug": "graphrag-vs-rag-the-difference-is-the-question-not-the-accuracy", "title": "GraphRAG vs RAG: the difference is the question, not the accuracy", "summary": "A developer benchmarked GraphRAG against vector RAG on a five-chapter corpus using Docker Compose, PostgreSQL/pgvector, DeepSeek for slicing and judging, and a 768-dimension local embedding model, finding the choice hinges on question shape rather than accuracy. The graph pipeline's in-corpus run reached 10/12 strict hits and 95.8% combined lexical recall across 12 questions, with cross-community Map-Reduce queries scoring 100% map recall and 80-100% reduce recall. GraphRAG answers multi-hop and corpus-level questions that vector top-k can only sample, but costs extraction tokens at build time, longer builds and slower queries.", "body_md": "**Vector RAG retrieves the passages most similar to the question. GraphRAG retrieves entities and relationships, then answers from the connections between them.** The first is better for \"what does this document say about X\". The second is what you need for \"how is X connected to Y\" and \"what does the whole corpus say\", and it costs an extraction pass, a graph, and latency to get there.\n\nMost comparisons stop at accuracy. This one starts with what each pipeline builds, then what it costs, then which questions each one can answer at all — because in practice the choice is made on question shape, not on a points difference.\n\n|  | Vector RAG | GraphRAG | \n|---|---|---|\n| Build | chunk → embed → store vectors | chunk → LLM extracts entities, relationships, claims → graph + communities + summaries | \n| Retrieve | top-k by vector similarity (often + keyword BM25) | entity/topology recall → hybrid vector/keyword/graph → community scoring → optional Map-Reduce over summaries | \n| Answer unit | a passage | a claim with its source, plus the entities it connects | \n| Fails when | the answer is spread across documents, or needs a hop | the corpus has no entity structure worth extracting (see the cost section) | \n| Cost profile | one embedding pass, cheap to rebuild | extraction tokens at build time, longer builds, slower queries | \n\nThe important line is \"answer unit\". A vector chunk tells you what a passage says; it does not tell you *which entity the passage is about* in a way you can filter, group or walk. That is the whole difference, and everything else follows from it.\n\nFrom the [graphrag-ts MCP benchmark](https://github.com/sadofriod/graphrag-ts/blob/main/examples/output/final-benchmark-report.en.md), a five-chapter corpus (Alice chapters I and VII, Frankenstein chapters 5, 12, 13), Docker Compose with PostgreSQL/pgvector, DeepSeek for slicing and judging, a 768-dimension local embedding model:\n\n`query_graph` tool.\nA vector-only index over the same five chapters is an embedding batch measured in seconds, and a query is one ANN lookup plus an LLM call. So the honest summary is: GraphRAG buys you a different class of answer, and you pay for it in build time, query latency, and extraction tokens on every rebuild.\n\nIf your product needs sub-second answers or you re-index hourly, that latency is a design constraint, not a detail. It is also the reason incremental builds matter: re-extracting the whole corpus on every edit is where GraphRAG projects die. The write-up for that is [GraphRAG incremental build in TypeScript](https://blog.ashesborn.cloud/blog/graphrag-incremental-build-in-typescript-diffing-updates-and-pruning).\n\n**1. Multi-hop questions.** \"Which suppliers of the company that was acquired in 2023 also appear in the 2024 filing?\" A vector index returns passages containing each of those words; the join happens in your prompt, if it happens at all. A graph performs the join as a traversal, and the evidence for each hop stays attached.\n\n**2. Corpus-level questions.** \"What are the main risks discussed across these 40 documents?\" Vector top-k can only return k passages out of 40 documents, so the answer is a sample. GraphRAG's community summaries exist to answer exactly this: map over summaries, reduce into one answer. In the same benchmark, the two cross-community Map-Reduce queries scored 100% map entity/phrase recall, with final reduce recall of 80% and 100% on the two runs.\n\n**3. Evidence you can audit.** In the benchmark, the in-corpus run reached **10/12 strict hits** and **95.8% combined lexical recall** over 12 questions, and every returned result carries the source excerpt it came from. If the product promise is \"every claim points at its page\", the graph is not decorative — it is how you know which claim belongs to which document.\n\n| Question you need to answer | Start with | \n|---|---|\n| \"What does this document say about X?\" | vector RAG | \n| \"Find the passage that mentions X\" | vector RAG (+ keyword) | \n| \"How is X connected to Y in this corpus?\" | GraphRAG | \n| \"What are the main themes across all documents?\" | GraphRAG (community summaries / Map-Reduce) | \n| \"Answer with the exact page each claim came from\" | GraphRAG, claims with anchors | \n| \"Answer in under a second\" | vector RAG | \n| \"We re-index every hour\" | vector RAG until incremental builds are proven | \n\nA hybrid is legitimate and often correct: graph for recall and evidence assembly, vector for the first-pass similarity filter. That is what the pipeline in this blog does — entity and topology recall first, hybrid vector/keyword evidence second, RRF to fuse the ranks.\n\nI have **not** run the same 12 questions through a vector-only stack, so I will not quote a points difference between the two. The benchmark numbers above describe how one GraphRAG implementation behaves on one small corpus, with lexical entity and ordered-phrase matching as the recall measure — not human semantic grading, and not a cross-project comparison. Anyone quoting a single accuracy gap between \"RAG\" and \"GraphRAG\" across corpora is quoting a corpus, a judge, and a prompt.\n\nWhat the numbers do support: the latency and build costs are real, the corpus-level and multi-hop shapes are the ones graph retrieval is built for, and evidence assembly is a property you get from the data model rather than from the prompt.\n\nBefore committing a rebuild pipeline, do this on your own corpus:\n\nIf you would rather have this built and measured than run it yourself, that is [retrieval engineering](https://ashesborn.cloud/services/retrieval-engineering); the implementation, in order, is [the GraphRAG-in-TypeScript series](https://blog.ashesborn.cloud/blog/graphrag-in-typescript-the-series-index).", "url": "https://wpnews.pro/news/graphrag-vs-rag-the-difference-is-the-question-not-the-accuracy", "canonical_source": "https://dev.to/sadofriod/graphrag-vs-rag-the-difference-is-the-question-not-the-accuracy-2hig", "published_at": "2026-11-21 04:34:09+00:00", "updated_at": "2026-11-21 04:41:54.338587+00:00", "lang": "en", "topics": ["large-language-models", "ai-agents"], "entities": ["GraphRAG", "graphrag-ts", "PostgreSQL", "pgvector", "DeepSeek"], "also_reported_by": [], "takeaway": "GraphRAG's in-corpus run hit 10/12 strict hits and 95.8% lexical recall over 12 questions, but vector RAG remains the cheaper choice unless questions need multi-hop joins or corpus-level summaries.", "recommendation": {"advice": "Pick GraphRAG only when questions require multi-hop joins or corpus-wide summaries; otherwise use vector RAG, since extraction tokens and query latency are paid on every rebuild.", "playbook": "rag-retrieval", "playbook_url": "https://wpnews.pro/playbooks/rag-retrieval"}, "alternates": {"html": "https://wpnews.pro/news/graphrag-vs-rag-the-difference-is-the-question-not-the-accuracy", "markdown": "https://wpnews.pro/news/graphrag-vs-rag-the-difference-is-the-question-not-the-accuracy.md", "text": "https://wpnews.pro/news/graphrag-vs-rag-the-difference-is-the-question-not-the-accuracy.txt", "jsonld": "https://wpnews.pro/news/graphrag-vs-rag-the-difference-is-the-question-not-the-accuracy.jsonld"}}