AI GLOSSARY · AI CONCEPTS
Knowledge graph
Definition
A knowledge graph is a way of storing facts as a network: things such as people, products or concepts are nodes, and labelled links between them, called relationships, say how they are connected.
Also called: knowledge graphs, KG.
In plain language
A knowledge graph is a map of facts. Each thing, such as a person, a company or a film, is a dot, and each fact about how two things relate is a labelled line between them: this person works at that company. Because the lines are stored, a program can follow them to answer questions like which suppliers are linked to this product. AI systems use graphs to give a model facts it can trace, rather than loose paragraphs. The main limit is effort: someone has to decide what the things and relationships are, build the graph from messy source material and keep it up to date, and a graph built wrongly gives wrong answers with confidence. IBM notes the term itself is debated, since some researchers treat it as the same as a knowledge base or ontology.
Technical definition
A knowledge graph represents entities as nodes and relationships as typed, directed edges, usually stored in a graph database. In Neo4j's property graph model, nodes can carry labels, and both nodes and relationships can carry properties, which are key-value pairs. Neo4j's schema discussion covers indexes and constraints; it says an upfront schema is optional. Queries traverse edges, for example following a chain of relationships from one entity to related ones.
Worked examples in this catalogue
Catalogue examples point at a skill, guide or coding tool listed on this site, with what to run and what you see. An example marked illustrative describes the item from its own documentation; it was not executed for this page. Platform Scores are our assessment under a published method, not a safety guarantee.
Skill by Skill Almanac · Illustrative, not executed
architecture-diagrams 62/100 · grade CScored · Method v0.2 · How we score
- What you see
- Mermaid system and sequence diagrams that stay readable, checked for size and structure.
- Why it exercises the concept
- A system diagram is a small typed graph: components as nodes, calls and data flows as edges. It shows the node-and-relationship shape a knowledge graph formalises.
Skill by Skill Almanac · Illustrative, not executed
python-class-diagram-mermaid 41/100 · Provisional, not yet measuredScored · Method v0.2 · How we score
- What you see
- A Mermaid class diagram generated from Python source files.
- Why it exercises the concept
- Classes and their inheritance and association links are entities and typed relationships extracted from code, which is how many knowledge graphs are populated.
Skill by Skill Almanac · Illustrative, not executed
terraform-resource-diagram 41/100 · Provisional, not yet measuredScored · Method v0.2 · How we score
- What you see
- A Mermaid graph of Terraform resource and data blocks and the references between them, with unresolved references listed.
- Why it exercises the concept
- The diagram illustrates entities and dependency edges. Drawing it does not itself create a queryable knowledge graph or demonstrate graph-database operations.
How it shows up when you use agents
Most coding sessions never touch a knowledge graph. They show up when an agent or assistant must answer questions that depend on connections across many documents: which services call this one, which customers bought both products, who reports to whom. In that setting a graph can be built from your documents and the agent queries it, often through a tool or an MCP server, instead of reading everything. In practice this is one way to ground a large language model in checkable facts, and it can be used alongside retrieval-augmented generation.
What breaks when it is misunderstood: a graph is treated as automatic truth. Its answers are only as good as the entities and relationships someone extracted and maintained, and an extraction mistake becomes a confident wrong link. Teams also underestimate the upkeep when the source documents change.
Next action: before building one, write three questions your users really ask and check whether they depend on relationships between things. If they only need a paragraph found, plain document search is simpler. If they do depend on relationships, start by hand-modelling a few dozen entities, before building an extraction pipeline. The linked diagram skills illustrate graph shapes; they are not demonstrations of a working knowledge-graph database.
Common confusions
- Knowledge graph versus vector database. A graph stores explicit, named relationships. A vector database can store number lists, called embeddings, and retrieve items by vector similarity, which does not guarantee semantic relevance.
- Knowledge graph versus ontology. An ontology is a formal description of the entity and relationship types. IBM notes that some researchers treat the two as essentially the same, so check how a source uses each word.
- Knowledge graph versus graph database. The database is the storage technology. The knowledge graph is the content and structure placed in it.
- Myth. A knowledge graph stops an AI from making things up. It gives the model facts to use, but the model can still misread them, and the graph can contain errors.
Related terms
Terms that mention Knowledge graph
2 terms mention this one
More in AI concepts
Sources
- Graph database concepts, Neo4j (accessed 2026-11-23)
- What is a knowledge graph?, IBM (accessed 2026-11-23)
Definitions are written by Skill Almanac from these sources and were checked against them on 2026-11-25. Wikipedia is never the only source.
Review record
Last verified
Drafted by Claude (original draft) and OpenAI Codex (targeted revisions); sources and example targets checked by Independent automated source review (OpenAI Codex); not human peer review on 2026-11-25. Last verified .
Change log (6)
- : Independent automated factual/example review completed. Cached US query estimate aligned to receipt; no traffic promise. Final technical gate recorded separately; publication disabled.
- : Targeted batch-08 scope and example corrections from independent source review; affected recheck pending.
- : First version.
- : Verifier pass: Neo4j wording fixes, dropped unsourced RDF sentence, labelled practical note.
- : Targeted correction from source-supported early audit; complete exact-version review remains pending.
- : Automated review completed; approved for the staged public release. Search indexing is controlled by the release configuration.