UPI Study › Courses › Introduction to Artificial Intelligence › Free lessons › Lesson 6.7 Free with a free account
Structuring Domain Knowledge for AI Systems
Introduction to Artificial Intelligence · Chapter 6: Logic, Reasoning, and Knowledge SystemsSection 6.7 · lesson 45 of 6913 min · free with a free account
Free preview
Create a free account to keep watching
It takes a minute and costs nothing. Your free account unlocks all of Chapter 1 and 3 more lessons of Introduction to Artificial Intelligence.
Lesson complete
Earn the 3 college credits for Introduction to Artificial Intelligence
Enrolling adds a quiz after each lesson, the graded work and the official transcript. Recommended for credit by NCCRS.
Next lesson: Forward Chaining: Deriving Conclusions from Rules →← Resolution-Based Inference in Logical SystemsNext lesson: Forward Chaining: Deriving Conclusions from Rules →
In this lesson
How taxonomies, frames, ontologies and knowledge graphs organize what AI knows.
- Distinguish taxonomies, semantic networks, frames, ontologies and knowledge graphs
- Apply inheritance and default overrides in a frame hierarchy
- Describe the knowledge engineering loop and the role of competency questions
- Choose a representation that matches the shape of a domain's knowledge
Free study notes
Get this lesson's notes by email
The key points and 4 practice questions with answers, in your inbox. One email, free.
One email. Unsubscribe in one click.
Transcript
Everything said in the video, section by section (1,796 words). Read along, or search it.
Opening Question
Shaping a Library's Knowledge
Picture an AI system that answers questions about a public library. It needs more than a heap of facts. It must know that a novel is a kind of book, that a book is a kind of item, that items sit in branches, and that members borrow items. How those facts are organized decides what the system can find, how easily it can grow, and how hard it is to keep correct. Choosing that organization is the problem of knowledge representation. So how should the library's knowledge be shaped?
Overview
Five Friendly Knowledge Structures
Lesson two point three showed that an expert system keeps its expertise in a knowledge base. First-order logic, from lesson six point four, is one precise but demanding way to state it. The structures here are friendlier, and very widely used: taxonomies, semantic networks, frames, ontologies, and knowledge graphs. A good representation is expressive enough to capture what matters, efficient enough to use, and clear enough for people to build and maintain.
Taxonomy
Is-A Trees and Inheritance
A taxonomy arranges concepts in a tree, from general at the top to specific at the bottom, using a single kind of link: is a. A Novel is a Book, a Reference Book is a Book, and a Book is an Item. So is a DVD. The key benefit is inheritance. Anything true of a general concept is automatically true of the concepts below it. If every Item can be shelved, then every Book and every Novel can be shelved too, and nobody has to say so again for each one. Product catalogs, website menus, and the naming of living things all use taxonomies.
Semantic Networks
Labeled Links Between Concepts
A semantic network draws knowledge as a graph. Each node is a concept or object, and each labeled arrow is a relationship. A Member borrows an Item. An Item is held at a Branch. A Librarian works at a Branch. A taxonomy is the special case where every link is is a. Networks are easy to draw and read, because you follow the arrows. But they have one well-known weakness: the meaning of a link isn't fixed. Priya is a Member puts one individual in a category. Member is a Person puts one category inside another. Careful designers use two links: instance of, and subcategory of. And they keep a third link, part of, for a cover being part of a book. A cover isn't a kind of book.
Quick Check
Instance Of Versus Subcategory Of
Quick check, from a museum. Its network says, Mona Lisa is a Painting, and, Painting is an Artwork. Which pair of link names is right? Instance of, then subcategory of? Subcategory of, then instance of? Or part of, then subcategory of? Pause, and decide. Instance of, then subcategory of. The Mona Lisa is one individual painting, so it's an instance of the category Painting. Painting is a whole category, and it sits inside the larger category Artwork. And part of would fit a frame being part of a painting, not a painting being a kind of thing.
Frames
Records with Slots and Defaults
A frame is a structured record for a concept or an individual. It has named slots, each holding a value, such as author, genre, or loan period. Frames form a hierarchy, and a more specific frame inherits the slots of the more general one. A slot can also hold a default: a best guess, unless something more specific says otherwise.
Worked Example
The Nearest Loan Period Wins
Item sets a default loan period of fourteen days. Book sets nothing, so it inherits fourteen. DVD overrides the default with seven days. Reference Book overrides the fourteen it would inherit from Book, with zero: it can't be borrowed. And the Atlas of Birds, a Reference Book, inherits that zero. The rule: the nearest, most specific value wins. So the exception is stated once, in one place, and typical cases and exceptions live together.
Quick Check
A Kids DVD Inherits Seven Days
Quick check. The library adds a Kids DVD frame, below DVD, and it sets no loan period of its own. What loan period does a Kids DVD get? Seven days, one level up? Fourteen days, Item's default? Or no period at all? Pause, and decide. Seven days, from DVD. The nearest frame above Kids DVD that sets a loan period is DVD, so its seven wins. Item's fourteen is further up, and DVD already overrode it. And an empty slot isn't an empty answer: it's filled by inheritance.
Ontology
Shared Vocabulary with Constraints
An ontology is an explicit, shared specification of a domain's concepts, the relations among them, and the rules that govern them. It goes beyond a taxonomy by adding relations, attributes, and constraints. For the library, it defines Item, Book, Member, Branch, and Loan, relations like borrows and held at, and statements like: every Loan involves exactly one Member and exactly one Item. And: a Reference Book is never on loan. Ontologies are valued for three reasons. They give people and programs a shared vocabulary, so Item means the same thing everywhere. Their constraints let tools check consistency, for example by flagging a loan with two members. And they let you combine data from several sources. Common standards for writing them down are RDF, for facts, and OWL, the Web Ontology Language, for concepts and rules.
Knowledge Graph
Facts Stored as Triples
A knowledge graph is a large network of entities and the facts that link them. Each fact is a triple: subject, relation, object. For example: The Quiet Harbor, written by, Mara Lindqvist. Each arrow on the board is one triple. Priya Nair borrowed The Quiet Harbor, and she's a member of Riverside Branch. The Quiet Harbor is held at Riverside, and its genre is Mystery. Mara Lindqvist also wrote Salt and Lantern, another mystery, held at a different branch. A knowledge graph is usually organized by an ontology. The ontology is the blueprint, and the knowledge graph is the building constructed from it.
Querying
Following Links to Answer Questions
The power of a graph lies in following links. Find the mystery novels by Mara Lindqvist, held at Riverside Branch. Start from the books she wrote, keep those whose genre is Mystery, and keep those held at Riverside. The answer is The Quiet Harbor. A suggestion for Priya works the same way. She borrowed The Quiet Harbor, written by Mara Lindqvist, who also wrote Salt and Lantern. Three links lead to a book she might enjoy. That's simple traversal, not rule-based reasoning. Knowledge graphs run at huge scale: search engines and online stores use them to link products, people, and places, and Wikidata is an open example.
Comparison
Taxonomy, Ontology and Knowledge Graph
Compare three of them. A taxonomy captures categories and is a links, like Novel is a Book. It answers, what kind of thing is this? An ontology captures concepts, relations, and constraints, like every Loan has one Member and one Item. It answers, what can be said about Loans? A knowledge graph captures entities and the facts about them, like Priya Nair borrowed The Quiet Harbor. It answers, which books has this member borrowed?
Quick Check
Rental Cars Fit a Frame Hierarchy
Quick check. A car rental system keeps a record for every car: seats, fuel type, and daily rate. Most cars have five seats and run on gas, but vans have eight seats, and some cars are electric. Which structure fits best: a taxonomy, a frame hierarchy, or a knowledge graph? Pause, and decide. A frame hierarchy. Every car has the same slots, and a Car frame can hold the defaults: five seats, gas. A Van frame overrides seats with eight, and an Electric Car frame overrides fuel type. A taxonomy could list the kinds of car, but it has no slots or defaults. And a knowledge graph shines with many kinds of relationships, not one record shape with exceptions.
Knowledge Engineering
Competency Questions Drive the Build
Building such a structure is a project of its own, called knowledge engineering. A domain expert supplies the knowledge, and a knowledge engineer turns it into a form the system can use. First, define the purpose, with competency questions: the real questions the system must answer. Gather knowledge from experts, documents, and existing data. Choose a form. Model the domain: name the concepts, relations, and attributes, and add constraints. Fill in the individual facts. Test and refine: ask the competency questions, find the gaps, and go around again. If the library must say which branch holds a book, and there's no held at relation, the test exposes the gap. Start small, reuse existing vocabularies, keep names consistent, and plan for upkeep. And gathering the knowledge is usually the slowest part: the knowledge acquisition bottleneck.
Expressiveness
A Ladder of Representations
No single representation is best for everything. Think of a ladder. A taxonomy is a tree of is a links, and a semantic network adds labeled links. Frames add slots and defaults. Ontologies and knowledge graphs add a shared vocabulary, constraints, and many facts. At the top, logic and rules support exact reasoning. Each step up can say more, and each step costs more effort to build and maintain.
Choosing a Form
Matching Representation to Knowledge Shape
So match the representation to the shape of the knowledge. A hierarchy of categories, like a product catalog, fits a taxonomy: simple to build, browse, and maintain. Many kinds of relationships among people, places, and things fit a semantic network or knowledge graph, where new links are easy to add. Records with the same attributes, typical values, and exceptions fit frames. Many teams sharing one precise vocabulary, with consistency checks, need an ontology. And facts that must support exact reasoning call for first-order logic and rules. Real systems often combine forms, like a knowledge graph organized by an ontology, with rules on top.
Trade-Offs
The Main Strength and Limit of Each
Each has a main strength and a main limit. A taxonomy is simple, but has only one kind of link. A semantic network is flexible, but its link meanings aren't standardized. Frames are compact, with defaults and exceptions, but awkward for relations among several objects. An ontology is precise and checkable, but costly, and it needs agreement. A knowledge graph scales to many facts, but needs quality control and constant updating. So ask: how is the knowledge shaped, who maintains it, how big will it grow, and how often will it change?
Common Mistakes
Four Modeling Mistakes to Avoid
Four mistakes to avoid. Don't use is a for everything: an engine is part of a car, not a kind of car. Don't model before asking questions. Without competency questions, a model grows large without being useful. Don't treat a taxonomy as a full ontology: it has only is a links, with no relations or constraints. And don't expect one representation to fit every need. Match the form to the knowledge, and combine forms when needed.
Key Takeaways
Structures, Inheritance and Engineering
To sum up. Taxonomies organize concepts with is a links, semantic networks add labeled relations, and frames bundle slots with defaults. Inheritance passes general knowledge down, and the nearest value wins. An ontology is a shared vocabulary with constraints, and a knowledge graph stores facts as triples. Knowledge engineering is a loop, driven by competency questions. And pick the form that matches the knowledge's shape, since more expressive forms cost more.
About Introduction to Artificial Intelligence at UPI Study
Introduction to Artificial Intelligence (Computer Science 373) is a self-paced online course of 69 video lessons in 9 chapters, from intelligent agents and search to game strategy, neural networks, logic and reasoning, machine learning, language, robotics and AI ethics. It carries a NCCRS credit recommendation for 3 semester credits.
Every lesson transcript is free on pages like this one, and the videos are free with a free UPI Study account. Enrolling adds a practice quiz after each lesson, the graded work and final exam that earn the credit, lifetime access, and an official transcript on completion. UPI Study has helped over 130,000 students with college credits. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.
Enroll now → Course details Download the syllabus All Computer Science courses Every course with PRO →
Compare: AI vs Current Trends in CS and IT
Why take it here
Why students take Introduction to Artificial Intelligence with UPI Study
Where the credit goes
Universities that work with NCCRS
Introduction to Artificial Intelligence carries a NCCRS credit recommendation. These universities work with NCCRS; some are UPI Study's signed partners. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.
Thomas Edison State UniversitySigned partner
University of the PeopleSigned partner
Charter Oak State CollegeSigned partner
Strayer UniversitySigned partner
Columbia Southern UniversitySigned partner
Indiana TechSigned partner
Penn StateWorks with NCCRS
Southern New Hampshire UniversityWorks with NCCRS
SUNYWorks with NCCRS
+many more cooperating universitiesFind my college →Find my college → Not listed? Ask Athena in the corner of this page, or book a 15-minute call.
FAQ
Questions students ask us
About Structuring Domain Knowledge for AI Systems
What is the difference between an ontology and a knowledge graph?
How does inheritance work in a frame hierarchy?
What is the difference between is-a and part-of relationships?
What are competency questions in knowledge engineering?
About the Introduction to Artificial Intelligence course
How many college credits is Introduction to Artificial Intelligence?
How much does Introduction to Artificial Intelligence cost and what is included?
Which universities accept UPI Study credits?
How long does Introduction to Artificial Intelligence take?
How are the exams done?
How do my credits reach my college?
Ready for the full course? Earn 3 credits in Introduction to Artificial Intelligence.
69 video lessons, a quiz after each one, and the graded work that earns the credit. Recommended for credit by NCCRS.
3 credits · NCCRSEnroll →