Knowledge Representation and Expert Systems
Ontologies and Logic-Based Representation
An ontology is an explicit, formal specification of a domain's concepts and the relationships between them, shared and agreed upon so that different systems (or different people) mean the SAME thing by the same term — this shared-vocabulary role is precisely what the course's Discrete Mathematics chapter's propositional/first-order LOGIC gives a syntax and semantics for, and what this chapter's Web Programming/Semantic Web connection (covered again in this unit's own multi-agent-systems chapter) actually deploys ontologies for at scale. Logic-based representation states knowledge as formulas that can be manipulated by sound inference rules (modus ponens, resolution) to derive new facts — its strength is precision and provable correctness of what follows from what; its weakness is that many everyday facts ('birds typically fly') are not cleanly true-or-false in the way pure logic assumes, which is exactly the gap fuzzy sets (covered later in this unit) exist to fill.
Expert Systems
An expert system captures a human specialist's domain knowledge and reasoning process so a program can answer questions or make decisions at (approximately) expert level within that narrow domain. Its architecture has two DELIBERATELY SEPARATED parts: the KNOWLEDGE BASE (the domain facts and rules, e.g. 'IF fever AND rash THEN consider measles') and the INFERENCE ENGINE (the general reasoning machinery that applies those rules to a specific case) — this separation is what lets the same inference engine be reused across entirely different domains simply by swapping in a different knowledge base, and lets a domain expert update the rules without needing to understand or rewrite the reasoning machinery itself.
- Forward chaining starts from known facts and repeatedly fires rules whose conditions are satisfied, deriving new facts, until the goal is reached or nothing new can be derived — a DATA-DRIVEN strategy, natural when there is a fixed set of facts and the question is 'what can we conclude'.
- Backward chaining starts from a HYPOTHESIS (a goal to prove) and works backward, checking whether each rule's conditions can themselves be established (recursively, as sub-goals) — a GOAL-DRIVEN strategy, natural for diagnosis-style questions ('is it measles?') where checking one specific hypothesis is cheaper than deriving everything derivable from the facts.
Sources of Uncertainty in Knowledge
- Incompleteness: not all relevant facts about a case may be known or knowable at decision time.
- Imprecision: the facts that ARE known may themselves be vague or approximate rather than exact ('the patient has a high fever' rather than an exact temperature).
- Unreliability: a source of evidence (a test, a sensor, a witness) may itself be imperfectly reliable, so even a definite-sounding fact carries some residual doubt.
- These three sources are conceptually distinct, and different formal tools target different ones: probability theory is well suited to unreliability/incompleteness (given enough data about how often a source is right); fuzzy logic (this unit's own dedicated chapter) is specifically built for imprecision — vague linguistic categories that are not fundamentally about randomness at all.
Key takeaways
- Semantic networks give natural inheritance via IS-A links; frames give inheritance-with-exceptions via slots and defaults; scripts fill in unstated but expected details of a stereotyped situation.
- Conceptual dependency represents meaning via primitive actions (PTRANS, ATRANS) so differently-worded sentences with the same meaning get the same representation.
- An expert system separates a domain-specific knowledge base from a reusable, general inference engine; forward chaining is data-driven, backward chaining goal-driven.
- Classical certainty factors are heuristic, not formal probability, and can behave inconsistently — Bayesian probability and fuzzy logic are more principled alternatives.
- Incompleteness, imprecision and unreliability are distinct sources of uncertainty targeted by different formal tools — probability for the first and third, fuzzy logic for imprecision.
Practice questions (8)
Attempt each one before opening the answer. Every explanation names the tempting wrong option as well as the right one, because that is where marks are lost.
In a semantic network, a property attached to a general node being available to more specific nodes below it, unless explicitly overridden, is called:
Show answer
Answer: A — Inheritance
Inheritance via IS-A links is exactly what lets a semantic network state a fact once at a general level (Bird can fly) and have it apply automatically to specific instances (Sparrow), with exceptions (Penguin) stated explicitly lower down.A script (as a knowledge-representation scheme) is best suited to:
Show answer
Answer: A — Filling in unstated but expected details of a recurring, stereotyped situation
A script encodes what normally happens in a standard situation (like a restaurant visit), letting a system infer steps a specific narrative left unstated because they are the expected default.In conceptual dependency (CD), the goal of using a small set of primitive actions like PTRANS and ATRANS is:
Show answer
Answer: A — Sentences with the same meaning in different words produce the same representation
CD deliberately abstracts away from surface wording to a small set of meaning primitives, so 'X gave Y to Z' and 'Z received Y from X' — different words, same underlying event — map to the same representation.Separating an expert system's knowledge base from its inference engine chiefly allows:
Show answer
Answer: A — The same inference engine to be reused across different domains by swapping the knowledge base
The clean separation is exactly why the same general-purpose reasoning machinery can serve completely different domains (medical diagnosis, financial advice) just by loading a different set of domain rules and facts.Backward chaining, compared to forward chaining, is best described as:
Show answer
Answer: A — Goal-driven, starting from a hypothesis and checking whether its supporting conditions can be established
Backward chaining works backward from a specific hypothesis to prove, which is exactly why it suits diagnosis-style questions where testing one specific guess is cheaper than deriving everything derivable from the facts (forward chaining's own approach).Which of the following are among the three named sources of uncertainty in knowledge? (More than one option may be correct.)
Show answer
Answer: A — Incompleteness; B — Imprecision; C — Unreliability
Incompleteness, imprecision and unreliability are the three named sources, each targeted by different formal tools; compilation speed is a compiler-design concern, unrelated to knowledge uncertainty.Name the two structurally separate components of a classical expert system's architecture (the domain facts/rules, and the general reasoning machinery that applies them).
Numerical answer — type the value.
Show answer
Answer: knowledge base and inference engine
The knowledge base holds domain-specific facts and rules; the inference engine is the reusable, general reasoning machinery applied to them — the separation is what enables reuse of the engine across domains.Certainty factors, as used in classical expert systems like MYCIN, are best described as:
Show answer
Answer: A — Heuristic numbers, not formally derived probabilities, combined with ad hoc rules
Certainty factors are a pragmatic heuristic, not formally derived from a probability model, and are combined with ad hoc rules that can behave inconsistently — which is exactly why more principled alternatives (Bayesian probability, fuzzy logic) are used elsewhere.