AI Notes
Learn components. Knowledge base, inference engine. Expert systems 2024.
Introduction
An expert system is composed of several interconnected components that work together to simulate human expert reasoning. Understanding these components is essential for designing, building, and maintaining effective expert systems. Each component has a specific role: storing knowledge, applying reasoning rules, communicating with users, and explaining conclusions. Together, they form a complete architecture for automated expert-level decision making.
Core Architecture
| KNOWLEDGE | WORKING | EXPLANATION | ||
|---|---|---|---|---|
| BASE | MEMORY | FACILITY | ||
| (Rules, Facts, | (Current | (Why? How? | ||
| Heuristics) | case data) | reasoning trace) |
The Knowledge Base
The knowledge base is the repository of domain expertise. It contains facts, rules, heuristics, and relationships that an expert would use to solve problems.
Knowledge Representation Formats
Production Rules (IF-THEN)
IF condition1 AND condition2 THEN conclusion (CF)
Most common format, easy to understand and maintain
Frames (structured objects)
Frame: Automobile
Slots: wheels=4, engine_type={gas,electric,hybrid}
seats=[2-8], has_trunk=true
Instance: MyTesla inherits Automobile
engine_type=electric, seats=5, range=300mi
Semantic Networks (graph relationships)
[Dog] --is-a--> [Mammal] --is-a--> [Animal]
[Dog] --has--> [Fur]
[Dog] --eats--> [Meat]
The Inference Engine
The inference engine is the reasoning component that applies knowledge base rules to working memory facts to derive new conclusions.
Forward Chaining (data-driven)
Start with known facts
Find rules whose conditions are satisfied
Fire those rules to derive new facts
Repeat until goal reached or no more rules fire
Working Memory: {fever=101°F, cough=true, headache=true}
Rule 1: IF fever > 100 AND cough THEN possible_flu (fires!)
Rule 2: IF possible_flu AND headache THEN likely_flu (now fires!)
Result: likely_flu added to working memory
Backward Chaining (goal-driven)
Start with hypothesis (goal)
Find rules that conclude the goal
Check if conditions are met (recursively)
Ask user for unknown facts
Goal: Is the patient likely to have flu?
Rule: IF fever > 100 AND cough AND headache THEN likely_flu
Check: fever > 100? → check working memory → YES (101°F)
Check: cough? → not in memory → ASK USER → "Yes"
Check: headache? → not in memory → ASK USER → "Yes"
Conclusion: likely_flu = TRUE
Conflict Resolution Strategies
When multiple rules can fire simultaneously:
| 1. Specificity | Prefer more specific rules (more conditions) |
| Rule A | IF fever THEN rest (general) |
| Rule B | IF fever AND rash AND joint_pain THEN check_dengue (specific) |
| 2. Recency | Prefer rules matching most recently added facts |
| 3. Priority | Rules assigned explicit priority levels |
| 4. Refractoriness | Don't fire same rule on same data twice |
Working Memory
Working memory holds the current state of the problem being solved:
Contents
- User-provided inputs (symptoms, measurements, observations)
- Intermediate conclusions (derived by inference engine)
- Current certainty factors for each assertion
- Trace of which rules fired and when
Example session state
Working Memory = {
patient_age: 45,
temperature: 101.2°F,
cough: true (user-provided),
possible_flu: true (derived by Rule 7, CF=0.75),
recommend_test: true (derived by Rule 12, CF=0.6)
}
The Explanation Facility
One of the most valuable features distinguishing expert systems from black-box AI:
| User | "Why do you think the patient has flu?" |
| These match Rule 7 | IF fever AND cough AND headache THEN flu |
| User | "Why did you ask about headache?" |
| System | "I asked about headache because: |
Knowledge Acquisition Facility
| Challenge | Experts often cannot articulate tacit knowledge |
| Decision tree | production rules (straightforward conversion) |
| Deploy system | collect failure cases |
User Interface
Interface requirements
- Natural language-like queries and explanations
- Ability to ask "why" at any point during consultation
- Clear presentation of conclusions with confidence levels
- Support for "what-if" scenarios
- Menu-driven input for structured data entry
Example interaction
System: "What is the patient's temperature?"
User: "101.2"
System: "Is the patient experiencing cough?"
User: "Yes"
System: "Based on current information, preliminary assessment:
Influenza (confidence: 75%)
Would you like me to continue evaluation?"
Summary
Expert systems achieve their power through the careful integration of specialized components. The knowledge base stores domain expertise in structured formats. The inference engine applies logical reasoning to derive conclusions. Working memory maintains the current problem state. The explanation facility provides transparency and trust. Together, these components create systems capable of expert-level reasoning while remaining interpretable, auditable, and maintainable.
Exam Focus
Revise definitions, diagrams, examples, and short-answer points for Expert Systems Components.
Interview Use
Prepare one clear explanation, one practical example, and one common mistake for this Artificial Intelligence topic.
Search Terms
artificial-intelligence, artificial intelligence, artificial, intelligence, expert, systems, components, expert systems components
Related Artificial Intelligence Topics