Ontology & Knowledge Graph
AI Engineer path · lesson 67 of 124Represent facts as RDF triples over a typed graph, then run a reasoner to derive a new implicit relationship — the structured, connected knowledge behind GraphRAG.
Key insight
Every edge is a triple — (subject, predicate, object) — the atom of a knowledge graph. Build enough of them and you have a connected, queryable map of a domain that systems can traverse instead of guessing from flat text.
Build a triple
Complete the RDF-style statement.
Tap a piece, then tap where it goes — or drag it. Tap the tray to take one back.
Test your knowledge
What is an RDF triple?
The short version
The ontology is the rulebook of a family tree (what a "parent" or "sibling" means); the knowledge graph is your actual family filled in. A reasoner can then deduce "grandparent" even though nobody wrote that edge.
In more depth
Ontology & Knowledge Graph
An ontology defines the vocabulary — classes (Person, Company, City) and allowed relations (worksAt, locatedIn). A knowledge graph populates it with instances and links. Every edge is an RDF triple (subject, predicate, object).
A reasoner applies rules to derive implicit facts, e.g. worksAt(p,c) ∧ locatedIn(c,city) ⇒ basedIn(p,city). This connected, typed knowledge is what GraphRAG and relationship-aware agents traverse.
Interview Questions
References & Further Reading
Love this visualization?
Sign up to track your progress, earn achievements, use the AI assistant, and access your personal learning dashboard.
100% free • No credit card required