Structuring Domain Knowledge for AI Systems, Explained

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

← Resolution-Based Inference in Logical SystemsNext lesson: Forward Chaining: Deriving Conclusions from Rules →

Earn 3 college credits for Introduction to Artificial IntelligenceRecommended for credit by NCCRS · Computer Science 373 · self-paced · one payment, lifetime access

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.

Compare: AI vs Current Trends in CS and IT

Why take it here

Why students take Introduction to Artificial Intelligence with UPI Study

How machines search, reason and learnIntroduction to Artificial Intelligence covers how AI systems are built: intelligent agents, search and heuristics, game strategy, logic, neural networks, machine learning, language and perception, and the ethics of AI. It is a common upper-level course in computer science degrees.
Credit at a fraction of the priceThe same 3 credits can cost $750 or more at a US college. Here it is one payment, self-paced, with lifetime access.
Finish your degree soonerTransfer credits reduce the courses you still owe, so you can graduate earlier or lighten a heavy semester.
Strengthen an applicationA completed college-level course on an official transcript shows admissions and scholarship committees you can do the work.
Study on your own scheduleNo start dates, no deadlines. Watch the lessons, practice, and take the final when you are ready.
130,000+students helped with college creditsACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.

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.

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?
An ontology is an explicit, shared specification of a domain's concepts, relations and constraints, while a knowledge graph is a large network of specific entities and facts stored as subject, relation, object triples. The ontology is the blueprint, and the knowledge graph is the building constructed from it. Common standards are RDF for writing facts and OWL, the Web Ontology Language, for concepts and rules.
How does inheritance work in a frame hierarchy?
In a frame hierarchy, a more specific frame inherits slots from more general ones, and the nearest, most specific value wins. If Item sets a 14-day loan period and DVD overrides it with 7 days, a Kids DVD frame that sets nothing gets 7 days from DVD. Defaults let typical cases and exceptions live together, with each exception stated only once.
What is the difference between is-a and part-of relationships?
An is-a link says one thing is a kind of another, while a part-of link says one thing is a component of another. A Novel is a Book, but a cover is part of a book, not a kind of book. Careful designers also split is-a into instance of, for one individual like the Mona Lisa, and subcategory of, for a category like Painting inside Artwork.
What are competency questions in knowledge engineering?
Competency questions are the real questions a knowledge-based system must answer, written down first to define its purpose. They guide which concepts and relations to model and later serve as tests. If a library system must say which branch holds a book but has no held-at relation, asking that question exposes the gap. Modeling without them tends to produce a large model that is not useful.

About the Introduction to Artificial Intelligence course

How many college credits is Introduction to Artificial Intelligence?
Introduction to Artificial Intelligence (Computer Science 373) carries a NCCRS credit recommendation for 3 semester credits. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.
How much does Introduction to Artificial Intelligence cost and what is included?
$250, paid once, with lifetime access: all 69 video lessons, a practice quiz after each, the graded work and final exam, and an official transcript when you finish. Students who want several courses choose UPI Study PRO instead.
Which universities accept UPI Study credits?
UPI Study has signed partner agreements with universities such as Thomas Edison State University, University of the People and Charter Oak State College, and works with universities such as Penn State, SNHU and SUNY. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities. Use "Find my college" on this page to check yours.
How long does Introduction to Artificial Intelligence take?
It is self-paced with no deadlines. The 69 lessons total about 16 hours of video; most students add reading and practice time and finish in a few weeks to a few months, on their own schedule.
How are the exams done?
Quizzes and assignments are online in the course. The final exam is taken online with proctoring; a person on the UPI Study team checks assignments, usually within two days.
How do my credits reach my college?
When the course shows 100% complete, request the official transcript from your dashboard. It is sent to the college you name, and you can send it to more than one. Check your college first with "Find my college" on this page, or ask Athena.

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.

Introduction to Artificial Intelligence
3 credits · NCCRS
Enroll →