Both [[Vector database]] and [[Graph database]] store [[Data|data]], but they differ on [[Information|information]] they index: - A [[Vector database|vector DB]] indexes **position** - proximity between numerical [[Embedding|embeddings]] of content. - A [[Graph database|graph DB]] indexes **structure** - explicit, typed edges between named entities. The two answer different retrieval questions, and confusing them is the single most common cause of brittle RAG pipelines. > Distance and connectivity are [[Orthogonality|orthogonal]] [[Property|properties]] of [[Data|data]]. ## Comparison | [[Vector database]] | [[Graph database]] | | --- | --- | | ![[Vector database#^question\|]] | ![[Graph database#^question\|]] | | Meaning | Structure | | [[Insight]] | [[Knowledge]] | | ![[Vector database#^definition\|]] | ![[Graph database#^definition\|]] | | ![[Insight - no knowledge.png]] | ![[Knowledge.png]] | | ![[Vector database#^example\|]] | ![[Graph database#^example\|]] | | Finding the nearest neighbours of a query embedding in high-dimensional space. | Traversing edges from a known starting node. Relationships are first-class: typed, queryable, and traversed at constant cost per hop. [^1] | | Near-zero | Heavy [^4] | | ![[Vector database#^limits\|]] | Paid upfront| | ![[Vector database#^what-it-solves\|]] | | ## Example %%Houses example%% ## Hybrid A document on "treatment protocols for Type 2 diabetes" and one on "insulin resistance in adolescents" can sit far apart in embedding space yet be critically connected through a patient who has both conditions. Vector search misses the connection unless the query itself bridges the gap; graph traversal finds it by following an edge. [^2] When similarity wins Vector retrieval is the right default when the answer lives in *the closest existing content*: The strength is **speed of setup**: embed, index, query, no ontology required. [^3] When structure wins Graph retrieval is the right default when the answer requires *combining facts across entities*: Controlled benchmarks show vector RAG accuracy collapsing to near zero when a query involves five or more distinct entities, while graph-based retrieval holds stable past ten - because the connections that span documents are stored explicitly, not inferred from cosine similarity. Graph-based retrieval also outperforms vector RAG roughly threefold on aggregation queries, since traversal can count edges and filter by node properties where similarity search cannot. [^2] ## The cost asymmetry Vector databases have a near-zero cold start: any chunked corpus and any embedding model produces a usable index. Their costs accumulate later - opacity (no explanation of *why* two items are similar), embedding drift on model upgrades, and degraded recall on rare terms, SKUs, or short identifier-like queries. Their costs are paid upfront. The payoff is precision, explainability, and stable performance on the queries vector search silently fails. ## Hybrid approach A graph query returns a *path* - an auditable sequence of nodes and edges that justifies the answer. A vector query returns a similarity score, which is a number without a story. | [[Knowledge]] + [[Insight]] | [[Wisdom]] | | --- | --- | | ![[Insight.png]] | ![[Wisdom.png]] | The frontier is not "pick one" but [[Hybrid retrieval]] - use both at different layers: ![[Hybrid retrieval#^pipeline]] [[graphRAG]] and [[HybridRAG]] are named instances of this pattern; most production systems run some variant of it. The duality is structural: embeddings are good at finding *where to start*, graphs are good at *where to go next*. [^5] [^1]: [Vector database vs. graph database: Understanding the differences - Elastic blog](https://www.elastic.co/blog/vector-database-vs-graph-database) [^2]: [When Vector Search Fails: Why Knowledge Graphs Handle Queries That Embeddings Can't - Tian Pan](https://tianpan.co/blog/2026-04-20-knowledge-graphs-vs-vector-search-retrieval) [^3]: [Knowledge graph vs. vector database for RAG: which is best? - Meilisearch blog](https://www.meilisearch.com/blog/knowledge-graph-vs-vector-database-for-rag) [^4]: [Vector Databases vs. Graph RAG for Agent Memory: When to Use Which - MachineLearningMastery](https://machinelearningmastery.com/vector-databases-vs-graph-rag-for-agent-memory-when-to-use-which/) [^5]: [Knowledge graph vs vector database: how to choose your AI foundation - Glean blog](https://www.glean.com/blog/knowledge-graph-vs-vector-database)