Skip to content
Glossary

Knowledge graph

Graphify glossary

A data structure that stores entities and typed relationships between them, so software can follow how things connect instead of searching flat text.

A knowledge graph stores information as entities (things) and typed relationships between them, rather than as flat text. Instead of a pile of documents you get statements a machine can follow: PaymentService calls StripeClient, StripeClient reads STRIPE_KEY, STRIPE_KEY is defined in config/production.env. A search index can tell you where a word appears; a knowledge graph can tell you how the things behind the words actually relate.

That structural difference changes what questions you can answer. Over flat text, every question is a lookup: find passages that resemble the query and hope they contain the answer. Over a graph, a question becomes a traversal — start at a node, follow edges, and arrive at an answer that carries its own evidence, because the path itself is the explanation. Multi-step questions like 'what breaks if this changes?' or 'how do these two components connect?' are exactly the kind that lookup struggles with and traversal handles directly.

In the context of AI coding assistants, a knowledge graph is a memory substrate: something an assistant can query session after session instead of re-deriving the architecture from scratch each time. Graphify builds one on-device from your repository — code is parsed locally with tree-sitter, non-code sources like docs and SQL are read into the graph by your model — and stores it locally as graph.json, alongside an interactive graph.html you can explore yourself. Nothing about the graph leaves your machine.

Related terms

  • Code graphA knowledge graph built from a codebase: functions, classes, config, and docs become nodes; calls, imports, and references become edges.
  • NodeA single entity in the graph — a function, class, file, table, or doc page — carrying attributes like name, path, and kind.
  • EdgeA typed, directed relationship between two nodes — calls, imports, defines, references — each carrying a provenance tag.

Go deeper

← All glossary terms