🏗 Basic Architecture of an Expert System (with Examples)
An expert system mimics human expertise in solving specific problems. It has five main
components:
1. Knowledge Base
✅ Definition:
A repository of facts and rules representing the domain knowledge of the expert.
🔧 Function:
Stores "if-then" rules and known facts about the problem domain.
📌 Example:
In a Medical Diagnosis System:
Fact: Patient has high fever and sore throat.
Rule:
IF patient has fever AND sore throat
THEN patient might have flu.
2. Inference Engine
✅ Definition:
The brain of the expert system. It uses logic to apply rules to the known facts.
🔧 Function:
Matches facts from the knowledge base.
Applies reasoning to infer new facts or conclusions.
📌 Example:
Given:
Fact: Patient has fever and sore throat.
Rule: If patient has fever and sore throat, then patient might have flu.
Inference Engine Conclusion: "Patient might have flu."
It can use:
Forward Chaining: From facts → to conclusions.
Backward Chaining: From a hypothesis ← to supporting facts.
3. User Interface
✅ Definition:
The medium for interaction between the user and the system.
🔧 Function:
Allows users to enter input (symptoms, questions, etc.).
Displays the system's conclusions and suggestions.
📌 Example:
User inputs:
"I have a fever and sore throat."
The system responds:
"Based on your symptoms, you might have the flu. Would you like to see treatment options?"
4. Explanation Facility
✅ Definition:
Explains the system's reasoning and how it reached a conclusion.
🔧 Function:
Justifies answers to users.
Increases trust in the system.
📌 Example:
User asks:
"Why did you say I might have the flu?"
System responds:
"Because you reported a fever and sore throat, and the rule in the knowledge base links those
symptoms to the flu."
5. Knowledge Acquisition Module
✅ Definition:
A tool to help experts or engineers add new knowledge (facts and rules) to the system.
🔧 Function:
Updates the knowledge base.
Allows learning or manual input of new information.
📌 Example:
A medical expert adds:
IF patient has fever AND rash
THEN patient might have measles.
This rule is now available for future reasoning.
🧠 Summary Table (with Examples)
Component Role in Expert System Example in Medical System
Knowledge Base Stores facts and rules "IF fever AND sore throat → flu"
Applies rules to facts to draw "Patient has symptoms → Conclusion:
Inference Engine
conclusions flu"
User types symptoms; system shows
User Interface Communication tool for users
possible disease
Explanation "Flu was suggested due to fever + sore
Explains decisions made
Facility throat"
Knowledge Expert adds a new rule for diagnosing
Adds new knowledge
Acquisition measles