ExpertSystem 1

Download as pdf or txt
Download as pdf or txt
You are on page 1of 12

Expert System

An expert system is a computer program that is designed to solve complex problems and to provide
decision-making ability like a human expert. It performs this by extracting knowledge from its
knowledge base using the reasoning and inference rules according to the user queries.

The expert system is a part of AI, and the first ES was developed in the year 1970, which was the
first successful approach of artificial intelligence. It solves the most complex issue as an expert by
extracting the knowledge stored in its knowledge base. The system helps in decision making for
complex problems using both facts and heuristics like a human expert. These systems are designed
for a specific domain, such as medicine, science, etc. One of the common examples of an ES is a
suggestion of spelling errors while typing in the Google search box.

Below is the block diagram that represents the working of an expert system:

Note: It is important to remember that an expert system is not used to replace the human experts;
instead, it is used to assist the human in making a complex decision. These systems do not have
human capabilities of thinking and work on the basis of the knowledge base of the particular
domain.

Below are some popular examples of the Expert System:

o DENDRAL: It was an artificial intelligence project that was made as a chemical analysis
expert system. It was used in organic chemistry to detect unknown organic molecules with
the help of their mass spectra and knowledge base of chemistry.

o MYCIN: It was one of the earliest backward chaining expert systems that was designed to
find the bacteria causing infections like bacteraemia and meningitis. It was also used for the
recommendation of antibiotics and the diagnosis of blood clotting diseases.

o PXDES: It is an expert system that is used to determine the type and level of lung cancer. To
determine the disease, it takes a picture from the upper body, which looks like the shadow.
This shadow identifies the type and degree of harm.
o CaDeT: The CaDet expert system is a diagnostic support system that can detect cancer at
early stages.

Characteristics of Expert System

o High Performance: The expert system provides high performance for solving any type of
complex problem of a specific domain with high efficiency and accuracy.

o Understandable: It responds in a way that can be easily understandable by the user. It can
take input in human language and provides the output in the same way.

o Reliable: It is much reliable for generating an efficient and accurate output.

o Highly responsive: ES provides the result for any complex query within a very short period of
time.

Components of Expert System

An expert system mainly consists of three components:

o User Interface

o Inference Engine

o Knowledge Base
1. User Interface

With the help of a user interface, the expert system interacts with the user, takes queries as an input
in a readable format, and passes it to the inference engine. After getting the response from the
inference engine, it displays the output to the user. In other words, it is an interface that helps a
non-expert user to communicate with the expert system to find a solution.

2. Inference Engine(Rules of Engine)

o The inference engine is known as the brain of the expert system as it is the main processing
unit of the system. It applies inference rules to the knowledge base to derive a conclusion or
deduce new information. It helps in deriving an error-free solution of queries asked by the
user.

o With the help of an inference engine, the system extracts the knowledge from the
knowledge base.

o There are two types of inference engine:

o Deterministic Inference engine: The conclusions drawn from this type of inference engine
are assumed to be true. It is based on facts and rules.

o Probabilistic Inference engine: This type of inference engine contains uncertainty in


conclusions, and based on the probability.

Inference engine uses the below modes to derive the solutions:

o Forward Chaining: It starts from the known facts and rules, and applies the inference rules
to add their conclusion to the known facts.

o Backward Chaining: It is a backward reasoning method that starts from the goal and works
backward to prove the known facts.

3. Knowledge Base

o The knowledgebase is a type of storage that stores knowledge acquired from the different
experts of the particular domain. It is considered as big storage of knowledge. The more the
knowledge base, the more precise will be the Expert System.

o It is similar to a database that contains information and rules of a particular domain or


subject.

o One can also view the knowledge base as collections of objects and their attributes. Such as
a Lion is an object and its attributes are it is a mammal, it is not a domestic animal, etc.

Components of Knowledge Base

o Factual Knowledge: The knowledge which is based on facts and accepted by knowledge
engineers comes under factual knowledge.
o Heuristic Knowledge: This knowledge is based on practice, the ability to guess, evaluation,
and experiences.

Knowledge Representation: It is used to formalize the knowledge stored in the knowledge base
using the If-else rules.

Knowledge Acquisitions: It is the process of extracting, organizing, and structuring the domain
knowledge, specifying the rules to acquire the knowledge from various experts, and store that
knowledge into the knowledge base.

Development of Expert System

Here, we will explain the working of an expert system by taking an example of MYCIN ES. Below are
some steps to build an MYCIN:

o Firstly, ES should be fed with expert knowledge. In the case of MYCIN, human experts
specialized in the medical field of bacterial infection, provide information about the causes,
symptoms, and other knowledge in that domain.

o The KB of the MYCIN is updated successfully. In order to test it, the doctor provides a new
problem to it. The problem is to identify the presence of the bacteria by inputting the details
of a patient, including the symptoms, current condition, and medical history.

o The ES will need a questionnaire to be filled by the patient to know the general information
about the patient, such as gender, age, etc.

o Now the system has collected all the information, so it will find the solution for the problem
by applying if-then rules using the inference engine and using the facts stored within the KB.

o In the end, it will provide a response to the patient by using the user interface.

Participants in the development of Expert System

There are three primary participants in the building of Expert System:

1. Expert: The success of an ES much depends on the knowledge provided by human experts.
These experts are those persons who are specialized in that specific domain.

2. Knowledge Engineer: Knowledge engineer is the person who gathers the knowledge from
the domain experts and then codifies that knowledge to the system according to the
formalism.

3. End-User: This is a particular person or a group of people who may not be experts, and
working on the expert system needs the solution or advice for his queries, which are
complex.
Why Expert System?

Before using any technology, we must have an idea about why to use that technology and hence the
same for the ES. Although we have human experts in every field, then what is the need to develop a
computer-based system. So below are the points that are describing the need of the ES:

1. No memory Limitations: It can store as much data as required and can memorize it at the
time of its application. But for human experts, there are some limitations to memorize all
things at every time.

2. High Efficiency: If the knowledge base is updated with the correct knowledge, then it
provides a highly efficient output, which may not be possible for a human.

3. Expertise in a domain: There are lots of human experts in each domain, and they all have
different skills, different experiences, and different skills, so it is not easy to get a final
output for the query. But if we put the knowledge gained from human experts into the
expert system, then it provides an efficient output by mixing all the facts and knowledge

4. Not affected by emotions: These systems are not affected by human emotions such as
fatigue, anger, depression, anxiety, etc.. Hence the performance remains constant.

5. High security: These systems provide high security to resolve any query.
6. Considers all the facts: To respond to any query, it checks and considers all the available
facts and provides the result accordingly. But it is possible that a human expert may not
consider some facts due to any reason.

7. Regular updates improve the performance: If there is an issue in the result provided by the
expert systems, we can improve the performance of the system by updating the knowledge
base.

Capabilities of the Expert System

o Advising: It is capable of advising the human being for the query of any domain from the
particular ES.

o Provide decision-making capabilities: It provides the capability of decision making in any


domain, such as for making any financial decision, decisions in medical science, etc.

o Demonstrate a device: It is capable of demonstrating any new products such as its features,
specifications, how to use that product, etc.

o Problem-solving: It has problem-solving capabilities.

o Explaining a problem: It is also capable of providing a detailed description of an input


problem.

o Interpreting the input: It is capable of interpreting the input given by the user.

o Predicting results: It can be used for the prediction of a result.

o Diagnosis: An ES designed for the medical field is capable of diagnosing a disease without
using multiple components as it already contains various inbuilt medical tools.

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.

Applications of Expert System

o In designing and manufacturing domain


It can be broadly used for designing and manufacturing physical devices such as camera
lenses and automobiles.

o In the knowledge domain


These systems are primarily used for publishing the relevant knowledge to the users. The
two popular ES used for this domain is an advisor and a tax advisor.

o In the finance domain


In the finance industries, it is used to detect any type of possible fraud, suspicious activity,
and advise bankers that if they should provide loans for business or not.

o In the diagnosis and troubleshooting of devices


In medical diagnosis, the ES system is used, and it was the first area where these systems
were used.

o Planning and Scheduling


The expert systems can also be used for planning and scheduling some particular tasks for
achieving the goal of that task.

Stages of Expert System


The development of an expert system involves several stages, each contributing to the creation of a
knowledge-based system that can perform tasks at the level of or even surpass human experts in a
specific domain. Here are the typical stages in the development of an expert system:

Problem Identification and Definition:

Identify a specific problem or task that requires expertise.


Define the scope and boundaries of the problem domain.
Knowledge Acquisition:

Gather and collect knowledge from human experts in the chosen domain.
Use interviews, documentation, textbooks, and other sources to extract relevant information.
Represent the acquired knowledge in a form suitable for computer processing.
Knowledge Representation:

Choose an appropriate knowledge representation formalism (e.g., rules, frames, semantic


networks).
Organize the acquired knowledge in a structured manner that the computer can understand and
use.
Inference Engine Development:
Create the reasoning or inference engine that uses the knowledge to draw conclusions or make
decisions.
Implement mechanisms for problem-solving and decision-making based on the knowledge
representation.
User Interface:

Develop an interface that allows users to interact with the expert system.
Provide a means for users to input queries, receive recommendations, and understand the system's
reasoning.
Knowledge Refinement:

Iterate on the knowledge acquisition and representation stages as needed.


Continuously refine and update the knowledge base to enhance the system's performance and
accuracy.
Testing and Validation:

Test the expert system using sample data and scenarios.


Validate the system's output against known solutions or expert opinions.
Identify and correct any errors or inconsistencies in the knowledge base or inference engine.
Deployment:

Integrate the expert system into the target environment or application.


Provide necessary training and documentation for users and maintainers.
Monitoring and Maintenance:

Implement mechanisms to monitor the performance of the expert system in real-world conditions.
Address issues, update the knowledge base, and make improvements as needed to maintain system
effectiveness.
Retirement or Upgradation:

Decide on the retirement of the expert system if it becomes obsolete or is replaced by a more
advanced system.
If applicable, plan for upgrades or expansions to keep the expert system current and effective.

Probabilistic Based Expert System

Probabilistic-based expert systems, also known as probabilistic reasoning systems or probabilistic


expert systems, are a type of expert system that incorporates probabilistic methods to handle
uncertainty and make decisions based on probability theory. These systems are particularly useful in
situations where there is incomplete or ambiguous information. Here are the key components and
considerations in the development of probabilistic-based expert systems:
1. Probability Theory Integration:
 Description: Integrate probability theory to represent uncertainty in the knowledge
base.
 Considerations: Use probability distributions to model uncertainty and assign
probabilities to different hypotheses or outcomes.
2. Bayesian Networks:
 Description: Implement Bayesian networks as a graphical representation of
probabilistic relationships among variables.
 Considerations: Define nodes for variables, edges for probabilistic dependencies,
and conditional probability tables (CPTs) for the relationships.
3. Uncertainty Modeling:
 Description: Model different types of uncertainty, including aleatory (inherent
randomness) and epistemic (lack of knowledge) uncertainty.
 Considerations: Use probability distributions, such as normal distributions, to model
uncertainties in quantitative data.
4. Inference Mechanisms:
 Description: Develop inference mechanisms that use probabilistic reasoning to
make decisions or predictions.
 Considerations: Implement algorithms like the Bayesian inference to update
probabilities based on new evidence.
5. Parameter Learning:
 Description: Incorporate mechanisms for learning model parameters from data.
 Considerations: Use training data to update probabilities and refine the model over
time.
6. Decision Making under Uncertainty:
 Description: Extend decision-making processes to account for uncertainty and
probabilistic outcomes.
 Considerations: Use decision trees or utility theory to guide decision-making based
on probabilities and associated outcomes.
7. Sensitivity Analysis:
 Description: Perform sensitivity analysis to assess the impact of uncertainty on the
system's decisions.
 Considerations: Evaluate how changes in input probabilities influence the system's
output.
8. Validation and Calibration:
 Description: Validate the probabilistic model against real-world data and calibrate
parameters for accuracy.
 Considerations: Use historical data to assess the model's performance and adjust
parameters to improve accuracy.
9. Integration with Expert Knowledge:
 Description: Integrate expert knowledge with probabilistic reasoning to enhance the
system's capabilities.
 Considerations: Combine explicit probabilities from data with subjective
probabilities provided by experts.
10. User Interface and Explanation:
 Description: Develop a user interface that communicates probabilistic outcomes and
provides explanations for decision-making.
 Considerations: Design the interface to display probabilities, uncertainties, and the
rationale behind system decisions.
Probabilistic-based expert systems are powerful tools for decision-making in situations where
uncertainty is inherent in the problem domain. They find applications in various fields, including
medicine, finance, and engineering, where uncertainty and probabilistic reasoning play a crucial role
in decision support

Example of Probabilistic Based Expert Systems


An example of a probabilistic-based expert system is a medical diagnostic system that uses Bayesian
networks to assess the probability of different diseases based on observed symptoms and test
results. Let's consider a simplified example:
Medical Diagnostic System
1. Knowledge Base:
 Information:
 Symptoms: Fever, Cough, Fatigue
 Diseases: Influenza, Common Cold, Pneumonia
 Test Results: Positive or Negative for specific diagnostic tests
2. Probabilistic Model:
 Bayesian Network:
 Nodes: Symptoms (Fever, Cough, Fatigue), Diseases (Influenza, Common Cold,
Pneumonia), Test Results
 Edges: Probabilistic dependencies between symptoms, diseases, and test results
 Conditional Probability Tables (CPTs): Probabilities based on medical knowledge and
data
3. Inference Mechanism:
 Algorithm:
 Bayesian Inference
 Process:
 Given observed symptoms and test results, update probabilities of potential
diseases using Bayes' rule.
4. Uncertainty Modeling:
 Representation:
 Probability distributions for symptoms and diseases
 Example:
 The probability of having a cough is 0.7, representing some uncertainty.
5. Learning Mechanism:
 Method:
 Parameter learning from historical patient data
 Example:
 Adjusting probabilities based on the actual outcomes of past cases.
6. Decision Making:
 Criteria:
 Decide on the most likely disease based on updated probabilities.
 Example:
 If the probability of Influenza is highest, the system suggests Influenza as the likely
diagnosis.
7. Sensitivity Analysis:
 Assessment:
 Evaluate how changes in symptom probabilities affect disease probabilities.
 Example:
 Assess how the introduction of a new symptom influences the likelihood of different
diseases.
8. Validation and Calibration:
 Process:
 Validate the model against real patient cases, adjust probabilities for better
alignment with outcomes.
 Example:
 Use a set of patient records to validate the system's accuracy and refine
probabilities.
9. Integration with Expert Knowledge:
 Incorporation:
 Combine explicit probabilities from data with expert knowledge on rare or atypical
cases.
 Example:
 If an expert identifies a case with unusual symptoms, adjust probabilities
accordingly.
10. User Interface and Explanation:
 Interface:
 Display probabilities of different diseases, highlight key symptoms, and provide an
explanation of the diagnosis.
 Example:
 The system might show a user-friendly interface stating, "Based on observed
symptoms, there is a 80% probability of having Influenza and a 15% probability of
having Pneumonia."

Expert Systems Tools


Here are some commonly used expert system tools and platforms:
1. CLIPS (C Language Integrated Production System):
 Description: CLIPS is a widely used, open-source expert system development tool. It
provides a rule-based language for knowledge representation and a forward-
chaining inference engine.
 Features:
 Rule-based programming
 Support for forward chaining
 Extensibility through C language
2. Jess (Java Expert System Shell):
 Description: Jess is a rule engine for Java that implements the Rete algorithm. It is a
powerful tool for building expert systems in Java applications.
 Features:
 Java-based rule engine
 Integration with Java applications
 Rule-based programming
3. Drools:
 Description: Drools is a business rule management system (BRMS) that allows for
the creation of rule-based systems. It is open source and provides support for rule
authoring, rule engine, and rule management.
 Features:
 Business rule management
 Rule authoring and editing
 Integration with Java applications
4. Prolog:
 Description: Prolog is a logic programming language that is often used for
developing expert systems, especially in domains involving logical reasoning and
inference.
 Features:
 Logic programming
 Inference based on Horn clauses
 Declarative programming
5. RapidMiner:
 Description: RapidMiner is a data science platform that includes tools for building
predictive models, including rule-based models and decision trees.
 Features:
 Data preprocessing and analysis
 Support for building predictive models
 Integration with various data sources
6. IBM Watson Studio:
 Description: Watson Studio is part of the IBM Watson platform, offering a range of
tools for building AI applications, including expert systems.
 Features:
 Machine learning and AI development
 Integration with Watson services
 Collaboration tools for teams
7. Exsys Corvid:
 Description: Exsys Corvid is a commercial expert system development tool that
allows for the creation of rule-based decision support systems.
 Features:
 Rule-based programming
 Decision support system development
 Integration with other applications
8. LISP (List Processing):
 Description: LISP is a programming language commonly used in the early
development of expert systems. It has strong support for symbolic reasoning and
manipulation.
 Features:
 Symbolic programming
 List processing
 Used historically in AI and expert systems
9. PyKE (Python Knowledge Engine):
 Description: PyKE is a knowledge-based inference engine that allows for rule-based
programming in Python. It is designed for building expert systems.
 Features:
 Rule-based programming in Python
 Forward and backward chaining
 Integration with Python applications
10. Netica:
 Description: Netica is a commercial probabilistic graphical modeling tool used for
building Bayesian networks and decision models.
 Features:
 Bayesian network modeling
 Probability and decision analysis
 Graphical user interface

You might also like