An ontology is a formal, machine-readable description of a domain: the kinds of things that exist, the properties they can have, and the logical relationships between them. In practical terms, ontologies give a knowledge graph its semantic backbone — they tell the system (and the LLM) not just that two nodes are connected, but what kind of things those nodes are and what that connection means. Going Meta treats ontologies as first-class citizens from Session 2 onward, using them to guide data import, validate graph shape, drive LLM extraction, and power agent tool calling.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/jbarrasa/goingmeta/llms.txt
Use this file to discover all available pages before exploring further.
Core Ontology Concepts
Classes
Define the categories of things in a domain. A class like
dbo:Person or :Article says “there are entities of this type.” Classes can form hierarchies via rdfs:subClassOf (OWL) or skos:broader (SKOS).Properties
Describe attributes of individuals (datatype properties, e.g.
name) or relationships between individuals (object properties, e.g. authorOf). Properties can have domain and range constraints.Individuals
Specific instances of a class — the actual data. In the property graph model, these become Neo4j nodes labelled with the class name.
Restrictions & Axioms
Logical rules that constrain the model — cardinality (each article has exactly one author), range (the object of
authorOf must be a Person), and disjointness (a node cannot be both a Person and an Organisation).OWL vs. SKOS
Going Meta uses both OWL and SKOS depending on the use case. Understanding the difference helps you choose the right vocabulary.- OWL (Web Ontology Language)
- SKOS (Simple Knowledge Organisation System)
OWL is the W3C standard for expressive, logic-based ontologies. It supports full class hierarchies, property restrictions, inference rules, and consistency checking. OWL ontologies are used in Session 4 (ontology-based reasoning), Session 5 (ontology-driven KG construction), and throughout Season 2 for guiding LLM entity extraction.OWL files are most commonly serialised as Turtle (
.ttl) or RDF/XML. Example class definition:Importing Ontologies into Neo4j with Neosemantics (n10s)
The Neosemantics plugin (n10s) bridges the RDF and property graph worlds. It maps RDF triples to Neo4j nodes and relationships, and exposes procedures for importing SKOS taxonomies, OWL ontologies, and arbitrary RDF datasets.Step 1: Configure the Graph
Before importing any RDF, you must initialise the n10s graph configuration and create the required uniqueness constraint. This is done once per database:handleVocabUris: "IGNORE" setting strips namespace prefixes so that skos:prefLabel becomes the property key prefLabel rather than the full URI. This produces a much more readable graph for Cypher queries.
Step 2: Import a SKOS Taxonomy
- A
:Conceptnode for eachskos:Conceptin the file prefLabelandaltLabelproperties on each concept:broaderrelationships between concepts following theskos:broadertriples
Step 3: Remove Redundant Hierarchy Shortcuts
SKOS vocabularies imported from sources like Wikidata often contain transitivebroader shortcuts (A broader C when A broader B and B broader C already exists). Remove them to keep the hierarchy clean:
Step 4: Import an OWL Ontology
For full OWL ontologies (classes, object properties, datatype properties, restrictions), usen10s.onto.import.fetch:
:Class label, and object properties become nodes with an :ObjectProperty label, all connected by :SCO (subClassOf) and :SPO (subPropertyOf) relationships.
Ontologies as Schemas for LLM Extraction
From Season 2 onward, Going Meta uses OWL ontologies not just for data import but as dynamic schemas that guide LLM entity extraction. The pattern works as follows:Load the ontology into Neo4j
Use
n10s.onto.import.fetch to load the domain ontology. The graph now contains the class hierarchy and property definitions.Query the ontology for the extraction schema
Cypher queries read the ontology graph to produce a structured schema description — a list of classes, their properties, and their relationships — which is passed to the LLM as part of the system prompt.
LLM extracts entities conforming to the schema
Because the LLM is given an explicit ontology-derived schema, its output is grounded in the domain model. Pydantic models (from session 30 onward) enforce structure on the LLM’s JSON output.
This ontology-driven extraction pattern is the central innovation of Going Meta Season 2 and is covered in depth across sessions 28–32. The ontology acts as both a schema validator and a prompt engineering tool simultaneously.
Practical Ontology Tools
Protégé
The most widely used desktop ontology editor. Used in sessions 15 and 19 for creating and versioning OWL ontologies visually before importing them into Neo4j.
RDFLib (Python)
A Python library for parsing, querying, and serialising RDF graphs. Used extensively in sessions 5, 12, 18, 29, and 30 for programmatic ontology processing before loading into Neo4j.