9:15 - 10:43
RDFS domain and range: deriving types from graph statements
An ontology can do more than name the entities and relationships in a graph. It can also describe what those relationships imply. In this part of the talk, Frank Coyle introduces RDFS and OWL as supporting technologies that sit beside the graph. They add formal control and inference to the information stored in it.
The central example is the statement:
Bob teaches Scooter
The statement directly records one relationship. With domain and range rules, the system can derive additional types for both participants.
The basic idea: a relationship has two sides
In a directed graph statement, the relationship points from a subject to an object:
subject ── relationship ──> object
Bob ── teaches ────────> Scooter
The domain of a relationship describes the kind of thing expected on the subject side, or the left side. The range describes the kind of thing expected on the object side, or the right side.
For the teaches relationship, suppose the ontology states:
domain(teaches) = Teacher
range(teaches) = Student
These declarations give the relationship a meaning beyond the word teaches. They say that something using teaches as a subject is treated as a teacher, and something appearing as its object is treated as a student.
Step-by-step inference
The talk's example can be expanded into this chain:
- Asserted fact: the graph contains
Bob teaches Scooter. - Domain inference: because
Bobis on the subject side ofteaches, the system infers that Bob is aTeacher. - Subclass inference: if the ontology says that every teacher is a
Person, the system can also infer that Bob is aPerson. - Range inference: because
Scooteris on the object side ofteaches, the system infers that Scooter is aStudent.
In a compact notation, the result is:
Bob teaches Scooter # directly stated
Bob is a Teacher # inferred from the domain of teaches
Bob is a Person # inferred because Teacher is a kind of Person
Scooter is a Student # inferred from the range of teaches
The original graph did not need to repeat every type explicitly. The supporting rules supply information that follows from the statement and the ontology.
Asserted facts versus inferred facts
This distinction is important:
| Kind of information | Example | Where it comes from |
|---|---|---|
| Asserted | Bob teaches Scooter |
A fact written into the graph or supplied by an application |
| Inferred | Bob is a Teacher |
The domain rule for teaches |
| Inferred | Bob is a Person |
The rule that every Teacher is a Person |
| Inferred | Scooter is a Student |
The range rule for teaches |
An inference is not a new observation. It is a conclusion produced by applying the ontology's rules to an observation that is already present.
Why the direction matters
Domain and range are easy to reverse because both are attached to the same relationship. A reliable way to remember them is to read the statement from left to right:
domain range
↓ ↓
Bob ───────── teaches ───────> Scooter
subject object
The domain does not mean “where the relationship is stored.” It identifies the type inferred for the subject. The range does not mean a numerical interval such as 1–10. Here, it identifies the type inferred for the object.
For example, if the relationship were written in the opposite direction—Scooter teaches Bob—the same domain and range declarations would infer that Scooter is a Teacher and Bob is a Student. That would be a very different interpretation. The graph's direction is part of its meaning.
RDFS and OWL as a supporting layer
The speaker places RDFS and OWL alongside the graph rather than treating them as ordinary entities in the domain. The graph holds statements such as Bob teaches Scooter. The supporting ontology describes how to interpret those statements and what conclusions can be drawn from them.
In this example, the useful work is not only looking up the fact that Bob teaches Scooter. A reasoner can also ask questions such as:
- What kind of entity is Bob?
- What kind of entity is Scooter?
- Does the relationship agree with the domain and range declared for it?
- What additional type information follows from the inferred types?
Here, RDFS is the part associated with schema-level descriptions such as domains, ranges, and class relationships. OWL is another ontology language that can express richer logical characteristics and constraints. The talk names both as technologies that add control or inference to graph-based representations. The detailed property examples for OWL come later; this section's concrete mechanism is the RDFS-style domain and range inference.
From inference to agent guardrails
Why does this matter for an agent? Earlier in the talk, the speaker describes a probabilistic LLM as a system that can generate a proposal or choose a tool call, but whose proposal still needs to be checked. A formal ontology can provide some of the domain assumptions used for that check.
Imagine that an agent produces a tool result containing a teaches relationship. The surrounding program can place the result into a graph and apply the ontology. The result may then imply that one entity is a Teacher and another is a Student. Those inferred types can be compared with the expected domain model before the system accepts the result or continues its loop.
This does not mean that RDFS makes the LLM certain or error-free. It means that the LLM's flexible proposal is processed through a model with explicit semantics. The reasoner can expose information that was not written directly and can help a validator decide whether the proposal fits the domain.
A common misunderstanding
Domain and range are not merely comments for human readers. In the speaker's example, they actively generate type information. At the same time, the inference should not be confused with proof that the real-world claim is true. If a graph asserts Bob teaches Scooter, the rule-based system derives the types associated with that statement. It does not independently observe Bob, Scooter, or the teaching event.
That separation—generated or asserted data on one side, formal interpretation and checking on the other—is the larger architectural point. The graph records what the system has been told. RDFS and related ontology rules help determine what that information means and what follows from it.