lowob

What Is a Knowledge Graph (for AI)?

A knowledge graph stores information as entities, such as companies, people, products and contracts, connected by named relationships, such as "works at", "signed" or "replaced". For AI, it gives a model a map of how facts connect, so it can answer questions that need several hops across sources. Text search finds similar passages; a graph follows links. Graphs help most where relationships matter and least where nobody maintains them.

Gateway 0ToolingContextRecordReasoningGateway 1Gateway 2Gateway 3
Where this piece sits in The Build Order: the context layer.

What a knowledge graph means

A knowledge graph is a way of storing facts as a network. Each node is an entity, a thing with an identity. Each edge is a relationship with a name. For example, the sentence "a mid-size logistics client renewed its contract on 1 March" becomes a set of linked facts: the client, the contract, the renewal, the date, and the person who signed it.

The idea is older than the current AI wave. The W3C's Resource Description Framework (RDF) standardises the basic unit; its 1.1 version, a 2014 W3C Recommendation, states that an RDF triple consists of a subject, a predicate and an object, and that a graph is a set of triples. Google's Knowledge Graph, launched in May 2012, made the idea familiar to search users. Its launch post described a graph of more than 500 million objects and over 3.5 billion facts and relationships, designed to understand "real-world entities and their relationships to one another: things, not strings."

Knowledge graphVector indexRelational database
Stores entities and named relationshipsStores embeddings of text chunksStores rows in fixed tables
Answers "how is A connected to B"Answers "what text is similar to this"Answers "which rows match these values"
Good for multi-step, relational questionsGood for finding relevant passagesGood for transactions and reporting
Needs a schema or extraction stepNeeds an embedding modelNeeds a fixed schema

How it works for AI

A language model can either query an existing graph, often fed by pipelines from systems such as a CRM, or build the graph itself from documents.

Microsoft Research's GraphRAG, announced in February 2024, is a widely cited example of the second approach. A language model reads a document collection, extracts entities and relationships into a graph, groups closely related entities into clusters and writes a summary of each cluster in advance. At question time, those summaries and graph links feed the model's context.

Microsoft's post set out the weakness of standard RAG it was designed to address. Its researchers found that vector-based retrieval "struggles to connect the dots" when an answer requires linking separate pieces of information, and performs poorly on questions about a whole dataset, such as "What are the top 5 themes in the data?" The accompanying paper by Edge and colleagues reported substantial improvements in the comprehensiveness and diversity of answers on such global questions, tested on datasets of around one million tokens.

Why it matters for a commercial team, and when to use one

Commercial questions are often relational: which open deals depend on a partner whose contract ends this quarter, or which proposal superseded which. Text search struggles because the answer is not written in any single document.

Use a knowledge graph whenAvoid one when
Questions follow relationships across recordsQuestions are answered by finding one passage
Entities are stable and well defined, such as accounts and contractsEntities are vague or change meaning often
Someone owns keeping relationships currentNobody will maintain it after the build
You need to explain why an answer was reachedA ranked list of documents is enough

The common mistake is to treat a graph built once by a language model as a source of truth. Extraction makes errors, and a graph does not update itself when a contract is renewed or a contact changes role. A stale edge is worse than a missing one, because the model will follow it with confidence.

In lowob's model, the most valuable graph on the commercial line is a small one: decisions linked to the accounts, owners and outcomes they concern, with each decision able to supersede an earlier one rather than overwrite it. That is the record stage of the enterprise brain. Rent the extraction tools if useful; own the record of what was decided.

lowob takeaways

  • Graphs store connections. Entities and named relationships let AI follow links that text search misses.
  • They complement vectors. Use similarity search to find passages and a graph to answer how things relate.
  • Language models can build them. GraphRAG shows the method, but extracted graphs need checking.
  • Maintenance decides value. A graph without an owner goes stale and misleads.

Common questions

What is a knowledge graph in AI?

A structured store of facts in which entities are connected by named relationships. AI systems use it to answer questions that require following connections across many sources.

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

A vector database finds text similar in meaning to a query. A knowledge graph stores explicit relationships between entities, so it can answer how things are connected.

What is GraphRAG?

A Microsoft Research method in which a language model builds a knowledge graph from documents and uses it, with pre-written cluster summaries, to answer questions that standard RAG handles poorly.

Do small companies need a knowledge graph?

Usually not a large one. A small graph linking decisions to accounts, owners and outcomes is often more useful than a broad graph of everything.

Sources and notes

What Is an AI Agent, and Where Does It Fit in the Brain?

Read next in The Build Order