Appearance
Creating a Knowledge Graph with Termboard
Knowledge Graphs are powerful tools for organizing and representing interconnected information. Termboard provides comprehensive support for building, importing, and exporting knowledge graphs with semantic richness.
What is a Knowledge Graph?
A Knowledge Graph is a structured representation of real-world entities (people, places, concepts, events) and the relationships between them. It combines the semantic expressiveness of ontologies with the practical applicability of databases.
Video Tutorial
For a visual walkthrough, watch How to create a knowledge graph on YouTube.
Knowledge Graph vs. Semantic Data Model
While these terms are often used interchangeably, there are subtle differences:
| Aspect | Semantic Data Model | Knowledge Graph |
|---|---|---|
| Primary Focus | Data structure and meaning | Interconnected entities and facts |
| Typical Use | Enterprise data architecture | AI/ML, search, recommendations |
| Schema | Usually well-defined upfront | Can evolve dynamically |
| Relations | Defines allowed relation types | Stores actual instances of relations |
| Example | "Customer HAS-A Order" | "John Smith placed Order #1234" |
In practice, Termboard supports both use cases. A semantic data model defines the "classes" and "allowed relationships," while a knowledge graph populates those with actual entities and facts.
Building a Knowledge Graph
Step 1: Define Your Core Entities
Start by identifying the main concepts (entities) in your domain:
- Create terms for each entity type
- Set the term type to "Concept" for main entities, "Property" for attributes
- Add descriptions to clarify what each entity represents
Example
For a movie knowledge graph:
- Concepts: Movie, Actor, Director, Genre, Studio
- Properties: Title, Release Date, Budget, Rating
Step 2: Establish Hierarchies (is-a Relations)
Create taxonomies using Generalization relations:
- Define a relation type with type "Generalization"
- Create relations like:
- Action Movie → Movie (Action Movie is-a Movie)
- Documentary → Movie (Documentary is-a Movie)
These hierarchical relations enable relation inheritance, where child concepts automatically inherit relations from parents.
Step 3: Define Semantic Relations
Add meaningful relationships between entities:
- Create relations between concepts using the graph or Add Relation dialog
- Name relations with clear, directional verbs:
- Actor →
stars in→ Movie - Movie →
directed by→ Director - Movie →
has genre→ Genre
- Actor →
- Set cardinalities to specify how many entities can be related:
- A Movie
has1..* Actors (one or more) - An Actor
stars in0..* Movies (zero or more)
- A Movie
See Cardinalities for details.
Step 4: Add Properties and Attributes
For each concept, define its properties:
- Create terms with type "Property"
- Link properties to concepts:
- Movie →
has property→ Release Date - Movie →
has property→ Budget
- Movie →
- Optionally hide properties in the graph view via
Importing Existing Ontologies
Termboard can import ontologies in OWL (Web Ontology Language) format, allowing you to leverage existing knowledge structures.
Importing OWL Files
- Go to
- Select or drag-and-drop your
.owlfile - Termboard will extract:
- Classes (as Concepts)
- Properties (as Properties)
- Hierarchical relations (as Generalizations)
- Object properties (as Relations)
Example Ontology Sources
Here are some well-known ontologies you can import:
| Ontology | Domain | Source |
|---|---|---|
| FIBO | Financial Industry | spec.edmcouncil.org/fibo |
| Schema.org | General Web | schema.org |
| FOAF | Social Networks | xmlns.com/foaf/spec |
| Dublin Core | Metadata | dublincore.org |
| BioCyc | Biological Data | ontobee.org |
Ontology Size
For optimal performance, avoid importing ontologies with more than 2000 classes. Larger ontologies may cause slow processing.
Working with FIBO (Financial Industry)
The Financial Industry Business Ontology (FIBO) is a comprehensive ontology for financial services:
- Import via
- Use Termboard's hierarchy view to explore the taxonomy
- Extend with your organization-specific concepts
AI-Powered Knowledge Graph Generation
Termboard includes AI capabilities to accelerate knowledge graph creation.
Generate a Knowledge Graph from a Topic
- Open
- Select the prompt "Knowledge Graph about a subject"
- Enter your subject (e.g., "Healthcare Data Management")
- Optionally add context to focus the model
- Click USE AI (if API configured) or COPY PROMPT for manual workflow
The AI will generate:
- Core concepts with descriptions
- Hierarchical relations (is-a)
- Semantic relations between concepts
Extract Ontology from Text
If you have existing documents describing your domain:
- Select the prompt "Ontology from text"
- Paste your document text
- The AI will identify:
- Key concepts mentioned in the text
- Relationships implied by the text
- Hierarchical structures
See Add in Bulk/Chatbot for detailed instructions.
Entity-Relationship Patterns
Knowledge graphs commonly use these patterns:
Taxonomic Pattern (is-a)
Vehicle
├── Car
│ ├── Sedan
│ └── SUV
└── MotorcycleUse Generalization relations for this pattern.
Part-Whole Pattern (has-part)
Car
├── has-part → Engine
├── has-part → Wheel (cardinality: 4)
└── has-part → ChassisAssociation Pattern
Person ←── works-for ──→ Organization
Person ←── lives-in ──→ Location
Organization ←── located-in ──→ LocationTemporal Pattern
Event
├── has-start-date → Date
├── has-end-date → Date
└── has-location → LocationExporting Knowledge Graphs
Export to JSON-LD
JSON-LD (JavaScript Object Notation for Linked Data) is the standard format for knowledge graph interoperability:
- Go to
- Select term types to export
- Click Export
The exported file can be:
- Loaded into graph databases (Neo4j, Amazon Neptune, etc.)
- Published as Linked Data on the web
- Imported into other knowledge graph tools
Experimental Feature
JSON-LD export is currently experimental. For best results, ensure your graph has consistent relation naming.
Export to JSON
For simpler integration needs:
- Go to
- Export your complete graph structure
- Use the JSON for:
- Custom applications
- Data pipelines
- Backup purposes
See Import/Export for all export options.
Validating Your Knowledge Graph
Use Termboard's Semantic Checks to ensure quality:
| Check | What It Catches |
|---|---|
| Duplicate Terms | Concepts with identical names |
| Circular Hierarchy | A is-a B is-a C is-a A |
| Missing Descriptions | Undocumented concepts |
| Isolated Terms | Concepts with no relations |
| Bidirectional Relations | Redundant A→B and B→A |
Best Practices
- Start with core concepts - Don't try to model everything at once
- Use consistent naming - Singular nouns for concepts, verbs for relations
- Document everything - Add descriptions to all terms and relations
- Leverage hierarchies - Use Generalization to reduce redundancy
- Validate regularly - Run semantic checks as you build
- Version your work - Save incremental versions as you progress
Example: Building a Simple Knowledge Graph
Let's create a small knowledge graph for a library:
Concepts:
- Book, Author, Publisher, Genre, Library Branch
Hierarchies:
- Fiction → Genre
- Non-Fiction → Genre
- Novel → Fiction
Relations:
- Book
written byAuthor - Book
published byPublisher - Book
belongs toGenre - Library Branch
holdsBook
Properties:
- Book: ISBN, Title, Publication Date
- Author: Name, Birth Date
- Publisher: Name, Location
You can see a live example at: termboard.com/app?demo=library
Related Resources
- Semantic Data Model Guide - Comprehensive semantic modeling
- Relation Types - Defining relation semantics
- Semantic Checks - Validating your model
- Import/Export - OWL, JSON-LD, and other formats
- AI Integration - Using AI to build your graph