juppiter journal juppiter.com RSS

Retrieval and context

Knowledge Graph vs Vector Database for AI: Which Does Your Firm Need?

Knowledge graph vs vector database: one stores entities and their links, the other finds text by meaning. What each does, and when a firm needs both.

Dark title card reading Knowledge graph vs vector database with a small graph on the left and a cloud of dots on the right.

A knowledge graph and a vector database answer different questions. A knowledge graph stores entities, such as people and companies, along with the relationships between them, so it is good at questions that follow connections. A vector database stores embeddings, which are numeric representations of text, so it is good at finding passages that are close in meaning to a question. Which one a firm needs depends on whether its questions turn on wording or on relationships. In practice the two do different jobs, and they often work best together.

This post is written for the COOs, CTOs, heads of data and research, portfolio managers and analysts at hedge funds, family offices and private equity funds. It covers the difference, the trade-offs and when to use which. The ideas behind it are in What Is Context Engineering?, our full guide to the topic.

What is the difference between a knowledge graph and a vector database?

The two terms are not the same kind of thing, which is why comparing them head to head can mislead. A knowledge graph is a way of modeling information. A vector database is a kind of database product.

Neo4j describes a knowledge graph as "an organized representation of real-world entities and their relationships", typically stored in a graph database. Google's 2012 announcement of its Knowledge Graph put the idea in a phrase that still holds: "things, not strings." A search for a name should find the person, company or place, not only pages that contain the same letters. Google also made the point that matters most here: the graph "also models all these inter-relationships". It is not only a catalog of objects.

A vector database, in Pinecone's words, "indexes and stores vector embeddings for fast retrieval and similarity search". An embedding model turns a passage of text into a list of numbers that reflects its meaning. The question is turned into numbers the same way, and the database returns the stored items whose numbers are closest. Because that search is approximate, Pinecone notes that the main trade-off is between accuracy and speed.

Diagram. Top: a knowledge graph of connected nodes answering which things connect and how. Bottom: a cluster of points with the nearest ones circled, for a vector database finding passages close in meaning.

So the practical difference is what each one can be asked:

  • A knowledge graph can be asked which things connect to which, and how.
  • A vector database can be asked which passages mean something close to this question.

Is a knowledge graph just a database, then? Not quite. Neo4j notes that a graph database natively stores the relationships between entities, so following a link is a direct step, not a puzzle to be reassembled from text.

Knowledge graph vs vector database for RAG

Retrieval-augmented generation, or RAG, is the pattern of retrieving relevant material and handing it to a language model along with the question. The original RAG paper from Lewis and colleagues described it as combining a model's built-in memory with an external, searchable memory. In the most common setup, that external memory is a vector index. The basics are in What Is RAG?.

Weaviate calls that basic setup "Naive RAG": a question-and-answer system with vector search for retrieval. Its own explanation of the limit is useful. Each entry is an independent item with its own meaning, so the approach "doesn't represent any relationships between data points beyond the proximity of their meaning in vector space."

That limit shows up in questions that need several facts joined together. Consider a question a hedge fund might ask of its own research notes (illustrative): which of our past notes on a company also mention its largest customer, and what did the team conclude each time? A search by meaning can surface passages about the company. It has no built-in notion of "its largest customer" as a linked entity, so the join is left to the language model, working from whatever passages came back.

Microsoft researchers made a related point in the GraphRAG paper. Conventional vector RAG, they write, "works well for queries that can be answered with information localized within a small set of records", but it does not support questions that need a global understanding of the whole dataset. Their method builds an entity knowledge graph from the documents and summarizes groups of closely related entities. In the paper's tests, on global questions over datasets of roughly a million tokens, it improved on a conventional RAG baseline in the comprehensiveness and diversity of answers. That is a result about one method on one kind of question, not a verdict on every setup.

When to use a knowledge graph vs a vector database

A fair rule of thumb, drawn from how vendors on both sides describe it, is to look at the questions your people actually ask.

Reach for a vector database, or any semantic index, when:

  • the question is about meaning and the wording in the documents varies. A family office asks which manager letters discuss slower distributions, and the letters say "extended wind-down timeline" (illustrative);
  • the content is mostly unstructured text, such as memos, emails, notes and reports;
  • you want a working retrieval layer quickly, without defining a schema first.

Reach for a knowledge graph when:

  • the answer depends on how things are connected, such as who works at which company, which company owns which brand, or which theme links which names. A family office tracing which entity holds which fund interest, and through which manager, is an example (illustrative);
  • you need to see why a result was returned. Meilisearch's comparison notes that a graph offers traceability through its nodes and edges, while similarity scores from a vector search are harder to explain;
  • the same thing appears under many names, and you want every mention to count toward one entity.

Both sides have costs, and Meilisearch's comparison lists them plainly. Knowledge graphs take effort to build and maintain, with schema design and upkeep as the data changes. Vector databases are simple to add, but they are weaker on explicit relationships and harder to explain. Neo4j adds a useful caution on its side: a formal ontology, which is a precise specification of the concepts in a subject area and how they relate, is often not required, and can be added later when a use case demands it. These are vendor perspectives, so read them as trade-offs to weigh, not as measurements.

Diagram. Four question types and the tool each points to: varied wording and quick setup point to a vector database, connections and one thing under many names point to a knowledge graph.

Knowledge graph or vector database: which is better?

Neither is better in general. The question is a bit like asking whether an index at the back of a book is better than a table of contents. They help you find different things.

A more useful framing is the cost of a wrong or missing answer. If a missed document is the main risk, meaning you have a lot of text and people phrase things differently from the authors, a semantic index goes a long way. If a misattributed or half-joined answer is the main risk, such as mixing up two companies with similar names, or a private equity deal team missing that a diligence report refers to a portfolio company by its former name (illustrative), the entity structure of a graph earns its cost.

For many teams the first system is a vector index, because it is the quickest to stand up. The pressure to add structure usually arrives when people ask questions that depend on connections, or when they ask where an answer came from.

Knowledge graph and vector database together

Combining them is a common pattern, and the major vendors describe it in similar terms. Weaviate's walkthrough of GraphRAG describes a pipeline in which semantic search first finds the most relevant entities, and graph traversal then follows their connections to gather related entities and relationships. It presents the combination as joining "the semantic understanding of vector search with the relationship intelligence of graph databases." Meilisearch likewise describes combining the two for "semantic similarity and structured relationships."

The combined approach has its own costs. Weaviate's own list of GraphRAG limitations includes summaries that need periodic reindexing to reflect new data, substantial token costs in the indexing pipeline, and trouble with entities that have thousands of connections. A hybrid system is not free, and a firm should ask what the maintenance burden will be before choosing it.

There is a second part to the question that gets overlooked: what happens after retrieval. Whichever store finds candidates, something still has to decide which passages go to the model, in what order, and how many. That step is what context engineering is about, and it decides how much of a good retrieval result actually reaches the answer. For the search side of that step, see Hybrid Search vs Semantic Search vs Keyword Search.

juppiter is a knowledge engine that securely organizes your firm data for fast and efficient access for your AI workflows. Per its Features page, documents, embeddings and the knowledge graph sit together, organized around the entities a firm already cares about. During ingestion, each segment of a document is embedded and its entities are resolved, so that mentions of the same person or company land on one node. At question time, graph search over the relevant entities runs alongside a semantic search of the embeddings. The results are pooled and reranked, then returned to the workflow as context.

In the terms of this post, that is the combined pattern: structure for connections, meaning for wording, and a final ordering step before anything reaches the model. Each piece answers one of the problems above:

  • One company under many names. "Different references to the same company land on one entity," so "later questions search one entity rather than a scatter of near matches." That covers the private equity diligence report that uses a former name.
  • Questions about connections. Extracted entities are written into an ontology and a knowledge graph of "what your firm knows and how it fits together," which "gives retrieval a connected subgraph to search." That covers the family office tracing an entity through a manager.
  • Questions about wording. The semantic search over embeddings finds passages by meaning, which covers the hedge fund note that says the same thing in different words.

Which does your firm need?

Start from your questions, not from the tools. Collect twenty real questions your analysts, portfolio managers, deal teams or principals ask of the firm's documents. For each one, note whether the answer depends on wording (find me the passage) or on connections (join these facts across documents). If almost everything is about wording, a good semantic or hybrid index may be enough for now. If a meaningful share is about connections, names that vary, or "show me why", plan for entity structure.

When evaluating any vendor, including those mentioned here, it also helps to ask how they handle sensitive data before connecting it. The questions to ask are in AI Vendor Due Diligence Questionnaire: What to Ask Before Connecting Firm Data. For how all this fits a fund day to day, see AI for Hedge Funds.

Read next: how hybrid search combines keyword and semantic search, in Hybrid Search vs Semantic Search vs Keyword Search.

Request a demo

Tell us about your firm and we'll set up a walkthrough of juppiter.