Skip to content

Vector Search, Knowledge Graphs, and GraphRAG: When to Use Which

"Should we use a knowledge graph?" is usually asked as if it replaced vector search. It does not. They answer different kinds of questions, fail in different ways, and cost different amounts to maintain. The useful question is which questions your assistant must answer, and which structure answers them cheaply.

What each one is good at

Vector search embeds text and returns the passages closest in meaning to a question. It needs no schema, handles messy prose well, and is forgiving of vocabulary mismatch ("sign in" finds "authentication"). Its blind spot is that a retrieved chunk arrives with no awareness of what it connects to.

A knowledge graph stores entities and typed relationships explicitly (REQUIRES, COVERS, BELONGS_TO). It answers questions by following edges, so it is strong where the answer depends on structure: prerequisites, versions, ownership, coverage. Its cost is modeling and curation: someone has to decide what the types and relationships mean.

GraphRAG combines them. Use vectors or keywords to find an entry point, then traverse the graph to pull in the connected context the answer depends on. A question about one topic returns that topic plus the prerequisites and neighbours it cannot be understood without.

flowchart LR
  Q([Question]) --> E["Embed + search<br/>find entry chunks"]
  E --> T["Traverse graph<br/>prerequisites, related, same product/version"]
  T --> C["Assemble context<br/>connected, deduplicated"]
  C --> L["LLM answer<br/>with citations"]

Side by side

Vector search Knowledge graph GraphRAG
Finds Passages similar in meaning Entities and their relationships Similar passages plus connected context
Best for Open-ended "how do I...?" over prose Prerequisites, dependencies, versions, coverage Questions whose answer spans several linked topics
Needs Chunking and embeddings An ontology and curated edges Both
Explains itself Weakly (a similarity score) Strongly (the path of edges followed) Partly (the path plus the entry match)
Fails when The answer is spread across chunks that do not look alike The graph is incomplete or the question has no modeled edge Traversal pulls in too much, or the graph is stale
Upkeep Re-embed on change Maintain nodes, edges, and rules Both

A worked contrast

Ask a documentation assistant about vector search.

Flat retrieval returns one topic: Vector Search. The model never learns that you cannot use it before authenticating and connecting a data source.

Graph-assisted retrieval starts from the same topic and follows REQUIRES edges. It returns Vector Search together with API Authentication, Connect a Data Source, Create an Account, Installation Guide, Querying Data, and System Requirements. Nobody wrote that sequence; it was derived from individual prerequisite links. (The runnable version is knowledge-graphs-for-ia.)

Decision checklist

Answer these about the questions your users and agents really ask.

  1. Do answers depend on order? Setup, migration, and troubleshooting often do. If yes, you need explicit prerequisite edges.
  2. Do answers depend on version or product scope? If a wrong-version answer is costly, scope retrieval with metadata, and model version relationships rather than hoping similarity sorts it out.
  3. Do you need to explain the answer's provenance? Following edges gives an auditable path. Similarity scores do not.
  4. Do you need governance queries? "Which concepts are covered by only one topic?" is a query on a graph and a manual audit otherwise.
  5. Is the content mostly independent, self-contained passages? If so, good chunking and metadata may be all you need, and a graph adds cost without payoff.
  6. Can you staff the modeling? A graph nobody maintains drifts, and a stale edge is worse than no edge.

If you answered yes to 1 through 4, a graph layer is likely worth it. If only 5 applies, start with better chunking.

Limits worth stating plainly

  • A graph does not fix bad content. If the underlying topics are thin or contradictory, traversal faithfully retrieves thin and contradictory topics.
  • Traversal can over-retrieve. Pulling every neighbour floods the context window. Limit depth, weight edge types (a REQUIRES edge matters more than a loose "related" one), and deduplicate.
  • Edges need an owner. Decide who may add a relationship and what it means. This is information architecture work, not a data-science side project.
  • Neither approach removes the need to measure. Whether the graph helped is an empirical question; see Evaluating Graph Retrieval.
  • Scale is rarely the first problem. A small, correct graph beats a large, vague one.

A pragmatic path

  1. Start with metadata-scoped vector retrieval and clean chunks.
  2. Add one high-value edge type, usually REQUIRES, for a single product area.
  3. Add a validation layer so edges cannot be malformed. (See From Taxonomy to Knowledge Graph for when OWL, SHACL, and SPARQL pay off.)
  4. Measure retrieval with and without graph expansion on the same question set.
  5. Expand only where the measurements justify it.

Takeaway

Vectors find what sounds like the question. Graphs know what the answer depends on. Most real assistants need both, in that order: find the entry point by meaning, then walk the relationships that give it context. Add the graph where structure carries the answer, and prove the benefit before you scale it.