expert system

72
TN2103 KNOWLEDGE TN2103 KNOWLEDGE ENGINEERING & EXPERT SYSTEM ENGINEERING & EXPERT SYSTEM TOPIC 2 TOPIC 2 INTRODUCTION TO EXPERT INTRODUCTION TO EXPERT SYSTEM SYSTEM

Upload: mandeep-rana

Post on 08-Nov-2014

50 views

Category:

Documents


1 download

DESCRIPTION

artificial system

TRANSCRIPT

Page 1: expert system

TN2103 KNOWLEDGE TN2103 KNOWLEDGE ENGINEERING & EXPERT SYSTEMENGINEERING & EXPERT SYSTEM

TOPIC 2TOPIC 2

INTRODUCTION TO EXPERT INTRODUCTION TO EXPERT SYSTEMSYSTEM

Page 2: expert system

22

Table of ContentTable of Content What is an ES?What is an ES? Conventional and ESConventional and ES The Characteristic of ESThe Characteristic of ES The Structure of ESThe Structure of ES The Characteristic of ESThe Characteristic of ES ES Development Life CyclesES Development Life Cycles Participants in ES DevelopmentParticipants in ES Development Selected Business Expert Systems and FunctionsSelected Business Expert Systems and Functions Advantages of ESAdvantages of ES Limitations of ESLimitations of ES When to Use Expert SystemsWhen to Use Expert Systems Justifying the Problem DomainJustifying the Problem Domain MYCIN: A medical expert systemMYCIN: A medical expert system WEBCANDI: A Web based Expert System for Cancer Diagnosis WEBCANDI: A Web based Expert System for Cancer Diagnosis Building ToolsBuilding Tools

Page 3: expert system

33

What is an ES?What is an ES?

Expert System (ES)Expert System (ES) is a is a branch of Artificial branch of Artificial Intelligence that Intelligence that attempt to attempt to mimic human experts. mimic human experts.

Expert systems can either Expert systems can either supportsupport decision makers or decision makers or completely completely replacereplace them. them.

Expert systems are the Expert systems are the most widely applied & most widely applied & commercially successful AI commercially successful AI technology.technology.

Page 4: expert system

44

What is an ES?What is an ES? Prof. Edward Feigenbaum of Stanford University, Prof. Edward Feigenbaum of Stanford University,

leading researchers in ES has produced the leading researchers in ES has produced the following definition:following definition:

" . . . An intelligent computer program that " . . . An intelligent computer program that uses knowledge and inference procedures uses knowledge and inference procedures to solve problems that are difficult to solve problems that are difficult enough to require significant human enough to require significant human expertise for their solution."expertise for their solution."

Page 5: expert system

55

What is an ES?What is an ES?

ExpertiseExpertise is the extensive, task-specific knowledge is the extensive, task-specific knowledge acquired from training, reading, and experience. acquired from training, reading, and experience.

The transfer of expertise from an expert to a The transfer of expertise from an expert to a computer and then to the user involves four activities: computer and then to the user involves four activities: knowledge acquisitionknowledge acquisition from experts or other from experts or other

sources. sources.

knowledge representationknowledge representation in the computer. in the computer.

knowledge inferencingknowledge inferencing,, resulting in a resulting in a recommendation for novices.recommendation for novices.

knowledge transferknowledge transfer to the user. to the user.

Page 6: expert system

66

What is an ES?What is an ES? CASE: GE Models Human TroubleshootersCASE: GE Models Human Troubleshooters

Problem:Problem: GE wanted an effective & dependable way of GE wanted an effective & dependable way of

disseminating expertise to its engineers & preventing disseminating expertise to its engineers & preventing valuable knowledge from “retiring” from the company. valuable knowledge from “retiring” from the company.

Solution: Solution:

GE decided to build an expert system that modeled the GE decided to build an expert system that modeled the way a human troubleshooter works. way a human troubleshooter works.

The system builders spend several months interviewing The system builders spend several months interviewing an employee & transfer their knowledge to a computer. an employee & transfer their knowledge to a computer.

The new diagnostic technology enables a novice The new diagnostic technology enables a novice engineer to uncover a fault by spending only a few engineer to uncover a fault by spending only a few minutes at the computer terminal. minutes at the computer terminal.

Results:Results: The system is currently installed at every railroad repair The system is currently installed at every railroad repair

shop served by GE.shop served by GE.

Page 7: expert system

77

Conventional and ESConventional and ES

Conventional SystemsConventional Systems Expert SystemsExpert Systems

Knowledge and processing are Knowledge and processing are combined in one sequential combined in one sequential

programprogram

Knowledge base is clearly Knowledge base is clearly separated from the processing separated from the processing (inference) mechanism (inference) mechanism (knowledge rules are (knowledge rules are separated from the control)separated from the control)

Programs do not make Programs do not make mistakes (only programmers mistakes (only programmers do)do)

Program may make mistakes.Program may make mistakes.

Do not usually explain why Do not usually explain why input data are needed or how input data are needed or how conclusions were drawnconclusions were drawn

Explanation is a part of most Explanation is a part of most expert systemsexpert systems

The system operates only The system operates only when it is completedwhen it is completed

The system can operate with The system can operate with only a few rules (as a first only a few rules (as a first prototype)prototype)

Execution is done on a step-Execution is done on a step-by-step (algorithmic) basisby-step (algorithmic) basis

Execution is done by using Execution is done by using heuristics and logicheuristics and logic

Page 8: expert system

88

Conventional and ESConventional and ES

Conventional SystemsConventional Systems Expert SystemsExpert Systems

Needs complete information to Needs complete information to operateoperate

Can operate with incomplete Can operate with incomplete or uncertain informationor uncertain information

Effective manipulation of large Effective manipulation of large databasesdatabases

Effective manipulation of large Effective manipulation of large knowledge basesknowledge bases

Representation and use of Representation and use of datadata

Representation and use of Representation and use of knowledgeknowledge

Efficiency is a major goalEfficiency is a major goal Effectiveness is a major goalEffectiveness is a major goal

Easily deals with quantitative Easily deals with quantitative datadata

Easily deals with qualitative Easily deals with qualitative datadata

Page 9: expert system

99

The Structure of ESThe Structure of ES

Human Expert Problem solvingHuman Expert Problem solving

Long–Term MemoryDomain Knowledge

Reasoning Advisee

Case FactsConclusion

Short-Term MemoryCase/Inferred Facts

Conclusion

Page 10: expert system

1010

The Structure of ESThe Structure of ES

Expert System problem solvingExpert System problem solving

Knowledge BaseDomain Knowledge

Inference EngineUser

Case FactsConclusion

Working MemoryCase/Inferred Facts

Conclusion

Page 11: expert system

1111

The Structure of ESThe Structure of ESTHE KNOWLEDGE BASE (LONG TERM MEMORY)THE KNOWLEDGE BASE (LONG TERM MEMORY)

The key bottleneck in developing an expert The key bottleneck in developing an expert system. system.

Contain everything necessary for understanding, Contain everything necessary for understanding, formulating and solving a problem.formulating and solving a problem.

It contains facts and heuristics. It contains facts and heuristics. The most popular approach to representing The most popular approach to representing

domain knowledge is using production rules. domain knowledge is using production rules.

Rule 1Rule 1IF car won't start IF car won't start THEN problem in electrical system THEN problem in electrical system

Rule 2Rule 2IF problem in electrical systemIF problem in electrical systemAND battery voltage is below 10 voltsAND battery voltage is below 10 voltsTHEN bad batteryTHEN bad battery

Page 12: expert system

1212

The Structure of ESThe Structure of ESWORKING MEMORY (SHORT TERM MEMORY)WORKING MEMORY (SHORT TERM MEMORY)

Contains facts about a problem that are discovered Contains facts about a problem that are discovered during consultation with the expert system.during consultation with the expert system.

System matches this information with knowledge System matches this information with knowledge contained in the knowledge base to infer new facts.contained in the knowledge base to infer new facts.

The conclusion reach will enter the working memory.The conclusion reach will enter the working memory.

Thus, working memory contain information either Thus, working memory contain information either supplied by user or infer by the system. supplied by user or infer by the system.

Page 13: expert system

1313

The Structure of ESThe Structure of ESINFERENCE ENGINEINFERENCE ENGINE

Knowledge processor which is modeled after the Knowledge processor which is modeled after the expert expert reasoningreasoning power. power.

Processor in an expert system that matches the Processor in an expert system that matches the facts contained in the working memory with the facts contained in the working memory with the domain knowledge contained in the knowledge domain knowledge contained in the knowledge base, to draw conclusion about the problems.base, to draw conclusion about the problems.

It taps the knowledge base and working memory It taps the knowledge base and working memory to derive new information and solve problems to derive new information and solve problems

Page 14: expert system

1414

The Structure of ESThe Structure of ESTHE USER INTERFACETHE USER INTERFACE

The user communicates with the expert system The user communicates with the expert system through the user interface.through the user interface.

It allows the user to query the system, supply It allows the user to query the system, supply information and receive advice. information and receive advice.

The aims are to provide the same form of The aims are to provide the same form of communication facilities provided by the expert.communication facilities provided by the expert.

But normally has less capability of understanding But normally has less capability of understanding natural language and general knowledge. natural language and general knowledge.

Page 15: expert system

1515

The Structure of ESThe Structure of ES

THE EXPLANATION FACILITYTHE EXPLANATION FACILITY

A trademark of expert systems: ability to explain A trademark of expert systems: ability to explain their reasoning.their reasoning.

An additional component of expert system.An additional component of expert system. ES can provide explanation on:ES can provide explanation on:

WHYWHY it is asking the question it is asking the question HOWHOW it reached some conclusion. it reached some conclusion.

Page 16: expert system

1616

The Structure of ESThe Structure of ES

Explaining WHYExplaining WHY Example:Example:

MM : Will the car not start?MM : Will the car not start? Person : WHYPerson : WHY MM : If I know that the car won't start then I MM : If I know that the car won't start then I

usually usually

assume the problem is the electrical assume the problem is the electrical system.system.

Expert responds with what they might conclude Expert responds with what they might conclude from the answer.from the answer.

ES respond to a WHY query by displaying the rule it ES respond to a WHY query by displaying the rule it is currently pursuing. is currently pursuing.

Page 17: expert system

1717

The Structure of ESThe Structure of ESExplaining HOWExplaining HOW Besides giving final results, expert system can explain Besides giving final results, expert system can explain

how it arrived at a result.how it arrived at a result. Example:Example:

MM : The battery is badMM : The battery is bad Person : HOWPerson : HOW MM : Since your car won't start, I assumed there MM : Since your car won't start, I assumed there

was was a problem with the electrical system. I found a problem with the electrical system. I found

the the battery voltage was below 10, I knew the battery voltage was below 10, I knew the

battery battery was bad.was bad.

ES respond by tracing back through the rules that fire ES respond by tracing back through the rules that fire the conclusion.the conclusion.

This tracing is a map of the system line of reasoning.This tracing is a map of the system line of reasoning.

Page 18: expert system

1818

Characteristics of Expert Characteristics of Expert SystemsSystems

1. High-level expertise. 1. High-level expertise. The most useful characteristic of an expert system. The most useful characteristic of an expert system. This expertise can represent the best thinking of This expertise can represent the best thinking of

top experts in the field, leading to problem top experts in the field, leading to problem solutions that are imaginative, accurate, and solutions that are imaginative, accurate, and efficient. efficient.

2. Adequate response time. 2. Adequate response time. The system must also perform in a reasonable The system must also perform in a reasonable

amount of time, comparable to or better than the amount of time, comparable to or better than the time required by an expert to solve a problem. time required by an expert to solve a problem.

Page 19: expert system

1919

Characteristics of Expert Characteristics of Expert SystemsSystems

3. Permits Inexact Reasoning3. Permits Inexact Reasoning. . These types of applications are characterized These types of applications are characterized

by information that is uncertain, ambiguous, or by information that is uncertain, ambiguous, or unavailable and by domain knowledge that is unavailable and by domain knowledge that is inherently inexact.inherently inexact.

4. Good Reliability. 4. Good Reliability. The system must be reliable and not prone to The system must be reliable and not prone to

crashes because it will not be usedcrashes because it will not be used

Page 20: expert system

2020

Characteristics of Expert Characteristics of Expert SystemsSystems

5. Comprehensibility. 5. Comprehensibility. The system should be able to explain the steps of its The system should be able to explain the steps of its

reasoning while executing so that it is understandable. reasoning while executing so that it is understandable. The systems should have an explanation capability in The systems should have an explanation capability in

the same way that human experts are suppose to be the same way that human experts are suppose to be able to explain their reasoning.able to explain their reasoning.

6. Flexibility. 6. Flexibility. Because of the large amount of knowledge that an Because of the large amount of knowledge that an

expert system may have, it is important to have an expert system may have, it is important to have an efficient mechanism for modifying the knowledge efficient mechanism for modifying the knowledge base. base.

Page 21: expert system

2121

Characteristics of Expert Characteristics of Expert SystemsSystems

7. Symbolic Reasoning. 7. Symbolic Reasoning. Expert systems represent knowledge symbolically Expert systems represent knowledge symbolically

as sets of symbols that stand for problems as sets of symbols that stand for problems concepts. concepts.

These symbols can be combined to express These symbols can be combined to express relationship between them. When these relationship between them. When these relationship are represented in a program they are relationship are represented in a program they are called symbol structures. called symbol structures.

For example, For example, Assert: Ahmad has a feverAssert: Ahmad has a fever

Rule: IF person has fever THEN take panadolRule: IF person has fever THEN take panadol

Conclusion: Ahmad takes panadolConclusion: Ahmad takes panadol

Page 22: expert system

2222

Characteristics of Expert Characteristics of Expert SystemsSystems

8. Reasons Heuristically8. Reasons Heuristically Experts are adapt at drawing on their experiences Experts are adapt at drawing on their experiences

to help them efficiently solved some current to help them efficiently solved some current problem. problem.

Typical heuristics used by experts:Typical heuristics used by experts: I always check the electrical first.I always check the electrical first. People rarely get a cold during the summerPeople rarely get a cold during the summer If I suspect cancer, then I always check the family If I suspect cancer, then I always check the family

history.history.9. Makes Mistakes9. Makes Mistakes

Expert systems can make mistakes.Expert systems can make mistakes. Since the knowledge of expert have to be captured Since the knowledge of expert have to be captured

as close as possible in expert system, like its human as close as possible in expert system, like its human counterpart, it can make mistakes.counterpart, it can make mistakes.

Page 23: expert system

2323

Characteristics of Expert Characteristics of Expert SystemsSystems

10. Thrives on Reasonable Complexity10. Thrives on Reasonable Complexity The problem should be reasonably complex, The problem should be reasonably complex,

not too easy or too difficult.not too easy or too difficult.

11. Focuses Expertise11. Focuses Expertise Most experts are skillful at solving problems Most experts are skillful at solving problems

within their narrow area of expertise, but have within their narrow area of expertise, but have limited ability outside this area. limited ability outside this area.

Page 24: expert system

2424

ES Development Life Cycles ES Development Life Cycles (ESDLC)(ESDLC)

ESDLC contains the following phases:ESDLC contains the following phases:1.1. AssessmentAssessment

2.2. Knowledge AcquisitionKnowledge Acquisition

3.3. DesignDesign

4.4. TestingTesting

5.5. DocumentationDocumentation

6.6. MaintenanceMaintenance

Page 25: expert system

2525

ES Development Life CyclesES Development Life Cycles

Phase 1Assessment

Phase 2Knowledge Acquisition

Phase 3Design

Phase 4Test

Phase 5Documentation

Phase 6Maintenance

Requirements

Knowledge

Structure

Evaluation

Product

Refinements

Explorations

Reformulations

Page 26: expert system

2626

ES Development Life CyclesES Development Life Cycles

1.1. AssessmentAssessment Determine feasibility & justification of the Determine feasibility & justification of the

problemproblem Define overall goal and scope of the Define overall goal and scope of the

projectproject Resources requirementResources requirement Sources of knowledgeSources of knowledge

Page 27: expert system

2727

ES Development Life CyclesES Development Life Cycles

2.2. Knowledge AcquisitionKnowledge Acquisition Acquire the knowledge of the problemAcquire the knowledge of the problem Involves meetings with expertInvolves meetings with expert Bottleneck in ES developmentBottleneck in ES development

Page 28: expert system

2828

ES Development Life CyclesES Development Life Cycles

3.3. DesignDesign Selecting knowledge representations Selecting knowledge representations

approach and problem solving strategiesapproach and problem solving strategies Defined overall structure and organization of Defined overall structure and organization of

system knowledgesystem knowledge Selection of software toolsSelection of software tools Built initial prototypeBuilt initial prototype Iterative processIterative process

Page 29: expert system

2929

ES Development Life CyclesES Development Life Cycles

4.4. TestingTesting Continual process throughout the projectContinual process throughout the project Testing and modifying system knowledgeTesting and modifying system knowledge Study the acceptability of the system by end Study the acceptability of the system by end

useruser Work closely with domain expert that guide Work closely with domain expert that guide

the growth of the knowledge and end user the growth of the knowledge and end user that guide in user interface designthat guide in user interface design

Page 30: expert system

3030

ES Development Life CyclesES Development Life Cycles

5.5. DocumentationDocumentation Compile all the projects information into a Compile all the projects information into a

document for the user and developers of the document for the user and developers of the system such as:system such as:

User manualUser manual diagramsdiagrams Knowledge dictionary Knowledge dictionary

Page 31: expert system

3131

ES Development Life CyclesES Development Life Cycles

6.6. MaintenanceMaintenance Refined and update system knowledge to Refined and update system knowledge to

meet current needsmeet current needs

Page 32: expert system

3232

Participants in ES DevelopmentParticipants in ES Development

The main participants in the process of The main participants in the process of building an expert system are:building an expert system are:

a.a. the domain expert the domain expert

b.b. the knowledge engineer the knowledge engineer

c.c. the user. the user.

Page 33: expert system

3333

Participants in ES DevelopmentParticipants in ES Development

THE DOMAIN EXPERT THE DOMAIN EXPERT Is a person who has the special knowledge, Is a person who has the special knowledge,

judgment, experience, skills and methods, to give judgment, experience, skills and methods, to give advice and solve problems in a manner superior advice and solve problems in a manner superior to others.to others.

Although an expert system usually models one or Although an expert system usually models one or more experts, it may also contain expertise from more experts, it may also contain expertise from other sources such as books and journal articles.other sources such as books and journal articles.

Qualifications needed by the Domain Expert:Qualifications needed by the Domain Expert: Has expert knowledge Has expert knowledge Has efficient problem-solving skillsHas efficient problem-solving skills Can communicate the knowledgeCan communicate the knowledge Can devote timeCan devote time Must be cooperativeMust be cooperative

Page 34: expert system

3434

Participants in ES DevelopmentParticipants in ES Development

If you call someone an “expert” for a project, If you call someone an “expert” for a project, treat that person like one. Even if the person treat that person like one. Even if the person doesn’t know everything about the domain, the doesn’t know everything about the domain, the person knows more than you.person knows more than you.

Patrick E. Dessert Patrick E. Dessert

Page 35: expert system

3535

Participants in ES DevelopmentParticipants in ES Development

THE KNOWLEDGE ENGINEER THE KNOWLEDGE ENGINEER A person who designs, builds and tests an A person who designs, builds and tests an

expert systems.expert systems.

Qualifications needed by Knowledge Qualifications needed by Knowledge Engineer:Engineer:

Has knowledge engineering skills (art of building Has knowledge engineering skills (art of building expert system)expert system)

Has good communications skillsHas good communications skills Can match problems to softwareCan match problems to software has expert system programming skillshas expert system programming skills

Page 36: expert system

3636

Participants in ES DevelopmentParticipants in ES Development

A KNOWLEDGE ENGINEER A KNOWLEDGE ENGINEER I have been working as knowledge engineer I have been working as knowledge engineer

for a software house for two years. Each for a software house for two years. Each project is different. The job is challenging and project is different. The job is challenging and requires creative thinking and strong requires creative thinking and strong communication skills. I started as junior communication skills. I started as junior knowledge engineer at a salary of $30,500. I knowledge engineer at a salary of $30,500. I am now a lead engineer with a salary of am now a lead engineer with a salary of $40,700 plus a nice annual bonus$40,700 plus a nice annual bonus

Christine MelekianChristine Melekian

Page 37: expert system

3737

Participants in ES DevelopmentParticipants in ES Development

THE USERTHE USER Is a person who uses the expert system once Is a person who uses the expert system once

it is developed. it is developed.

Can aid in knowledge acquisition (giving Can aid in knowledge acquisition (giving broad understanding of the problems)broad understanding of the problems)

Can aid in system developmentCan aid in system development

Page 38: expert system

3838

Selected Business Expert Systems and Selected Business Expert Systems and FunctionsFunctions

SystemSystem DeveloperDeveloper Business Business FunctionFunction

ActivityActivity

AS/ASOAS/ASO Arthur Arthur AndersenAndersen

Accounts Accounts ReceivableReceivable

Aid auditing Aid auditing proceduresprocedures

Authorizers Authorizers AssistantAssistant

American American ExpressExpress

Consumer Consumer CreditCredit

Evaluate Evaluate credit records credit records to protect to protect against credit against credit card fraudcard fraud

Helpdesk Helpdesk advisoradvisor

Publix Publix SupermarketsSupermarkets

RetailingRetailing Handle Handle problem calls problem calls from store from store managersmanagers

Page 39: expert system

3939

Selected Business Expert Systems and Selected Business Expert Systems and FunctionsFunctions

SystemSystem DeveloperDeveloper Business Business FunctionFunction

ActivityActivity

Intelligent Intelligent SecretarySecretary

Nippon T & TNippon T & T PersonnelPersonnel Coordinate Coordinate schedules of schedules of company company personnelpersonnel

Mortgage Mortgage loan loan AnalyzerAnalyzer

Arthur Arthur AndersenAndersen

BankingBanking Help loan officer Help loan officer make final make final decisions on decisions on home mortgage home mortgage loanloan

Direct Labor Direct Labor Mgmt Mgmt System System (DLMSISIS)(DLMSISIS)

Ford Motor Ford Motor CompanyCompany

ManufacturingManufacturing Improve Improve efficiency in all efficiency in all phases of the phases of the production production processprocess

Page 40: expert system

4040

Selected Business Expert Systems and Selected Business Expert Systems and FunctionsFunctions

SystemSystem DevelopDeveloperer

Business Business FunctionFunction

ActivityActivity

InspectorInspector BankingBanking Monitor Worldwide Monitor Worldwide foreign exchange foreign exchange trading to identify trading to identify irregular activitiesirregular activities

Prohibited Prohibited Transaction Transaction Exemption Exemption (TPE) (TPE) AnalystAnalyst

LawLaw Help attorney Help attorney evaluate transactions evaluate transactions subject to Employee subject to Employee Retirement Income Retirement Income security Act security Act

Personnel Personnel Policy Policy ExpertExpert

PersonnelPersonnel Help devise Help devise employee policies & employee policies & write employee write employee handbooks;handbooks;

Page 41: expert system

4141

When to Use Expert SystemsWhen to Use Expert Systems

Provide a high potential payoff or Provide a high potential payoff or significantly reduced downside risksignificantly reduced downside risk

Capture and preserve irreplaceable human Capture and preserve irreplaceable human expertiseexpertise

Provide expertise needed at a number of Provide expertise needed at a number of locations at the same time or in a hostile locations at the same time or in a hostile environment that is dangerous to human environment that is dangerous to human healthhealth

Page 42: expert system

4242

When to Use Expert SystemsWhen to Use Expert Systems

Provide expertise that is expensive or rareProvide expertise that is expensive or rare Develop a solution faster than human Develop a solution faster than human

experts canexperts can Provide expertise needed for training and Provide expertise needed for training and

development to share the wisdom of development to share the wisdom of human experts with a large number of human experts with a large number of peoplepeople

Page 43: expert system

4343

Justifying the Problem DomainJustifying the Problem Domain

The first step toward successful system is to The first step toward successful system is to pick the right problem and justify its selection.pick the right problem and justify its selection.

Selecting the right problem should be the first Selecting the right problem should be the first consideration in ES development.consideration in ES development.

This step entails identifying the domain This step entails identifying the domain expert, the user and the payoff from the expert, the user and the payoff from the systemsystem

Page 44: expert system

4444

Justifying the Problem DomainJustifying the Problem Domain

Key Domain Characteristics:Key Domain Characteristics: A narrow, well defined focusA narrow, well defined focus Moderate solution timeModerate solution time Symbolic knowledge and reasoningSymbolic knowledge and reasoning A stable domainA stable domain Size of the knowledge base (100 rules for first-time Size of the knowledge base (100 rules for first-time

domain)domain) Available test casesAvailable test cases Complexity of the domainComplexity of the domain Degree of uncertainty or fuzzinessDegree of uncertainty or fuzziness Demonstration of worthDemonstration of worth Scarce expertiseScarce expertise Appropriate depth of required knowledgeAppropriate depth of required knowledge

Page 45: expert system

4545

MYCIN: A medical expert systemMYCIN: A medical expert system Developed at Stanford University in the mid Developed at Stanford University in the mid

1970's.1970's.

The first large expert system that perform at The first large expert system that perform at the level of human expert and use as the level of human expert and use as benchmark by expert system developers.benchmark by expert system developers.

Provide consultative advise about bacteremia Provide consultative advise about bacteremia and meningitis.and meningitis.

Bacteremia is an infections that involve Bacteremia is an infections that involve bacteria in the blood.bacteria in the blood.

Page 46: expert system

4646

MYCIN: MYCIN: A medical expert systemA medical expert system Meningitis is an infection which is an Meningitis is an infection which is an

inflammation of the membranes that envelop the inflammation of the membranes that envelop the brain and spinal cord.brain and spinal cord.

Can be fatal, thus need quick response, but Can be fatal, thus need quick response, but positive identification normally takes 24 - 48 positive identification normally takes 24 - 48 hours.hours.

Normally doctors must begin treatment in the Normally doctors must begin treatment in the absence of lab results.absence of lab results.

Very complex and doctor need advice of an Very complex and doctor need advice of an expert of bacteremia and meningitis.expert of bacteremia and meningitis.

Page 47: expert system

4747

How MYCIN works?How MYCIN works?

MYCIN begin by initiating a dialogue.MYCIN begin by initiating a dialogue. Physician response to the questionsPhysician response to the questions MYCIN provides:MYCIN provides:

a. diagnosis a. diagnosis

b. prescriptionb. prescription

Page 48: expert system

4848

How MYCIN reasons?How MYCIN reasons?

Laboratory results of body fluid analysesLaboratory results of body fluid analyses Symptoms that patient is displayingSymptoms that patient is displaying Characteristics of the patient such as age, sex Characteristics of the patient such as age, sex

etc.etc.

Page 49: expert system

4949

MYCINMYCIN

MYCIN consultative proceeds in 2 phases:MYCIN consultative proceeds in 2 phases: Diagnosis is made to identify the most likely Diagnosis is made to identify the most likely

infection organismsinfection organisms Prescribe one or more drugs (antibiotics)Prescribe one or more drugs (antibiotics)

Page 50: expert system

5050

MYCIN: Example of a ruleMYCIN: Example of a rule

IFIF the stain of the organism is gram-positive the stain of the organism is gram-positive

ANDAND the morphology of the organism is coccus, the morphology of the organism is coccus,

ANDAND the growth conformation of the organism the growth conformation of the organism is is

clumps,clumps,

THENTHEN

there is suggestive evidence (0.7) that there is suggestive evidence (0.7) that the identity of the identity of the organism is the organism is staphyloccusstaphyloccus

Page 51: expert system

5151

A consultation With MYCINA consultation With MYCIN

1. Please enter information about the patient.1. Please enter information about the patient.NameName AgeAge SexSex Race RaceSallySally 42 years42 years FemaleFemale MelayuMelayu2. Are there any positive cultures obtained from SALLY?2. Are there any positive cultures obtained from SALLY?NoNo3. Are there any pending cultures of SALLY?3. Are there any pending cultures of SALLY?YesYes4. Site:4. Site: date collected:date collected: stain examined: stain examined: methodmethodCSFCSF 3-Jun-75 3-Jun-75 YesYes N/AN/A5. Stain of smear:5. Stain of smear:(type NONE if no organism was seen on the smear)(type NONE if no organism was seen on the smear)NoneNone

(Unable to reach conclusion from lab test, like physician (Unable to reach conclusion from lab test, like physician continue asking questions.)continue asking questions.)

Page 52: expert system

5252

A consultation With MYCIN (cont..)A consultation With MYCIN (cont..)

6. Has Sally recently had symptoms of persistent 6. Has Sally recently had symptoms of persistent headache or other abnormal neurologic headache or other abnormal neurologic symptoms(dizziness, lethargy etc.)symptoms(dizziness, lethargy etc.)

YesYes

7. Has SALLY recently had objective evidence of 7. Has SALLY recently had objective evidence of abnormal neurologic signs documented by physician abnormal neurologic signs documented by physician observation of examination?observation of examination?

YesYes

Questions 6 and 7 traditional approach to diagnose by Questions 6 and 7 traditional approach to diagnose by symptoms. symptoms.

Conclude from the questions by giving first conclusion.Conclude from the questions by giving first conclusion.

Conclusion:Conclusion: The CSF cultures will be considered to be The CSF cultures will be considered to be associated associated with with MENINGITIS.MENINGITIS.

Page 53: expert system

5353

The following questions will identify particular organism The following questions will identify particular organism that cause the infections.that cause the infections.

8. Is the meningitis a hospital-acquired infection?8. Is the meningitis a hospital-acquired infection? YesYes9. Is SALLY clinical history consistent with EPIGLOTTITIS?9. Is SALLY clinical history consistent with EPIGLOTTITIS? NoNo 10. Is Sally clinical history consistent with OTITIS-MEDIA?10. Is Sally clinical history consistent with OTITIS-MEDIA? NoNo11. Has the patient ever been to an area that is endemic 11. Has the patient ever been to an area that is endemic for coccidiomycoses?for coccidiomycoses?UnknownUnknown12. Is Sally a burn patient?12. Is Sally a burn patient?Yes (Why)Yes (Why)

Conclusion:Conclusion: The type of infection may be The type of infection may be BACTERIALBACTERIAL..

A consultation With MYCIN A consultation With MYCIN (cont..)(cont..)

Page 54: expert system

5454

The final phase, prescription of antibiotics.The final phase, prescription of antibiotics.

13. Does SALLY have clinically significant 13. Does SALLY have clinically significant allergic reaction to any antimicrobial agent?allergic reaction to any antimicrobial agent?

NoNo14. Is Sally pregnant of breast feeding?14. Is Sally pregnant of breast feeding? NoNo15. Do you have reason to suspect that SALLY 15. Do you have reason to suspect that SALLY

may have impaired renal functions?may have impaired renal functions? NoNo16. SALLY weight in kilograms?16. SALLY weight in kilograms? 51.451.4

A consultation With MYCIN (cont..)A consultation With MYCIN (cont..)

Page 55: expert system

5555

A consultation With MYCINA consultation With MYCINMy preferred therapy recommendation is as My preferred therapy recommendation is as

follows:follows:

Give the following combination:Give the following combination:1. ETHAMBUTAL1. ETHAMBUTAL Dose:Dose: 1.28g (13.0 100mg tablets) q24h PO for 1.28g (13.0 100mg tablets) q24h PO for

60 days60 days then 770 mg (7.5 100 mg tablets) q24h PO.then 770 mg (7.5 100 mg tablets) q24h PO.

Comments:Comments: periodic vision screening tests are periodic vision screening tests are recommended for optic neuritis.recommended for optic neuritis.

2. INH2. INH Dose:Dose: 513 mg (5.0 100mg-tablets) q24h PO 513 mg (5.0 100mg-tablets) q24h PO3. RIFAMPIN3. RIFAMPIN Dose:Dose: 600 mg PO q24h 600 mg PO q24h Comments:Comments: Administer dose on empty stomach. Administer dose on empty stomach.

Page 56: expert system

5656

HOW GOOD AN EXPERT IS MYCIN?HOW GOOD AN EXPERT IS MYCIN? In one complex evaluation, 8 independent In one complex evaluation, 8 independent

evaluators evaluate MYCIN with 9 others human evaluators evaluate MYCIN with 9 others human diagnostician for 10 difficult cases of meningitis.diagnostician for 10 difficult cases of meningitis.

The task used was the selection of drugs for cases The task used was the selection of drugs for cases of meningitis before causative agents had been of meningitis before causative agents had been identified.identified.

Two phases of the evaluation:Two phases of the evaluation:

a. MCYIN and 9 human experts evaluate 10 a. MCYIN and 9 human experts evaluate 10 cases cases

b. Each of them prescribe medicationsb. Each of them prescribe medications

Page 57: expert system

5757

HOW GOOD AN EXPERT IS MYCIN?HOW GOOD AN EXPERT IS MYCIN?

Two evaluative criteria was used to see whether Two evaluative criteria was used to see whether the prescriptions:the prescriptions:

a.a. Would be effective against the actual Would be effective against the actual bacteria after it was finally identified.bacteria after it was finally identified.

b.b. Adequately covered for other possible Adequately covered for other possible bacteria while avoiding over-prescribing.bacteria while avoiding over-prescribing.

Page 58: expert system

5858

HOW GOOD AN EXPERT IS MYCIN?HOW GOOD AN EXPERT IS MYCIN?

Results:Results:

Criteria 1Criteria 1:: MYCIN and 3 other humans expert MYCIN and 3 other humans expert consistently prescribe therapy that consistently prescribe therapy that would have been effective for all 10 would have been effective for all 10 cases.cases.

Criteria 2Criteria 2:: MYCIN received higher ratings. 65% MYCIN received higher ratings. 65% correct in all the cases whereas human correct in all the cases whereas human expert 42.5% to 62.5%.expert 42.5% to 62.5%.

Page 59: expert system

5959

HOW GOOD AN EXPERT IS MYCIN?HOW GOOD AN EXPERT IS MYCIN?

MYCIN strengths is based on 4 factors:MYCIN strengths is based on 4 factors:

a.a. MYCIN's knowledge base is extremely detail MYCIN's knowledge base is extremely detail because acquired from the best human because acquired from the best human practitioners.practitioners.

b.b. MYCIN do not overlook anything or forget any MYCIN do not overlook anything or forget any details. It considers every possibility.details. It considers every possibility.

c.c. MYCIN never jumps to conclusions of fails to ask MYCIN never jumps to conclusions of fails to ask for key pieces of information.for key pieces of information.

d.d. MYCIN is maintained at a major medical center and MYCIN is maintained at a major medical center and consequently, completely current.consequently, completely current.

MYCIN represents 50 man-years of effort.MYCIN represents 50 man-years of effort. Back to Main Menu

Page 60: expert system

6060

Building ToolsBuilding Tools

Since mid-1970s, a wide choice of tools and Since mid-1970s, a wide choice of tools and approaches fro developing ES have become approaches fro developing ES have become available.available.

They range from high-level and AI programming They range from high-level and AI programming language to shells to ready-to-use customized language to shells to ready-to-use customized packages for industry and government.packages for industry and government.

Which tools to adopt depend on:Which tools to adopt depend on: The nature of the problemThe nature of the problem The skill of the builderThe skill of the builder The function it is expect to perform (either The function it is expect to perform (either

diagnoses or monitoring) diagnoses or monitoring)

Page 61: expert system

6161

Building ToolsBuilding Tools

Several levels or categories of tools are Several levels or categories of tools are available for building ES such as follows:available for building ES such as follows:

Programming languagesProgramming languages Support aids and toolsSupport aids and tools Specific ES packagesSpecific ES packages ShellsShells

The figure below illustrates the 4 levels The figure below illustrates the 4 levels (p344)(p344)

Page 62: expert system

6262

Building ToolsBuilding Tools The figure below illustrates the 4 levelsThe figure below illustrates the 4 levels

Includes domain, rules, methodology

Knowledge Base(specific expert system application package)

ShellsEditor/debuggerInference engine

Explanation facility(e.g., CLIPS, EXSYS)

Support aidsAnd tools

Debugging aids

Menus,Explanation

facilities

Programs that helpin knowledge acquisition

and knowledge representation

Programming Languages

Standard procedural languages (e.g. Pascal, Basic)

Al symbolic languages(e.g. LISP, PROLOG )

Domainindependent

All you do is build kb

Preprogrammed

Less programmingLess flexibilityReady-to-use;custom madeMore focused

More programmingMore flexibilityBuild from scratchLess focused

Page 63: expert system

6363

Programming LanguageProgramming Language

The language written is important The language written is important because it determines the efficiency and because it determines the efficiency and performance of the tool.performance of the tool.

ES can be programmed in a variety of ES can be programmed in a variety of languages: both standard or AI-oriented.languages: both standard or AI-oriented.

Standard programming or algorithmic Standard programming or algorithmic approach, is a “brute force” method in approach, is a “brute force” method in which standard procedural languages are which standard procedural languages are used to develop the IF … THEN rulesused to develop the IF … THEN rules

Page 64: expert system

6464

Programming LanguageProgramming Language

Standard programming language are Standard programming language are used for the following reasons:used for the following reasons:

Limitation of hardware operating Limitation of hardware operating systemsystem

Power and speed of the languagePower and speed of the language Incorporation of digital input/output Incorporation of digital input/output

devices in the systemdevices in the system Language execution time efficiencyLanguage execution time efficiency

Page 65: expert system

6565

Programming LanguageProgramming Language

AI programming are done through AI programming are done through symbolic language such as LISP and symbolic language such as LISP and Prolog.Prolog.

Although more restrictive and require Although more restrictive and require more memory, they are effective the way more memory, they are effective the way they present rules and control their they present rules and control their processingprocessing

They process symbols instead of They process symbols instead of numbers to reach conclusion on a logical numbers to reach conclusion on a logical level of knowledge representationlevel of knowledge representation

Page 66: expert system

6666

Programming LanguageProgramming Language Example of LISP programming languageExample of LISP programming language

(rule 43(rule 43(concerns (car auto mobilehome))(concerns (car auto mobilehome))(application_if (in vehicle frame))(application_if (in vehicle frame))(antecedent_is(antecedent_is

(if ((? entity) has (wheels and owner(if ((? entity) has (wheels and ownerand roof… ))and roof… ))

(production_is(production_is(then(then ((? entity? isa auto)((? entity? isa auto)

(alternate_productions(alternate_productions(then(then ((? entity? isa mobilehome)…((? entity? isa mobilehome)…

(further _information(further _information(top_down (see transportation (top_down (see transportation

status_symbol))status_symbol))(bottom_up (see wheels driver owner (bottom_up (see wheels driver owner

…)) )…)) )(confidence *use function auto_confidence)(confidence *use function auto_confidence)(update_rule (apply learning_function(update_rule (apply learning_function

(number 32 ))))))(number 32 ))))))

Page 67: expert system

6767

Programming LanguageProgramming Language Example of PROLOG programming Example of PROLOG programming

languagelanguage>student (david).>student (david).>student (mary).>student (mary).>student (john).>student (john).>student (ann).>student (ann).>student (jerry).>student (jerry).>student (sue).>student (sue).Likes (Someone, accounting) :-Likes (Someone, accounting) :-

concentrating (Someone, accounting).concentrating (Someone, accounting).

>concentrating (david, mis).>concentrating (david, mis).>concentrating (mary, marketing).>concentrating (mary, marketing).>concentrating (mary, mis).>concentrating (mary, mis).>concentrating (john, accounting).>concentrating (john, accounting).>concentrating (ann, management).>concentrating (ann, management).>concentrating (ann, mis).>concentrating (ann, mis).>concentrating (jerry, finance).>concentrating (jerry, finance).>concentrating (sue, accounting).>concentrating (sue, accounting).

FACTSFACTS

FACTSFACTS

RULERULE

Page 68: expert system

6868

Support Aid and ToolsSupport Aid and Tools Support aids automate the time Support aids automate the time

consuming phase of acquisition, improve consuming phase of acquisition, improve effectiveness of representation, ensure effectiveness of representation, ensure crisp human-machine interface and crisp human-machine interface and debugging aids that traces the reasoning.debugging aids that traces the reasoning.

Explanation facilitiesExplanation facilities show how the show how the system arrives at a particular solutionsystem arrives at a particular solution

Editing facilityEditing facility ensures that the syntax is ensures that the syntax is correctly represented in the knowledge correctly represented in the knowledge basebase

Page 69: expert system

6969

Specific Expert System Specific Expert System packagespackages

The easiest product to use from user’s of viewThe easiest product to use from user’s of view Specific ready-to-use program that advises a Specific ready-to-use program that advises a

specific user in a specific industry to address a specific user in a specific industry to address a specific problem domainspecific problem domain

For example, a consultation system that For example, a consultation system that advises student on elective courses to take.advises student on elective courses to take.

The system essentially plugs in the vital The system essentially plugs in the vital variable, matches them against established variable, matches them against established criteria and determines the courses to take.criteria and determines the courses to take.

Page 70: expert system

7070

ShellsShells A shell provides a basic architecture for A shell provides a basic architecture for

building ES.building ES.

Shells perform 3 different functions:Shells perform 3 different functions:a.a. Assists in building the knowledge base by Assists in building the knowledge base by

allowing the developer to insert knowledge allowing the developer to insert knowledge into knowledge representation structures.into knowledge representation structures.

b.b. Provides methods of inference or deduction Provides methods of inference or deduction that reason on the basis of information in that reason on the basis of information in the knowledge base and new facts input by the knowledge base and new facts input by the user.the user.

c.c. Provides an interface that allows the user Provides an interface that allows the user to set up reasoning task and query the to set up reasoning task and query the system about its reasoning strategy.system about its reasoning strategy.

Page 71: expert system

7171

ShellsShells

The main 3 components:The main 3 components:a.a. The knowledge baseThe knowledge baseb.b. Inference engineInference enginec.c. User interfaceUser interface

Page 72: expert system

7272

ShellsShells Main components of a shellMain components of a shell

UserUser NaturalNaturalLanguageLanguage

ControlsControls

InferenceInferenceStrategiesStrategies

Rule BaseRule Base

Condition Condition ActionAction1 “1 “ “ “2 “ “2 “ “

n “ “n “ “

Assertion/Assertion/ParametersParameters

1 1 “ “2 “2 “

n “n “