You are on page 1of 39

Principles of Artificial Intelligence

Introduction to Knowledge based Systems(KBS)


Definition

 What is a knowledge-based system(KBS)?


  KBS is a computer program that reasons and uses
a knowledge base and artificial intelligence techniques to
solve complex problems.

 Examples:
 Case based systems
 Rule based systems
 Expert systems
 Neural network systems
 etc
Rule based systems

 A rule-based systems, use IF-then Rules to do either of the


following tasks:

1. Identifies a pattern and draws conclusions about the meaning of


that pattern
2. Identifies a pattern and advises what should be done about the
pattern.
3. Identifies a pattern and takes appropriate action e.g. Deliver
relevant content to the user (like the case of OMAL application)
Terminology used Rule based systems

 Production rule: is another name for IF-Then rule.


 Production system: A set of production rules, together with
software that can reason with them.
 Firing the rule: Putting the conclusions of a rule into effect
because the conditions match the current state of affairs
 Head of A rule: is the conclusion part of a rule.
 also known as then- part or action part or consequent part
 Body of a rule: is the antecedent part of a rule. Also known as if-
part, condition part or premises part
Format of a rule:
IF <antecedent> THEN <consequent>
Terminology used Rule based systems

 A rule can have multiple antecedents joined by the


keywords AND (conjunction), OR (disjunction) or a
combination of both.

IF <antecedent 1> AND <antecedent 2>


and (<antecedent 3> OR <antecedent 4>)
... ..
.
AND <antecedent n> OR < antecedent n+1>
THEN <consequent>
Structure of A rule based system

observed data

working memory
select modify

rule
memory Inference
fire engine output
2. Expert Systems

 An expert system is a computer system, which mimics the


behaviour or reasoning of a human expert in some specific
subject area.
 The idea behind creating an expert system is that it can enable
many people to benefit from the knowledge of one person -
the expert.
 Example:
 MYCIN : A rule-based expert system Used for diagnosing and
treating bacterial infections.
 Puff : For diagnosing respiratory diseases
Characteristics of expert systems

1. Rely on internally represented knowledge (either in a dbms or hard


coded) to perform tasks
2. Utilizes reasoning methods (forward chain, backward chain etc) to

derive appropriate new knowledge/conclusions


3. Are usually restricted to a specific problem domain

e.g. mycin only diagnose meningitis and bacteria infection


3. Apply heuristics to guide the reasoning and thus reduce the search
area for a solution.
4. Employ symbolic reasoning when solving a problem. i.e. symbols are

used to represent different types of knowledge such as facts,


concepts and rules.
5. Explains its decisions to the user, thus enabling the user to

understand how solutions/conclusions are derived by the system.


3. Case-based reasoning (CBR)

 CBR systems solves new problems by adapting previously


successful solutions to similar problems

 Example
Sharon , 35 yrs. old, entered hospital with potentially fatal
respiratory disease. Her vital stats. and medical history
entered into expert system. System drew on records of
over 17,000 previous intensive-care patients to predict
whether Sharon would live or die.
Case-based Reasoning Applications

 Medicine: Medical KBS remembers previous patients especially


for rare combinations of symptoms

 Law: KBS can adapt previous cases to judge a similar current


case. That is, decisions is passed based on past rulings
Participants of developing Knowledge based systems
 There five main participants of developing KBS.
Participants of developing Knowledge based systems

 1. Domain Expert is a person with deep knowledge (of


both facts and rules) and strong practical experience in a
particular domain.
 The area of the domain may be limited.
 In general, an expert is a skilful person who can do things
other people cannot.

Knowledge
Knowledge acquisition
base facility

Domain Expert
Participants of developing Knowledge based systems

 2. End user
 A person who uses and benefits from the KBS when it is
developed.
 The user must not only be confident in the KBS performance
but also feel comfortable using it. Therefore, the design of
the user interface of the KBS is also vital for the project’s
success; the end-user’s contribution here can be crucial.
 Examples: Doctor, patient, manager, person of the street
Participants of developing Knowledge based systems

3. Knowledge Engineer
i. Designing, building and tests an KBS.

ii. Establishes what reasoning methods the expert uses to


handle facts and rules and decides how to represent them
in the expert system.
iii. Chooses some development software or looks at

programming languages for encoding the knowledge.


Participants of developing Knowledge based systems

3. Knowledge Engineer
iv. Interviews the domain expert to find out how a particular
problem is solved.
v. Chooses knowledge representation techniques and
Maintains the knowledge base
Participants of developing Knowledge based systems

 4. Programmer
 Responsible for the actual programming, describing
the domain knowledge in terms that a computer can
understand.
 Needs to have skills in symbolic programming in such
AI languages as LISP, Prolog and OPS5.
 Should know conventional programming languages
like C#, VB.net, and Java.
Participants of developing Knowledge based systems

 4. The project manager:


 The leader of the KBS development team, responsible for
keeping the project on track.
 Makes sure that all deliverables and milestones are met,
interacts with the expert, knowledge engineer, programmer
and end-user.
The structure of Knowledge Base systems

Example1 of KBS structure

Explanation Case specific


subsystem database

User
User
interface

Inference
engine

Knowledge
base
Knowledge
Knowledge Developer's
acquisition
engineer interface
subsystem
The structure of Knowledge Base systems

Example2 of KBS structure


1. Knowledgebase

 Knowledgebase is a database of facts and rules for


representing domain knowledge.

 Facts are propositions that describes the state of real


world. They can be true or false depending on the current
situation

 Rules that describes relationships between facts.


1. Knowledgebase

 Examples of Facts:
 Headache is a symptom of disease
 Tiredness is a symptom of a disease
 Gladular fever is a disease.

 Example of Rule:
If tired and headache then diagnose glandular fever
2. Inference Engine
 It links the rules with the facts provided in the
knowledgebase.
 Used to derive conclusions, make recommendations or
provide advises to users based on facts and rules
represented in the knowledgebase and information
received from the user.
 Also known as reasoner.
2. Inference Engine: Example
Sample inference engine for a Credit Application

If user applies loan ranging from $100,000 to $200,000


AND the following rules in knowledgebase succeeds
If there are no previous credits problems, and
If month net income is greater than 4x monthly loan payment,
and
If down payment is 15% of total value of property, and
If net income of borrower is > $25,000, and
If employment is > 3 years at same company

Then accept the application

Else reject the application


4. User Interface

 User Interface is the component that enable the user to interact


with the KBS.

 Example of User interaction


 Patient: I have a headache

 System: I suggest you take a pain killer. Do you have a sore

throat?
 Patient: Yes, I do.

 System: Have you been coughing?

 Patient: No, why do you ask?

 System: If you had a head ache and a sore throat and had been

coughing, I would have to conclude you might have the flu.


5. Explanation Facility
 Explanation system explains the decisions the system
makes.
 It allows a user or decision maker to understand how the
expert system arrived at certain conclusions or results
6. Knowledgebase Editor

 Knowledge base editor is the component that allows the


user to edit facts and rules in the knowledge base.
 Provides a convenient and efficient means of capturing
and storing all components of the knowledge base
 Also known as knowledge acquisition facility

Knowledge
Knowledge acquisition
base facility

Domain
Expert/ KE
7. Case- specific database
 - Component for saving results generated by inference
engine during problem solving.
 - it can be used for tracking system usage or evaluating
the effectiveness of the KBS .
Applications of Knowledge Base systems

1. Provision of advises to support decision making process


Example: Design Advisor :
Gives advice to designers of processor chips .
Such systems are also recommendation systems
Applications of Knowledge Base systems

 4. Diagnosing the disease of a patient and recommends


appropriate treatment.
 Such systems such asks about symptoms, patient details
and history, calls for lab tests if unsure, balances pro’s and
con’s of possible treatments and risks of side effects.
• Examples:
• (a) PUFF :- Diagonise respiratory diseases
 (b) Mycin: -Diagonise bacteria infections in the blood
1. Expert System
 Example: Mycin
Applications of Knowledge Base systems
 5. Natural language interfaces to allow interaction between users
and computing devices through natural language.
 Example: Eliza
 Developed by MIT computer scientist Joseph Weizenbaum, 1966
 - Eliza program was named , after the character Eliza Doolittle in
Shaw's Pygmalion
 - The program allow the user to type any sentence (no restriction
on content or grammar) at the keyboard and the computer would
respond with a sentence of its own
 http://www.manifestation.com/neurotoys/eliza.php3
 http://www.acacialt.com.au/ai/eliza.htm
Applications of Knowledge Base systems

 Example: Eliza
 The rules were indexed by keywords so only a few had
actually to be matched against a particular sentence.
 Example interaction case:
 If the preceding sentence had been
 Person: "I don't get along with my girlfriend's brother”
 sooner or later ELIZA would come up with
 Eliza "Does that have anything to do with the fact that
your girlfriend's brother ?”
Applications of Knowledge Base systems

 Example interaction with Eliza


 Person: Men are all alike.
 ELIZA: In what way?
 Person: They're always bugging us about something or other.
 ELIZA: Can you think of a specific example ?
 Person: Well, my boyfriend made me come here.
 ELIZA: Your boyfriend made you come here.
 Person: He says I'm depressed much of the time.
 ELIZA: I am sorry to hear you are depressed.
Applications of Knowledge Base systems

 Learning support systems


 Used to deliver relevant content to the learner based on
context (e.g. current activity)
 Example: Open Mobile Ambient Learning (OMAL)
application uses mobile phones to deliver relevant content
to the learner (Mwendia&Buchem,2014;Mwendia et.al
2014).
Applications of Knowledge Base systems
 Learning support systems
 Example: OMAL is used for delivering learning content based
on learner’s context (Mwendia et al. 2014).
Applications of Knowledge Base systems

Face recognition Systems:


KBSs are used to provide security services through
surveillance systems which works by recognizing faces of
individuals.
Benefits of KBS

1. Allow distribution of ‘expertise’ (which is often scarce)


2. Easy to update the existing knowledge
3. Consistent answers (without the anomalies sometimes
exhibited by human experts);
4. Allow Preservation of expertise for a long time
Limitations of KBS

1. Restricted to a specific problem domain


2. Systems are not always up to date, and don’t learn
3. Experts are needed to setup and maintain system. e.g.
knowledge engineer
4. Cannot make creative responses as human expert would
in unusual circumstances

4.

You might also like