Lecture 5 - Knowledge and Expert Systems
Lecture 5 - Knowledge and Expert Systems
Inputs Outputs
Knowledge Inferencing
Base Capability
Data Pyramid and Computer-
Based Systems
IS
Heuristics
and models Wisdom
Novelty
Rules Knowledge
Information Experience
Concepts
Data
Raw data through Understanding
fact finding
Researching Absorbing Doing Interacting Reflecting
14
Main Components of a KBS
Contd.
User
Expertise
Knowledge Base
User Interface
Facts / Information
Inference Engine
Expertise
Developer
15
Main Components of a
KBS
A typical Knowledge Based System has the following
components
A knowledge Base
An inference Engine
A User Interface
Explanation Facilities
Learning facilities
16
Components of
KBS
Knowledge base is a repository of domain knowledge Enriches the
and metaknowledge. system with self-
Inference engine is a software program that infers the learning
knowledge available in the knowledge base. capabilities
Explanation Self-
and learning
reasoning
User interface
Friendly interface
to users working in
their native
Provides explanation language
and reasoning facilities
Figure 1.10: General structure of KBS
1
17 17
7
Main KBS
Components
Knowledge base
Contains essential information about the problem domain
Often represented as facts and rules
Inference engine
Mechanism to derive new knowledge from the knowledge
base and the Information provided by the user
Often based on the use of rules
User interface
Interaction with end users
Development and maintenance of the knowledge base
Knowledge
Knowledge consists of
Symbols
The relationship between symbols
The rules or procedures for manipulating the
symbols
Classification of Knowledge
Priori knowledge: Universally true and cannot
be denied without contradiction.
Examples are mathematical laws, logical
statements.
Posteriori knowledge: Represents information that is
19
verified using sensory experiences.
Knowledge
Contd.
Such knowledge can be denied based on new
knowledge without the need for
contradictions.
Further classification includes
Procedural knowledge: Knowing how to do
something.
Declarative knowledge: Knowing that something is
true or false.
Tacit knowledge: Unconsciously knowing how to do
something.
20
Knowledge
Engineering
The term “knowledge engineering” is often used to
mean the process of
designing
building
installing
an expert system or other knowledge-based system.
Some authors use the term to mean just the knowledge
acquisition phase.
Tasks of a Knowledge
Engineer
Extracting knowledge from people
Representing it in some form
Including it in a computer program which makes use
of that knowledge
Validating the software system produced
A Knowledge Engineer must –
Apply Methods
Use Tools
Apply Quality Controls
Have Standards
22
Tasks of a Knowledge Engineer
Contd.
Plan and Manage Projects
Take into account Human, Financial and
Environmental constraints
Be bound by a professional code of
conduct
Update their knowledge and skills
Adhere to rules, regulations and legal
requirements
Remaining Software Engineering
Problems
How do we measure the quality of
23 software?
Expert and Knowledge-Based
Systems
One of AI’s greatest areas of success was the development
of large-scale problem solving systems
Originally called expert systems, they would mimic the
problem solving processes of domain experts such as
doctors performing diagnosis, or engineers performing
design, or wall street analysts selecting stock
transactions
Expert systems were originally developed by hand, and
most commonly in some Lisp dialect
It was discovered that many problems were being solved by
chaining through rules (if-then statements) that would
operate on a collection of facts and partial conclusions
Expert and Knowledge-Based
Systems
These rule-based systems led to the first AI tools or
shells
Today, to simplify expert system creation, most people
use these AI shells – you just fill in the knowledge,
the problem solving processes are already
implemented
Experts
An expert is an experienced practitioner in his/her
particular field.
More than that, he/she is a highly effective
problem- solver and decision-taker in that field.
Experts have three qualities:
They make good decisions
They make those
decisions quickly
They are able to cope
with a wide range of
problems.
As a result, they are valuable, highly-paid, and
Experts and Expert
Systems
Note that:
The task that an expert system performs will generally
be regarded as difficult.
An expert system almost always operates in a rather
narrow field of knowledge.The field of knowledge
is called the knowledge domain of the system.
There are many fields where expert systems can
usefully be built.
There are many fields where they can’t.
Reasons for Building an
ES
One might build an expert system for any or all of
the following reasons:
To archive an expert’s knowledge, to insure against the
day when he/she leaves, or retires, or dies.
To disseminate his/her knowledge, so that it is
available in more (possibly many more) places than
the location of the expert.
To ensure uniformity of advice/decisions.
As a basis for training other specialists.
General Concepts and Characteristics of
ES Knowledge acquisition
Transfer of knowledge from humans to computers
Sometimes knowledge can be acquired directly from the
environment
Machine learning
Knowledge
representation
Suitable for storing and processing knowledge in computers
Inference
Mechanism that allows the generation of new conclusions from
existing knowledge in a computer
Explanation
generate
29
Illustrates
d to the user how and why a particular solution was
Advantages of Expert
Systems
Put another way, E.S. have the following advantages over
human experts:
The knowledge is permanent
The knowledge is easily replicated
The knowledge is represented explicitly, and can be
evaluated
The system is consistent - whereas human
practitioners have bad days, computers
don’t.
Once built, running costs are low
Disadvantages of Expert
Systems
Developing an expert system usually costs a great deal of
time and money
Historically, there has been a high failure rate in E.S. projects
The project may well fail during development - most
likely during the “knowledge acquisition” phase.
The development may succeed, but the organisation may
fail to accept and use the finished system.
A human expert can update his/her knowledge in the light of
Common sense
Knowledge derived from other domain
Contacts with other experts.
An expert system can’t.
Early KBS Success
Stories
DENDRAL
Identification of chemical constituents
MYCIN
Diagnosis of illnesses
PROSPECTOR
Analysis of geological data for minerals
Discovered a mineral deposit worth $100
million
XCON/R1
Configuration of DEC VAX computer systems
Saved lots of time and millions of dollars
Pattern
Matching
Expert Systems consisted of two major components
A knowledge base
The knowledge that the system would use to come to conclusions
In Dendral, this would be chemical elements, compounds, the
mass spectrogram data that could arise from any element
In Mycin, this would be bacteriological infection knowledge
An inference engine
How to apply the knowledge
For Dendral, this was done by generate-and-test, a very weak
form of search
Mycin would perform backward chaining through rules
More generically though, the inference engine would embody some form
of pattern matching
One of the first systems that clearly demonstrated pattern matching was
Eliza
Eliza was a spoof of an expert system but the code will show us how
pattern matching works
Rules and
Humans
Rules can be used to formulate a theory of
human information processing (Newell &
Simon)
Rules are stored in long-term memory
Temporary knowledge is kept in short-term
memory
Sensory input or thinking triggers the activation of
rules
Activated rules may trigger further activation
A cognitive processor combines evidence from
currently active rules
This model is the basis for the design of many rule-
based systems
Choosing an ES
Project
Because of cost, and the danger of failure, it is
important that E.S. projects are carefully chosen.
The expense must be justified, in the light of the
possible benefits.
E.S. technology must be appropriate
the right kind of expertise is involved
it isn’t a problem which conventional programming
could do better.
Management, and the participants, must support the
project fully.
When to use
KBS
Only certain types of applications are suited to KBS
implementation.The following criteria is used in
identifying suitable domains.The field under study
should be able to be reduced to a series of rules rather
than mathematical formulae or equations.
KBS’s are not applicable if the problem involves a large
number of complex calculations.
Is well understood so that well-defined knowledge can
be
formulated and represented in computer form.
Should not encompass problems which take too short
(i.e. less than half an hour) or too long (longer than, say,
37 one week) a time to solve
When to use KBS
Contd.
Should have general agreement among recognized
experts in the domain to be computerized.
The knowledge within the problem domain should
be sufficiently large to warrant the development
of a KBS.
‘tame’ experts who are agreeable to involvement
Any application that requires access to specialist
knowledge is a potential area for KBS
technology.
Building Knowledge-Based Systems (KBS) is known
as knowledge engineering and its practitioners are
38
called knowledge engineers.
Types of
Expertise
Mike Greenwell’s classification of types of expertise,
according to identifiable mental components of the
skill (with examples):
[source: Greenwell (1988)]
Types of Expertise (with
examples)D e e p J u d g m enta l High-level
co g n itive skills social skills
skills
Highly Musician Senior Author, poet
cre a tive m anager
Response time
often faster than human experts
Reliability
can be greater than that of human experts
no distraction, fatigue, emotional involvement,
…
Explanation
reasoning steps that lead to a particular
conclusion
KBS
Limited knowledge
Problems
“shallow” knowledge
no “deep” understanding of the concepts and their
relationships
no “common-sense” knowledge
no knowledge from possibly relevant related domains
“closed world”
the ES knows only what it has been explicitly “told”
it doesn’t know what it doesn’t know
Mechanical reasoning
may not have or select the most appropriate method for
a particular problem
some “easy” problems are computationally very
expensive
Summary
Expert systems or knowledge based systems are used to
represent and process in a format that is suitable for computers
but still understandable by humans
If-Then rules are a popular format