Ontology
Ontology
Section titled “Ontology”The IOA-ORM has a formal ontology representation in three formats:
| Format | File | Purpose |
|---|---|---|
| JSON-LD | ontology/context.jsonld | Machine-readable context for JSON-LD documents |
| Turtle (TTL) | ontology/exam-runtime-ir.ttl | Human-readable RDF serialization |
| TypeScript | spec/schema | Source of truth for runtime implementations |
Namespace
Section titled “Namespace”@prefix exam: <https://exam-runtime-ir.org/ontology#> .
Ontology Statistics
Section titled “Ontology Statistics”| Metric | Count |
|---|---|
| Classes | 25 |
| Properties | 45 |
| Individuals | 8 (PromptingLevel instances) |
| PROV-O alignments | 3 (Entity, Activity) |
How the Three Layers Connect
Section titled “How the Three Layers Connect”TypeScript Interfaces JSON-LD Context OWL/Turtle
(running code) (linked data) (semantic web)
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ interface │──validate──▶ │ @context │──export──▶ │ rdfs:Class │
│ ExamRuntime │ │ exam:Exam │ │ owl:Class │
│ Package {…} │ │ RuntimePkg │ │ rdfs:prop │
└──────────────┘ └──────────────┘ └──────────────┘
│ │ │
▼ ▼ ▼
Runtime impl. JSON-LD documents Reasoning,
Validation External linking SPARQL queries
Key Design Decisions
Section titled “Key Design Decisions”-
JSON-LD as bridge format: JSON-LD is both human-readable and machine-readable. It can be used directly in JSON documents as a context, and it maps cleanly to RDF/OWL.
-
PROV-O alignment:
EvidenceSignalis a subclass ofprov:Entity(provenance).RuntimeEventis a subclass ofprov:Activity. This enables standard provenance queries. -
Joughin’s dimensions as first-class: The
AssessmentProfileclass encodes all 6 dimensions from Joughin (1998) as properties, making them queryable via SPARQL. -
PromptingLevel as individuals: The 8 prompting levels (Pearce & Chiavaroli 2020) are OWL individuals, not just string values. This enables reasoning about which levels are permissible.
Using the JSON-LD Context
Section titled “Using the JSON-LD Context”To make any JSON document semantically linked, add the context:
{
"@context": "https://raw.githubusercontent.com/Stlouislee/ExamRumtimeIR-DSR/main/ontology/context.jsonld",
"@type": "ExamRuntimePackage",
"examId": "cs301-midterm-2026",
"version": "1.0.0",
"metadata": {
"title": "CS301 Operating Systems Oral Exam",
"assessmentPurpose": "summative"
}
}
SPARQL Query Examples
Section titled “SPARQL Query Examples”Find all required evidence targets:
PREFIX exam: <https://exam-runtime-ir.org/ontology#>
SELECT ?target ?description WHERE {
?target a exam:EvidenceTarget ;
exam:isRequired true ;
exam:description ?description .
}
Find all evidence signals with high confidence:
PREFIX exam: <https://exam-runtime-ir.org/ontology#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT ?signal ?target ?confidence WHERE {
?signal a exam:EvidenceSignal ;
exam:confidence ?confidence ;
exam:targetId ?target .
FILTER (?confidence > 0.8)
}
Find all events for a session:
PREFIX exam: <https://exam-runtime-ir.org/ontology#>
SELECT ?event ?type ?timestamp WHERE {
?event a exam:RuntimeEvent ;
exam:eventType ?type ;
exam:timestamp ?timestamp .
?session a exam:RuntimeState ;
exam:sessionId "session-123" .
}
| Tool | URL | Description |
|---|---|---|
| Ontology Graph | ontology-viz.html | Interactive force-directed graph of all classes, properties, and relations |
| SPARQL Query | sparql.html | Client-side SPARQL query engine with example queries |
| TS → OWL Generator | ontology/scripts/ts-to-owl.mjs | Generate OWL/Turtle from TypeScript schema |
| SHACL Shapes | ontology/shapes.ttl | Validation constraints for instance data |
Future: SHACL Validation
Section titled “Future: SHACL Validation”When the ontology matures, we will add SHACL (Shapes Constraint Language) shapes to validate exam packages against the ontology:
exam:ExamRuntimePackageShape a sh:NodeShape ;
sh:targetClass exam:ExamRuntimePackage ;
sh:property [
sh:path exam:examId ;
sh:minCount 1 ;
sh:datatype xsd:string ;
] ;
sh:property [
sh:path exam:version ;
sh:minCount 1 ;
sh:pattern "^\\d+\\.\\d+\\.\\d+$" ;
] .
This would enable runtime validation: “Does this JSON document conform to the IOA-ORM ontology?”