Architecture and Components of Expert Systems
Explore the architecture of expert systems and understand how the Knowledge Base, Inference Engine, Working Memory, User Interface, Explanation Facility, and Knowledge Acquisition Module work together.
In our previous article, we learned what expert systems are and how they use specialised knowledge to solve problems.
But how does an expert system actually work internally?
Imagine a user asking an expert system to identify a machine fault. The system must receive the information, access its stored knowledge, apply relevant rules, reach a conclusion, and communicate the result.
These tasks are not performed by one single component. An expert system contains several interconnected components, each responsible for a particular function.
Together, they form the Architecture of an Expert System.
Understanding this architecture helps us see how knowledge is stored, how reasoning takes place, and how the system produces useful recommendations.
1. What Is the Architecture of an Expert System?
The architecture of an expert system describes the organisation of its components and how they interact to solve a problem.
It provides a structure through which the system can:
- Receive information from users.
- Access stored knowledge.
- Apply reasoning techniques.
- Generate conclusions.
- Explain its decisions.
- Update its knowledge when necessary.
A traditional expert system generally consists of five major components:
- Knowledge Base
- Inference Engine
- User Interface
- Explanation Facility
- Knowledge Acquisition Module
Some architectures also include a working memory, which stores information about the current problem while the system is reasoning.
Let’s understand each component.
2. Knowledge Base
The Knowledge Base is the central store of specialised knowledge in an expert system.
It contains the facts, rules, and relationships required to solve problems within a particular domain.
For example, consider an expert system designed to diagnose problems in a car engine.
Its knowledge base might contain rules such as:
IF engine does not start
AND battery voltage is low
THEN possible battery problem.
Another rule might be:
IF engine temperature is high
AND coolant level is low
THEN possible cooling system problem.
These rules represent knowledge that the system can use while analysing a problem.
What does the Knowledge Base contain?
It commonly contains:
Facts: Information about objects, conditions, or situations.
Rules: Statements that describe relationships between conditions and conclusions.
Heuristics: Experience-based guidelines that help solve problems when exact solutions are difficult to define.
The quality of the knowledge base is extremely important. If its information is incomplete or incorrect, the system may produce unreliable recommendations.
3. Inference Engine
The Inference Engine is the reasoning component of an expert system.
It examines the available facts, applies rules from the knowledge base, and derives conclusions.
Think of the knowledge base as the system’s stored knowledge and the inference engine as the mechanism that uses that knowledge.
For example, suppose the knowledge base contains:
Rule 1:
IF temperature is high
THEN cooling problem is possible.
Rule 2:
IF temperature is high
AND coolant level is low
THEN cooling system problem is likely.
A user provides:
Temperature: High
Coolant level: Low
The inference engine checks the conditions and applies Rule 2.
It can then conclude:
Possible cooling system problem.
The inference engine commonly uses two important reasoning strategies:
- Forward Chaining
- Backward Chaining
We will explore both in detail in Article 30.
4. User Interface
The User Interface allows users to interact with the expert system.
It acts as the communication layer between the user and the system.
Through this interface, users can:
- Enter information.
- Answer questions.
- Submit details about a problem.
- View recommendations.
- Request explanations.
For example, a machine-diagnosis system might ask:
Does the machine produce unusual noise?
1. Yes
2. No
The user selects an answer, and the system uses that information during its reasoning process.
The interface may be a command-line application, desktop program, website, or another type of application.
5. Working Memory
Working Memory stores the information related to the current problem being solved.
It is different from the knowledge base.
The knowledge base contains general domain knowledge, while working memory contains facts and intermediate results associated with a particular consultation.
For example, when diagnosing a car problem, working memory may contain:
Engine starts: No
Battery voltage: Low
Headlights: Dim
As the inference engine applies rules, it may add new conclusions to working memory.
This allows the system to keep track of the current reasoning process without changing its permanent knowledge base.
6. Explanation Facility
An expert system should not always provide a conclusion without explaining how it reached that result.
The Explanation Facility helps users understand the reasoning behind a recommendation.
It may answer questions such as:
- Why did the system reach this conclusion?
- Which facts were considered?
- Which rules were applied?
- Why was a particular question asked?
For example:
Conclusion:
Possible battery problem.
Explanation:
The engine did not start, and the
battery voltage was reported as low.
The system applied Rule 1.
This feature is especially useful in fields where users need to understand and evaluate the system’s recommendations.
7. Knowledge Acquisition Module
Knowledge Acquisition is the process of collecting, organising, and updating knowledge for the expert system.
The Knowledge Acquisition Module helps transfer knowledge from human experts and other reliable sources into a form that the system can use.
For example, a medical expert system may require knowledge from doctors, clinical guidelines, and medical research.
A knowledge engineer helps organise this information into facts and rules.
The knowledge acquisition process generally involves:
- Collecting knowledge from experts and reliable sources.
- Identifying important facts and relationships.
- Representing knowledge in a suitable format.
- Adding it to the knowledge base.
- Testing and updating the knowledge.
This process is important because expert systems depend heavily on the quality of their stored knowledge.
8. Overall Architecture of an Expert System
Now that we understand the individual components, let’s see how they work together.
USER
|
v
USER INTERFACE
|
v
WORKING MEMORY
|
v
INFERENCE ENGINE
|
v
KNOWLEDGE BASE
|
v
CONCLUSION
|
v
USER INTERFACE
EXPLANATION FACILITY
supports reasoning
KNOWLEDGE ACQUISITION
updates knowledge
This is a simplified conceptual representation. Actual expert system architectures may arrange and connect these components differently.
The important idea is that the system receives information, uses its stored knowledge to reason about the problem, and communicates its conclusions to the user.
9. How Do These Components Work Together?
Let’s consider a complete example.
Suppose an expert system is designed to identify possible faults in an industrial machine.
A worker reports that the machine is producing unusual noise and vibrating excessively.
Here is how the components interact:
Step 1: User Interface
The worker enters the symptoms into the system.
Step 2: Working Memory
The system stores the reported symptoms:
Unusual noise: Yes
Excessive vibration: Yes
Step 3: Inference Engine
The inference engine examines the available facts and searches for relevant rules.
Step 4: Knowledge Base
The system finds a rule:
IF unusual noise is present
AND excessive vibration is present
THEN inspect rotating components.
Step 5: Conclusion
The system produces a recommendation to inspect the rotating components.
Step 6: Explanation Facility
It explains that the recommendation was generated because both reported symptoms matched the conditions of the rule.
This example demonstrates how different components cooperate to solve a problem.
10. Expert System Architecture vs Traditional Software Architecture
Expert systems have some similarities with ordinary software, but their internal organisation is different.
| Feature | Traditional Software | Expert System |
|---|---|---|
| Main focus | Executes programmed operations | Uses specialised knowledge to solve problems |
| Knowledge | Often embedded in program logic | Stored separately in a knowledge base |
| Reasoning | Follows programmed procedures | Uses an inference mechanism |
| Updates | Often require code changes | Knowledge may be updated separately |
| Explanation | Depends on implementation | May include an explanation facility |
This separation between knowledge and reasoning is one of the defining ideas behind traditional expert systems.
11. Why Is Expert System Architecture Important?
A well-designed architecture makes an expert system easier to develop, maintain, and improve.
Its importance includes:
Modularity: Different components can be developed and maintained separately.
Knowledge management: Specialised information can be organised in a dedicated knowledge base.
Reusability: Some reasoning mechanisms can be reused across different expert systems.
Explainability: An explanation facility can help users understand how conclusions were reached.
Maintainability: Knowledge can often be updated without rewriting the entire reasoning mechanism.
However, the architecture alone does not guarantee accuracy. The system still depends on reliable knowledge, appropriate rules, and careful testing.
Conclusion
An expert system is not simply a collection of rules. It is a structured system in which multiple components work together to use specialised knowledge and produce conclusions.
The Knowledge Base stores information, the Inference Engine applies reasoning, Working Memory keeps track of the current problem, and the User Interface allows communication. The Explanation Facility makes the reasoning easier to understand, while Knowledge Acquisition helps maintain the system’s knowledge.
Together, these components form the foundation of traditional expert systems.
In the next article, we will examine two important reasoning techniques used by inference engines: Forward Chaining and Backward Chaining.
Next Article: Forward Chaining and Backward Chaining
Quick quiz
5 questionsOriginally published at farhanpaal.com — https://farhanpaal.com/articles/architecture-and-components-of-expert-systems/
Keep a copy
Read offline as a printout or PDF.
farhanpaal.com