AI-ENGINEERING
    advanced

    Ontology & Knowledge Graph

    AI Engineer path · lesson 67 of 124
    The idea
    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.
    How to use
    Run inference to see the two edges the reasoner deduces that you never wrote — the rule worksAt(p,c) ∧ locatedIn(c,city) ⇒ basedIn(p,city) produces new facts from the five stored ones.
    5/5 triples
    worksAtlocatedInworksAtlocatedInknowsAda:PersonGrace:PersonAcmeCorp:CompanyTechCo:CompanyParis:CityLondon:City

    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

    Schematic

    Complete the RDF-style statement.

    Tap a piece, then tap where it goes — or drag it. Tap the tray to take one back.

    subject
    predicate
    object
    3 pieces left to place

    Test your knowledge

    20 questions
    Question 1 of 20
    Score: 0

    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

    Google
    Palantir
    Amazon
    Palantir
    LinkedIn
    Google
    Amazon
    Google
    LinkedIn
    Microsoft
    Neo4j

    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