Knowledge graph
Things are nodes; facts are typed edges between them — Acme supplies Northwind, Northwind is based in Rotterdam.
- Explicit, named relationships
- Answers by following links
- Exact and explainable paths
- Needs a schema and extraction
A knowledge graph stores facts as named links between things. A vector database stores text as points in space and finds the nearest ones.
Both are pitched as the memory behind enterprise AI, and they answer very different questions. This guide shows how each one stores information, how a query runs in each, which questions favour which, what Microsoft’s GraphRAG changed, what each costs to build and keep current — and how teams combine them.
Updated · 7 sources
Things are nodes; facts are typed edges between them — Acme supplies Northwind, Northwind is based in Rotterdam.
Each passage becomes a list of numbers from an embedding model; a question finds the passages whose numbers sit closest.
A knowledge graph stores entities and the named relationships between them, and answers by following those links — good for multi-hop questions and explainable paths. A vector database stores embeddings of text and answers by finding the nearest ones — good for finding passages that mean what the question means. In knowledge graph vs vector database, the graph holds structure and the vectors hold meaning, and many RAG systems now use both.
Take one sentence from a supplier contract and store it both ways. The graph keeps who did what to whom; the vector keeps what the sentence is about.
# “Northwind Logistics supplies Arden Packaging
# under contract C-114, governed by Dutch law.”
:NorthwindLogistics :supplies :ArdenPackaging .
:C114 :party :NorthwindLogistics .
:C114 :party :ArdenPackaging .
:C114 :governingLaw :Netherlands .
:NorthwindLogistics :type :Supplier .{
"id": "C-114#p3",
"text": "Northwind Logistics supplies Arden
Packaging under contract C-114,
governed by Dutch law.",
"vector": [0.021, -0.113, 0.087, …],
"metadata": { "doc": "C-114", "page": 3 }
}Sort your real questions on two axes — how precise the relationship is, and whether the answer sits in one place or across the whole corpus — and the right store usually becomes obvious.
A hand-built knowledge graph needs an ontology and people to keep it true. Microsoft Research’s GraphRAG (2024) has a language model extract the graph from the documents instead, then pre-writes summaries of each cluster so that questions about the whole corpus become answerable.
Source documents are cut into text chunks.
An LLM reads each chunk and lists entities and the relationships between them.
Entities become nodes, relationships edges, merged across chunks.
Closely linked groups of entities are detected.
The LLM writes a summary for every group, ahead of any question.
Each summary gives a partial answer; the partial answers are summarised into the final one.
What it fixed, and what it costs. On datasets in the million-token range, the paper reports more comprehensive and more diverse answers than conventional RAG to “global” questions such as the main themes in a dataset. The price is indexing: every chunk passes through an LLM, and a changed document means re-extracting its entities.
The most expensive part of a knowledge graph is not the database — it is deciding what the entities and relationships are, and keeping them true as documents change.
A 2024 study on financial earnings-call transcripts found that combining graph retrieval with vector retrieval beat either one alone. The usual shape: vectors find the way in, the graph supplies the connections.
A Botminds agent does not have to pick one store. It carries many ways to search and chooses per step: by meaning over passages, by exact words, narrowed by labels, or counted in typed records.
Under the same filters, chosen per search — or both for one question. A question is always embedded with the model its library was indexed with.
Stamp a service, a region or a product on every passage, so a search can be narrowed to any mix of them.
Agents count and sum in records with typed filters instead of estimating totals from passages.
List which documents carry a term or a reference, then read their pages or summaries.
Read agentic RAG for every way an agent searches, and AI data modeling for how records and their fields are designed.
In knowledge graph vs vector database for RAG, a vector database is the faster start and the better fit for “what does it say about…” questions. A knowledge graph wins on multi-hop and relationship questions and explains its path. Research on hybrid retrieval finds combining them beats either alone.
GraphRAG is Microsoft Research’s 2024 method in which a language model extracts an entity graph from documents and pre-writes summaries of closely linked groups of entities. Questions about the whole corpus are answered from those summaries, which plain vector RAG handles poorly.
A graph database is the storage engine. A knowledge graph is the content: entities, relationships and usually a schema or ontology describing them. A knowledge graph can live in a graph database, a triple store or even relational tables.
Only loosely. Metadata on each vector — a document id, a supplier name — lets you filter, but there are no typed edges to traverse. Multi-hop questions need a graph, joins in a database, or an agent that runs several searches in turn.
They can narrow them: facts come from explicit edges, and the path can be shown. But an LLM-extracted graph can contain extraction errors, and the model can still misread what it is given. Citations and evaluations are still needed.
Hierarchical Navigable Small World, an approximate nearest-neighbour index. It builds layered proximity graphs over the vectors and searches from the top layer down, which scales logarithmically with the collection — the reason vector search stays fast on large corpora.
When your questions are about connections — ownership chains, dependencies, who reports to whom — when answers must show their path, or when entities need to be resolved across many sources. For finding relevant text, start with vectors.
Botminds agents search knowledge by meaning and by exact words, narrow by labels stamped on every passage, and count in typed records — choosing the method per step. See agentic RAG.
Bring one process and its documents. We’ll show you the agents, the controls and the record, running on your data.