
This blog is written by AI for SEO
AI Knowledge Graph: What It Is and How to Build One
An AI knowledge graph is a knowledge graph whose entities, links and schema are drafted by a model from your real company data, with every fact traceable back to the row or document it came from. You do not hand-write the schema or the mappings; a model proposes them, and a person reviews them before they go live. The result is one connected graph across your database, billing, CRM and documents that people and AI agents can query.
Extraction is not the hard part. Models are good at pulling names and relationships out of text and tables. The hard parts are links that are actually correct, provenance you can audit, and keeping the graph right as data and schemas change. This guide covers the approach with any tool, then walks through building one in Helix Foundry, which is open source under Apache-2.0.
What is an AI knowledge graph?
An AI knowledge graph is a graph of entities (customers, orders, contracts, people) and the typed links between them, where a model did the first draft of the entities, links and schema from your actual data. Every value in it points back to its origin: a database row, a Stripe record, or a quote from a document.
That last property is what separates a useful one from a demo. If an agent says "this customer churned after the Q3 contract change", you need to open the claim and see the row and the quote behind it. Without provenance, a graph is just another place for confident wrong answers to live.
The model's job is drafting. A human's job is approving. Foundry's docs describe it the same way: the agent drafts a version, you review it, and you choose which version becomes current.
How an AI knowledge graph differs from a plain knowledge graph and from vector search
A plain knowledge graph is built by people: someone designs the schema, writes the mappings and maintains them. An AI knowledge graph keeps the same structure but moves the drafting to a model, so the cost of the first version drops from weeks of modelling to a review pass.
Vector search is a different tool. It finds chunks of text that are semantically close to a question. It does not know that the "Acme Corp" in Stripe and the "ACME Inc." in your CRM are the same customer, and it cannot follow a path from a contract to the invoices it governs. Top-k similarity returns orphaned chunks; a graph returns connected context. If your question is "what did this customer pay and what did we promise them", you need links, not nearest neighbours. We cover the trade in more depth in RAG vs Ontology: Which Your AI Agents Actually Need.
Other approaches exist. Microsoft GraphRAG builds a graph-shaped index over text to improve retrieval, and Neo4j's LLM Graph Builder extracts a graph from documents. We compare Foundry with both in Helix Foundry vs Microsoft GraphRAG: Ontology or Index? and Helix Foundry vs Neo4j LLM Graph Builder for Ontologies. The short version: text-only extraction is a starting point, but company data lives mostly in tables, billing systems and tools, and those need mappings, not just extraction.
How AI builds one: entity extraction, linking and the ontology
A model builds a knowledge graph in three steps: find the entities, decide how they link, and write down the schema that makes both repeatable. That schema is the ontology: the list of types (Customer, Invoice, Contract), the links between them, and the rules they must obey.
Entity extraction. From structured sources, entities come from tables: a customers table becomes a Customer type with one entity per row. From documents, the model pulls entities and facts out of text and keeps the quote it used. Tables are easy; documents are where evidence matters most.
Linking. This is where graphs go wrong. The same customer appears under different names and IDs in Postgres, Stripe and Notion. A good linker uses stable keys first (email, external ID, domain), falls back to fuzzy matching only when it has to, and flags low-confidence matches for review instead of silently merging. A wrong merge is worse than a missing link, because it contaminates every answer downstream. Our walkthrough on this is Link the Same Customer Across Stripe, Postgres and Notion.
The ontology. The schema is what lets the graph stay consistent. It says an Invoice belongs to exactly one Customer, so a violation is visible rather than buried. A model can draft types, links, mappings and rules from your tables and documents; you read them the way you would read a pull request.
Keeping it current: drift, wrong links and schema changes
A knowledge graph is only useful while it matches reality, and reality changes weekly. Three things break it: data drift (a column starts holding something different), wrong links (a merge that looked right and was not), and schema changes (a new source, a renamed field, a new type the business needs).
The practical defences are boring and effective:
Version the ontology. Edits should create a new version rather than mutate the live one, so you can compare and roll back.
Keep provenance on every value. When a link is wrong, you can trace which row or quote produced it and fix the source of the error, not just the symptom.
Re-sync sources on a schedule and re-check mappings when a source's shape changes.
Route uncertain facts to a person. Nothing low-confidence should be written as fact.
This is the part most extraction demos skip, and it is where graphs quietly rot. Foundry's docs describe ontology versions as immutable, with edits producing a new version you choose to make current. For the drift and repair side, see Self-Healing Ontology: Keeping Links Right as Data Drifts and How to Update an Ontology When Your Data Changes.
Build one in Helix Foundry: clone, docker compose up, connect, generate, ask
Helix Foundry turns your company's databases, tools and documents into one connected graph, with an ontology agent drafting the types, links and rules. It loads the approved ontology into HelixDB, the graph-vector database, and keeps where every value came from: a row or a quote. It is Apache-2.0.
1. Clone and start. You need Docker with Compose v2 and ports 3000 and 8333 free, plus a few GB of room for images on first start.
git clone https://github.com/helixdb/helix-foundry.git
cd helix-foundry
docker compose up -d --waitOpen http://localhost:3000. The local install is for one person on their own computer, so do not expose it. Prefer not to run it yourself? Foundry also runs on Helix Cloud at foundry.helix-db.com, where you can set it up with your coding agent.
2. Connect data. Add a source, test it and sync its tables. Connectors include PostgreSQL, MySQL, S3, Stripe, Granola and Attio, plus documents and tables. Foundry never writes to your sources. There are no Salesforce or HubSpot connectors, so plan around the list above.
3. Generate. Pick at least one synced table, API source or document set and generate an ontology. The agent drafts types, links, mappings, rules and the questions the ontology is meant to answer. If it needs clarification it asks, and you answer on the generation page or in Founder. Note what goes where: a generation sends your synced tables, and up to five of the newest documents of each set it picks, to Foundry's agent.
4. Review. Inspect the Graph, Types, Links, Mappings, Sources, Rules and Questions tabs. Versions are immutable; you choose which one becomes current, then load it.
5. Ask. Ask questions in plain language and get answers with numbered citations. Open a citation to see the underlying rows, records or document quotes. For a pilot, open a few and check them against the original sources before trusting the rest.
For a customer-shaped example, follow Build a Customer Ontology From Attio, Granola and Stripe, or let an agent drive the setup with Let Claude Set Up Your Company's Knowledge Graph.
Trade-offs: when an AI knowledge graph is worth it and when it is not
An AI knowledge graph is worth it when the same entities live in several systems and the questions you care about cross those systems. "Which customers on the enterprise plan have an open Linear issue and a renewal in 90 days?" is a graph question. Agents that act on company data, not just summarise a single document, need the links to be right.
It is not worth it when your data lives in one system with a clean schema (just query it with SQL), when you only need to search a pile of documents (vector search or a plain retrieval index is simpler), or when nobody will review the draft. A model-drafted ontology you never read is a liability with a nice UI.
There is also a real cost: review time. The model drafts fast, but a person has to approve types, links and rules, and check citations on a pilot. Budget for that. The payoff is that the review happens once up front and again only when something changes, rather than as constant firefighting on wrong answers.
Finally, scope matters. Start with one workload and one question set. A pilot that answers five real business questions on your own data tells you more than a graph of everything you own.
Start with one workload and clone Helix Foundry
The extraction is the easy 20 percent. Correct links, provenance on every value and a graph that survives schema changes are what make an AI knowledge graph usable, so pick a tool that treats those as the product. Take one workload, connect two or three sources, generate a draft and open the citations. Clone helix-foundry, run docker compose up -d --wait, and ask your first question on your own data.