MODULE 5: EXPERT SYSTEM
Introduction
An expert system is a computer program designed to solve
complex problems and provide decision-making abilities
similar to that of a human expert.
It extracts knowledge from its knowledge base using reasoning
and inference rules to respond to user queries.
The concept of expert systems emerged in the 1970s, marking a
significant milestone in artificial intelligence.
The first successful expert system was developed in this period,
showcasing the potential of AI in problem-solving.
Expert systems represent the expert knowledge of a specific
domain and can tackle complex problems within that domain.
Let's assume we want to identify an animal either as a duck,
snake, lizard or Hen.
Components of expert system
Components of an Expert System
1. User Interface:
Facilitates interaction between the user and the expert
system.
Takes queries from the user in a readable format and
passes them to the inference engine.
Displays the system's response to the user.
2. Inference Engine:
Acts as the brain of the expert system, processing user
queries and deriving conclusions.
Applies inference rules to the knowledge base to deduce
new information or conclusions.
Two types:
Deterministic Inference Engine: Based on facts
and rules, assumes conclusions to be true.
Probabilistic Inference Engine: Introduces
uncertainty in conclusions based on probabilities.
Modes of inference:
Forward Chaining: Starts from known facts and
rules, adding their conclusions to the known facts.
Backward Chaining: Starts from the goal and works
backward to prove known facts.
3. Knowledge Base:
Stores knowledge acquired from domain experts, serving
as a repository of expertise.
Contains factual and heuristic knowledge:
Factual Knowledge: Based on facts and accepted
by knowledge engineers.
Heuristic Knowledge: Derived from practical
experience, guessing, evaluation, and past
experiences.
Knowledge Representation:
Formalizes knowledge stored in the knowledge base
using if-else rules.
IF an animal has feathers THEN it is a bird
Knowledge Acquisition:
Process of extracting, organizing, and structuring
domain knowledge.
Specifies rules to acquire knowledge from experts
and store it in the knowledge base.
Database vs Knowledge base
Database
Aspect Knowledge Base
Contains structured data, often
Contains domain-specific knowledge,
relational or hierarchical
Content rules, and heuristics
Stores structured data for retrieval
Stores information for reasoning and
and manipulation
Purpose decision-making
Organized for efficient storage and
Organized to facilitate inference and
retrieval
Structure problem-solving
Fixed schema for consistent data
Flexible structure for accommodating
storage
Flexibility complex knowledge
Used by various applications for
Used by expert systems for
data management
Usage knowledge processing
Customer records, product
Production rules, domain facts, expert
inventory, transaction logs
Examples insights
Characteristics of ES:
1. Should Solve Difficult Problems Effectively:
Capable of effectively tackling complex problems, often
surpassing the performance of human experts in certain
domains.
2. Should Possess Comprehensive Domain-Specific
Knowledge:
Should possess extensive and detailed knowledge
relevant to the problem domain, covering a wide range of
topics and intricacies.
3. Should Employ Heuristic Search Strategies:
Should utilize heuristic search techniques to efficiently
explore problem spaces and find satisfactory solutions in a
timely manner.
4. Should Provide Transparent Reasoning:
Should offer clear explanations for the questions posed
and justify its conclusions, enhancing user understanding
and confidence in the system's output.
5. Should Adapt and Learn Over Time:
Should be capable of adapting to new information,
learning from past experiences, and continuously
improving its performance over time.
6. Should Handle Uncertainty and Irrelevance:
Should effectively manage uncertain and irrelevant data,
employing robust reasoning mechanisms to make
informed decisions even in uncertain environments.
7. Should Facilitate Natural Language Interaction:
Should enable users to interact with the system using
natural language, making it more accessible and user-
friendly.
8. Should Personalize Recommendations:
Should tailor its recommendations and solutions to the
individual preferences and requirements of users,
providing personalized experiences.
9. Should Emphasize Symbolic Processing:
Should prioritize symbolic processing techniques over
numeric processing, emphasizing logical reasoning and
pattern recognition.
10. Should Be Resource-Efficient:
Should utilize resources efficiently, minimizing
computational overhead while generating effective
solutions in a timely manner.
Forward and Backward chaining:
A. Forward Chaining:
Also known as forward deduction or forward reasoning method.
Begins with atomic sentences in the knowledge base.
Applies inference rules (like Modus Ponens) in the forward
direction.
Starts from known facts and triggers rules whose premises are
satisfied.
Adds conclusions to known facts, repeating the process until
the goal is reached.
Properties:
Down-up approach, moving from bottom to top.
Data-driven approach, utilizing available data to reach the
goal.
Commonly used in expert systems, business, and
production rule systems.
B. Backward Chaining:
Also known as backward deduction or backward reasoning
method.
Begins with the goal and works backward, chaining through
rules to find known facts supporting the goal.
Properties:
Top-down approach.
Based on the modus ponens inference rule.
Breaks the goal into sub-goals to prove facts true.
Goal-driven approach, where a list of goals selects and
uses rules.
Used in game theory, automated theorem proving tools,
inference engines, proof assistants, and various AI applications.
Often employs a depth-first search strategy for proof.
Difference of forward and backward chaining:
Backward Chaining
Aspect Forward Chaining
Starts from the goal and
works backward to
Process Takes a decision based on
determine required facts.
Description available data.
Goal-driven technique, starts
Data-driven technique,
from the goal and reaches
Data-Driven vs utilizes available data to
the initial state.
Goal-Driven reach the goal.
Top-down approach
Approach Bottom-up approach
Depth-First Strategy
Search Strategy Breadth-First Strategy
To identify possible facts or
acquire required data
Goal To obtain the conclusion
Faster, as it requires only a
Slower, as it needs to
few rules
Speed consider all rules
Backward direction, from
Direction of Forward direction, from
goal to initial state
Operation initial state to final decision
Automated inference
engines, theorem proofs,
Planning, monitoring,
proof assistants
Applications control, interpretation
Example of forward and backward chaining:
Using forward chaining:
Using backward chaining:
Application of expert system:
1. Medical Diagnosis: Expert systems aid physicians in
diagnosing diseases and recommending treatments based on
symptoms and patient data.
2. Financial Advising: These systems offer personalized financial
advice by analyzing investment opportunities and market
conditions.
3. Customer Support: Expert systems provide immediate
assistance and troubleshooting guidance in customer service
interactions.
4. Industrial Automation: They optimize manufacturing
processes and predict maintenance needs to improve
efficiency.
5. Fault Diagnosis: Expert systems accurately identify faults in
machinery and recommend corrective actions.
6. Educational Tutoring: These systems deliver personalized
learning experiences to students, assessing strengths and
weaknesses.
7. Legal Decision Support: Expert systems assist legal
professionals in researching case law and formulating legal
strategies.
8. Natural Language Processing: They enable communication
between humans and machines through virtual assistants and
chatbots.
9. Environmental Monitoring: Expert systems analyze
environmental data to predict trends and recommend
conservation measures.
10. Agricultural Planning: They help farmers optimize crop
selection and management practices based on environmental
factors and market trends.
Advantages of Expert System
o These systems are highly reproducible.
o They can be used for risky places where the human presence is
not safe.
o Error possibilities are less if the KB contains correct knowledge.
o The performance of these systems remains steady as it is not
affected by emotions, tension, or fatigue.
o They provide a very high speed to respond to a particular
query.
Limitations of Expert System
o The response of the expert system may get wrong if the
knowledge base contains the wrong information.
o Like a human being, it cannot produce a creative output for
different scenarios.
o Its maintenance and development costs are very high.
o Knowledge acquisition for designing is much difficult.
o For each domain, we require a specific ES, which is one of the
big limitations.
o It cannot learn from itself and hence requires manual updates