A pure vector database answers one kind of question well: "find me chunks that are semantically similar to this query." It struggles with a different kind of question: "what connects entity A to entity B, three hops away?" That second kind of question is where graph databases earn their place in a RAG stack — not as a wholesale replacement for vector search, but as a complementary retrieval path for relationship-heavy queries.
Why Vector-Only Retrieval Breaks Down on Multi-Hop Questions
Standard vector RAG retrieves whichever text chunks are closest to the query embedding. That works for "what does the return policy say about damaged items?" It works far worse for "which vendors used by our EU subsidiary are also flagged in the Q3 compliance report?" — an answer that requires traversing relationships (vendor → subsidiary → report) rather than finding one chunk that happens to mention all three. A vector index has no native concept of "connected to"; a graph database's entire structure is built around exactly that.
How a Graph Database Actually Executes This
Modern graph databases don't force an either/or choice anymore. Neo4j, for example, supports native vector indexes alongside its normal graph structure. Per Neo4j's own Cypher Manual, you create one with:
// Create a vector index on an embedding property, alongside the graph itself
CREATE VECTOR INDEX docEmbeddings IF NOT EXISTS
FOR (d:Document)
ON d.embedding
OPTIONS { indexConfig: {
`vector.dimensions`: 1536,
`vector.similarity_function`: 'cosine'
}}
The payoff is a single query that combines vector similarity with relationship traversal — something a standalone vector database has no mechanism for at all:
// Find documents semantically similar to a source doc, then read their graph properties
MATCH (source:Document {id: 'doc_42'})
MATCH (d:Document)
SEARCH d IN (
VECTOR INDEX docEmbeddings
FOR source.embedding
LIMIT 5
) SCORE AS score
RETURN d.title, d.plot, score
The Realistic Trade-off
Graph traversal queries carry more setup cost than dropping documents into a vector store: you have to model your data as entities and relationships first, which is real modeling work a pure vector pipeline skips entirely. The current consensus among vendors and researchers isn't "graph replaces vector" — it's a routing decision. The majority of everyday semantic queries (a support ticket search, "find similar documents") are still served faster and more simply by vector search alone. Graph retrieval earns its added complexity specifically for the minority of queries that are genuinely about relationships — compliance chains, org charts, citation networks, medical symptom-to-treatment pathways — where "how are these connected" is the actual question being asked, not "which text looks similar."
| Query Type | Better Fit | Why |
|---|---|---|
| "Find documents like this one" | Vector database | Pure semantic similarity, no relationship structure needed |
| "What connects X to Y across N steps?" | Graph database | Requires traversing explicit relationships, not just similarity |
| "Similar docs, filtered by who wrote them and what they cite" | Graph DB with native vector index (e.g. Neo4j) | Combines similarity search with relationship filtering in one query |
Practical Challenge
Sketch out (on paper, no code needed) which of your last 10 real search queries were "find similar" questions versus "how are these connected" questions. Most people find the split is heavily lopsided toward vector-style queries.
Concept Check
Sources & Further Reading
- Neo4j Cypher Manual — Vector Indexes — official syntax for creating a native vector index in Neo4j and combining it with graph traversal via the
SEARCHclause. - Knowledge graph vs. vector database for RAG (Meilisearch) — comparison of when multi-hop/relationship queries favor graph retrieval over vector-only retrieval.
AI