knowledge base systems (1)

Upload: pammy313

Post on 14-Apr-2018

219 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/30/2019 Knowledge Base Systems (1)

    1/43

    Knowledge Base Systems

    production rule representation.

  • 7/30/2019 Knowledge Base Systems (1)

    2/43

    Production Systems

    Introduction

    These are a form of knowledge representationwhich have found widespread application in AIparticularly in the area of Expert Systems.

    Production systems consist of three parts:

    a) A rule base consisting of a set of productionrules.

    b) the data c) an interpreter which controls the systems

    activity.

  • 7/30/2019 Knowledge Base Systems (1)

    3/43

    Production Rules

    A production rule can be thought of as a

    condition action pair. They take the form

    IF condition holds THEN do action e.g.

    IF traffic light is red THEN stop car.

  • 7/30/2019 Knowledge Base Systems (1)

    4/43

    Firing Production Rules

    A production rule whose conditions aresatisfied can fire, i.e. the associatedactions can be performed.

    Conditions are satisfied or not according towhat data is currently available.

    Existing data may be modified as

    production rules are fired. Changes in datacan lead to new conditions being satisfied.

    New production rules may then be fired.

  • 7/30/2019 Knowledge Base Systems (1)

    5/43

    The decision which production rule to fire

    next is taken by a program known as the

    interpreter.

    The interpreter therefore controls the

    systems decisions and actions and must

    know how to do this.

  • 7/30/2019 Knowledge Base Systems (1)

    6/43

    Production Systems

    Production systems were first proposed in

    1943 by Post.

    Present day systems however bear little

    resemblance to those earlier ones.

    Newell and Simon in 1972 used the idea

    of production systems for their models of

    human cognition and AI in general has

    found widespread use for them.

  • 7/30/2019 Knowledge Base Systems (1)

    7/43

    Suitable Domains

    Davis and King (1977) proposed the following criteria forproblem domains where productions rules are suitable.

    1: Domains in which knowledge is diffuse, consisting ofmany different strands of knowledge rather than some

    domain which is based on a unified theory like Physics. 2: Domains in which processes cane be represented as

    a set of independent actions as opposed to domains withdependent subprocesses.

    3: Domains in which knowledge can be easily separatedfrom the manner in which it is to be used as opposed tocases where representation and control are merged.

  • 7/30/2019 Knowledge Base Systems (1)

    8/43

    Knowledge Base Systems

    Knowledge Base systems are intended to

    perform tasks which require some

    specialized knowledge and reasoning.

    Medical diagnosis, geological analysis,

    and chemical compound identification are

    examples of tasks to which Knowledge

    Base systems have been applied.

  • 7/30/2019 Knowledge Base Systems (1)

    9/43

    Expert Systems

    Knowledge Base systems are often called

    expert systems because the problems in

    their application domain are usually solved

    by human experts.

    For example medical diagnosis is usually

    performed by a doctor.

  • 7/30/2019 Knowledge Base Systems (1)

    10/43

    Parts of a Knowledge Base System

    Knowledge Base systems consist of Four

    major parts;

    The Knowledge Base,

    The Inference Engine

    The User Interface and

    The Explainer Knowledge Acquisition Module

  • 7/30/2019 Knowledge Base Systems (1)

    11/43

    Inference Engine

    AgendaKnowledge Base

    (rules)

    Explanation

    Facility

    User Interface

    Knowledge

    Acquisition

    Facility

    Working Memory

    (facts)

  • 7/30/2019 Knowledge Base Systems (1)

    12/43

    The knowledge to which the Knowledge Basesystem has access, is stored in the KnowledgeBase, (hence the name).

    The Inference Engine is the part of a KnowledgeBase system which is responsible for using itsknowledge in a productive way.

    The Knowledge Base system's reasoning

    mechanisms are built into the Inference Engine.Most Knowledge Base systems employdeductive reasoning mechanisms.

  • 7/30/2019 Knowledge Base Systems (1)

    13/43

    The Knowledge Base system communicates

    with the user through the User Interface.

    In many applications the Knowledge Base

    system is required to explain its reasoning to theuser. This is particularly true in situations such

    as the identification of chemical structures where

    new results must be verified.

    The Explainer is that part of the Expert System

    which provides explanation and verification

  • 7/30/2019 Knowledge Base Systems (1)

    14/43

    Knowledge Acquisition Modules

    These help with acquiring the systems

    knowledge.

    They do a variety of tasks for example in somesystems they provide system analysis facilities

    similar to those of database development tools

    Mostly they help encode the knowledge from ahigh level format into a computer usable

    representation.

  • 7/30/2019 Knowledge Base Systems (1)

    15/43

    System Architecture

  • 7/30/2019 Knowledge Base Systems (1)

    16/43

    Inference Engine

    AgendaKnowledge Base

    (rules)

    Explanation

    Facility

    User Interface

    Knowledge

    Acquisition

    Facility

    Working Memory

    (facts)

  • 7/30/2019 Knowledge Base Systems (1)

    17/43

    Obviously the knowledge to which a

    Knowledge Base system has access is no

    good to it, if it cannot use it to solve the

    problems in the application domain.

    Therefore the systems knowledge must be

    represented in a form which can be

    manipulated by the reasoningmechanisms of the Inference Engine.

  • 7/30/2019 Knowledge Base Systems (1)

    18/43

    While the Knowledge Base, the IE and the UserInterface are essential components, in many KnowledgeBase systems there are also facilities to help in theacquisition of new knowledge.

    Teiresias, [DAVIS '76], which is used in association withMYCIN, [Shortliffe '76, Davis '76] is an example of sucha system.

    It elicits high level information from the user which itconverts into structured knowledge for its KnowledgeBase. It also performs consistency checks on the

    updated knowledge base. The ability to acquire new knowledge is important since

    the amount of knowledge to which a system has accessdetermines the range of problems which it can solve.

  • 7/30/2019 Knowledge Base Systems (1)

    19/43

    Applications of Knowledge Base

    systems

    Knowledge Base systems have been applied to manydiverse problem domains, such as the following.

    Diagnostic Aids such as MYCIN, [Shortliffe '76, Davis

    '76], which diagnoses bacterial blood infections andPUFF, [Kunz et al '78], which diagnose pulmonarydisorders.

    MYCIN was a joint venture between Dept. of ComputerScience and the Medical School of Stanford University.

    Much of the work took place in the 1970's. Mycin was designed to solve the problem of diagnosingand recommending treatments for meningitis andbacteremia, (blood infections).

  • 7/30/2019 Knowledge Base Systems (1)

    20/43

    Aids to Design and Manufacture such asR1, [McDermott '82], which configurescomputers.

    Teaching Aids such as SCHOLAR[Carbonell '70] which gives GeographyTutorials and SOPHIE, [Brown et al '82],which teaches how to detect breakdown inelectrical circuits.

    Problem Solving

  • 7/30/2019 Knowledge Base Systems (1)

    21/43

    Recognition of forms, e.g. DENDRAL,

    [Buchanan and Feigenbaum '78, Lindsay et al

    '80], which recognizes the structures of

    chemical compounds. Robotics e.g. SHDRLU, [Winograd '73], which

    manipulates polygons in a restricted

    environment.

    Game playing systems such as Waterman's

    Poker Player, [Waterman '70], and

  • 7/30/2019 Knowledge Base Systems (1)

    22/43

    Automatic theorem Provers such as AM, [Lenat'82].

    [Hayes-Roth et al '83, Handbook A.I. '82,

    Waterman '86], describe some more categoriesthan those mentioned above. These includePlanning systems such as NOAH, [Sacerdoti'75] and MOLGEN, [Friedland '75] and

    Prediction systems such as Political ForecastingSystems, [Schrodt '86] based on the HollandClassifier, [Holland '86].

  • 7/30/2019 Knowledge Base Systems (1)

    23/43

    Rule-Based Expert Systems

    Work with

    a set offacts describing the current

    world state

    a set ofrules describing the expert

    knowledge

    inference mechanisms for combining

    facts and rules in reasoning

  • 7/30/2019 Knowledge Base Systems (1)

    24/43

    Architecture of Rule-Based XPS

    1Knowledge-Base / Rule-Base stores expert knowledge as condition-action-

    rules (or: if-then- or premise-consequence-rules)

    objects or frame structures are often used torepresent concepts in the domain of expertise,e.g. club in the golf domain.

    Working Memory

    stores initial facts and generated facts derived bythe inference engine

    additional parameters like the degree of trust inthe truth of a fact or a rule ( certainty factors) or

    probabilistic measurements can be added

  • 7/30/2019 Knowledge Base Systems (1)

    25/43

    Knowledge Engineering

    Knowledge engineering is a general term

    for the processes involved in building

    expert systems: planning, knowledge

    acquisition, system building,systeminstallation, system maintenance.

    In the following notes "KE" stands for

    knowledge engineer, and "DE" stands fordomain expert.

    A hit t f R l B d

  • 7/30/2019 Knowledge Base Systems (1)

    26/43

    Architecture of Rule-Based

    Systems

    Inference Engine

    matches condition-part of rules against facts

    stored in Working Memory (pattern matching);

    rules with satisfied condition are active rules andare placed on the agenda;

    among the active rules on the agenda, one is

    selected (see conflict resolution, priorities of

    rules) as next rule for execution (firing) consequence of rule can add new facts to

    Working Memory, modify facts, retract facts, and

    more

  • 7/30/2019 Knowledge Base Systems (1)

    27/43

    Rule-Based Systems- Example Grades -

    Rules to determine grade

    1. If study then get good_grade

    2. If do not_study then get bad_grade

    3. If sun_shines THEN go_out

    4. If go_out then do not_study

    5. If stay_home then study

    6. If awful_weather then stay_home

  • 7/30/2019 Knowledge Base Systems (1)

    28/43

    Questions

    Ask the following questions of the expert

    System

    Q1: If the weather is awful, do you get a

    good or bad grade?

    Q2: When do you get a good grade?

  • 7/30/2019 Knowledge Base Systems (1)

    29/43

    forward reasoning rule chain

    given fact: awful_weather 6,5,1

    backward reasoning

    hypothesis/goal: good_grade 1,5,6

    Answer Question 1 Good Grade

    Exercise Answer question 2 with forwardand backward chaining

  • 7/30/2019 Knowledge Base Systems (1)

    30/43

    Explaining

    Note we presented a rule chain when we solved

    this problem.

    If we asked How do you know we get a good

    grade in awful weather we can say that By rule 6 if the weather is awful stay at home

    By rule 5 If stay at home then you will study

    And finally By rule 1 if you study you get a goodgrade

  • 7/30/2019 Knowledge Base Systems (1)

    31/43

    In other words

    In order to explain how we arrive at a

    solution we list the chain of rules that were

    fired on rout to this conclusion.

    This is the basis of expert system

    explainers

  • 7/30/2019 Knowledge Base Systems (1)

    32/43

    Knowledge Acquisition

    Obtaining knowledge for use in the

    knowledge base of an expert system.

  • 7/30/2019 Knowledge Base Systems (1)

    33/43

    Sources of knowledge:

    Documents: textbooks, journal articles,technical reports, case histories, etc.

    This will almost never be sufficient to

    provide the knowledge base for a real-world expert system.

    The range of problems which a textbook

    examines and solves is always smallerthan the range of problems that a humanexpert is master of.

  • 7/30/2019 Knowledge Base Systems (1)

    34/43

    Knowledge Analysis

    Simultaneously with the knowledgeacquisition process, a knowledge analysisprocess takes place.

    The KE uses the data from the knowledgeacquisition sessions to build a good modelof the expertise that the DE is using tosolve problems in the domain. This may ornot rely heavily on building a prototype -see below.

  • 7/30/2019 Knowledge Base Systems (1)

    35/43

    Knowledge Elicitation

    The most important branch of knowledgeacquisition is knowledge elicitation - obtainingknowledge from a human expert (or humanexperts) for use in an expert system.

    Knowledge elicitation is difficult. This is theprinciple reason why expert systems have notbecome more widespread - the knowledgeelicitation bottleneck.

    It is necessary to find out what the expert(s)know, and how they use their knowledge..

  • 7/30/2019 Knowledge Base Systems (1)

    36/43

    Human experts

    Expert knowledge includes:

    domain-related facts & principles;

    modes of reasoning; reasoning strategies;

    explanations and justifications.

  • 7/30/2019 Knowledge Base Systems (1)

    37/43

    Knowledge elicitation and experts

    The knowledge elicitation (and analysis) task involves:Finding at least one expert in the domain who:

    is willing to provide his/her knowledge;

    has the time to provide his/her knowledge;

    is able to provide his/her knowledge. Repeated interviews with the expert(s), plus task

    analysis, concept sorting, etc, etc..

    Knowledge structuring: converting the raw data (takenfrom the expert) into intermediate representations, priorto building a working system.

  • 7/30/2019 Knowledge Base Systems (1)

    38/43

    Knowledge Elicitation continued

    Building a model of the knowledge derived fromthe expert, for the expert to criticise. From thenon, the development proceeds by stepwiserefinement.

    One major obstacle to knowledge elicitation:experts cannot easily describe all they knowabout their subject.

    They do not necessarily have much insight intothe methods they use to solve problems.

    Their knowledge is "compiled" (c.f. a compiledcomputer program fast & efficient, butunreadable).

  • 7/30/2019 Knowledge Base Systems (1)

    39/43

    Techniques used in Knowledge

    ElicitationVarious different forms of interview:

    Unstructured. A general discussion of the domain,designed to provide a list of topics and concepts.

    Structured. Concerned with a particular concept within

    the domain.

    Problem-solving.

    The expert is provided with a real-life problem, of a kind

    that they deal with during their working life, and asked tosolve it. As they do so, they are required to describeeach step, and their reasons for doing what they do. Thetranscript of their verbal account is called a protocol.

  • 7/30/2019 Knowledge Base Systems (1)

    40/43

    Think-aloud.As above, but the expert merely imagines thatthey are solving the problem presented to them,rather than actually doing it. Once again, they

    describe the steps involved in solving theproblem.

    Dialogue.

    The expert interacts with a client, in the way thatthey would normally do during their normal workroutine.

  • 7/30/2019 Knowledge Base Systems (1)

    41/43

    Review.

    It is standard practice to tape record KE

    sessions. However, KEs should be aware

    of the costs this involves, in time and

    money.

    The KE and DE examine the record of on of

    the sessions described above, together.

  • 7/30/2019 Knowledge Base Systems (1)

    42/43

    More Methods

    Sample lecture preparation. The expertprepares a lecture, and the KE analysesits content.

    Concept sorting ("card sort"). Questionnaires. Especially useful when

    the knowledge is to be elicited from

    several different experts. Repertory grid (particularly the "ladderedgrid" technique).

  • 7/30/2019 Knowledge Base Systems (1)

    43/43

    Computerised knowledge

    elicitation.

    The state of the art in AI (especially NLP) is not

    sufficiently advanced to permit fully-automated

    knowledge elicitation. However, 'knowledge elicitation workbenches', or

    'knowledge engineering environments', are commercially

    available (e.g KEE, KnAcqTools); their principle use is to

    simplify the task of converting a protocol into frames,rules, etc., and inserting these structures into an expert

    system shell as soon as they are formulated.