Overview
An ontology defines the schema of a knowledge graph: what types of entities can exist, what relationships are allowed between them, and what properties each entity and relationship can have. In Nadoo AI, ontologies are expressed using the OWL (Web Ontology Language) standard on top of RDF (Resource Description Framework), giving you formal semantics, validation, and interoperability with industry standards.Why Ontologies?
Without an ontology, a knowledge graph is an unstructured collection of nodes and edges with no rules about what is valid. An ontology provides:- Type safety — Entities must conform to defined types (e.g., a
Servicecannot have abirthDateproperty) - Relationship constraints — Only valid relationships are allowed (e.g.,
MANAGEScan only go fromTeamtoService, not fromServicetoPerson) - Consistency — New data is validated against the schema before insertion
- Discoverability — Developers and AI agents can inspect the ontology to understand what data exists and how to query it
- Interoperability — OWL/RDF ontologies can be shared across systems and merged with external knowledge bases
Core Concepts
Classes
Classes define the types of entities that can exist in the graph. They are analogous to tables in a relational database or types in a type system.Subclasses
Classes can form hierarchies. A subclass inherits all properties and constraints of its parent class.Object Properties
Object properties define relationships between entities (edges in the graph).Datatype Properties
Datatype properties define attributes of entities (properties with literal values).Managing Ontologies via API
Create an Ontology
Upload an Ontology File
You can also upload an OWL or Turtle file directly.| Format | Extension | MIME Type |
|---|---|---|
| Turtle | .ttl | text/turtle |
| RDF/XML | .rdf, .owl | application/rdf+xml |
| JSON-LD | .jsonld | application/ld+json |
| N-Triples | .nt | application/n-triples |
List Ontologies
Update an Ontology
Delete an Ontology
Entity Mapping and Validation
When entities are added to the knowledge graph — whether manually, via API, or through automatic extraction from documents — the ontology validates them.Validation Rules
| Rule | Description | Example |
|---|---|---|
| Type check | Entity type must be a defined class | FooBar rejected if not in the ontology |
| Domain check | Relationship source must be of the correct type | MANAGES requires source to be a Team |
| Range check | Relationship target must be of the correct type | DEPENDS_ON requires target to be a Service |
| Required properties | Entities must have all required datatype properties | Service must have a name |
| Datatype check | Property values must match the declared datatype | created_date must be a valid xsd:date |
Validation Response
When a validation error occurs, the API returns details about what failed:Ontology Explorer UI
The Nadoo AI platform includes a visual ontology explorer that lets you browse and understand your knowledge graph schema without writing queries.Features
- Class hierarchy tree: Browse entity types and their inheritance relationships
- Property inspector: View all properties and constraints for a selected class
- Relationship diagram: Visualize which classes are connected by which relationship types
- Instance browser: See example entities for each class
- Validation dashboard: View and resolve entities that do not conform to the ontology
Accessing the Explorer
- Navigate to your workspace.
- Open the Knowledge Graphs section.
- Select a knowledge graph.
- Click the Ontology tab.
Best Practices
Start simple and iterate
Start simple and iterate
Begin with a small ontology covering your core entity types and relationships. Add complexity as your knowledge graph grows and new requirements emerge. Over-engineering the ontology upfront leads to maintenance overhead.
Use meaningful naming conventions
Use meaningful naming conventions
- Classes: PascalCase nouns (
Service,Team,Person) - Object properties: UPPER_SNAKE_CASE verbs (
DEPENDS_ON,MANAGES,MEMBER_OF) - Datatype properties: snake_case nouns (
created_date,language,email) - Always include
rdfs:labelandrdfs:commentfor documentation
Version your ontologies
Version your ontologies
Treat ontologies as code. Store them in version control, review changes in pull requests, and test that existing entities remain valid after schema changes.
Leverage subclasses for specialization
Leverage subclasses for specialization
Use class hierarchies to model variations without duplicating properties. For example,
Microservice and MonolithModule both inherit from Service but can have additional type-specific properties.Validate before bulk import
Validate before bulk import
Before importing a large dataset, run a validation pass to catch schema violations early. Fix the ontology or the data before committing the import.