Expert Systems 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 acquires relevant knowledge from its knowledge base, and interprets it as per the user’s problem . It uses both facts and heuristics like a human expert . These systems are designed for a specific domain, such as medicine, science, etc.
The architecture of Expert system consists 5 components 1. Knowledge Base (KB ) repository of rules that direct the use of knowledge, facts. It contains the knowledge necessary for understanding, formulating , & problem solving . 2. Working Memory it records and stores the current problem & record intermediate results records Intermediate Hypothesis & Decisions 1 . Plan 2 . Agenda 3 . Solution Knowledge Base Knowledge facts
3. Inference Engine used to infer results from user input & Knowledge Base. It is the brain of the Expert System, the control structure(rule interpreter) and it provides methodology for reasoning 4. Explanation Subsystem Traces responsibility & explains the Expert System behaviour by interactively answering question: Why?, How?, What?, Where?, When?, Who? 5. User Interface interfaces with user through Natural Language Processing (NLP), or menus & graphics. Acts as Language Processor for friendly, problem-oriented communication Shell = Inference Engine + User Interface
Expert System building process There are 3 basic parameters for expert system building process: Domain Exploration Exploration of the knowledge about the domain in which the system is operational Expertise Transfer Expertise Transfer Representation Acquisition Outcomes Inference Building
Meta Knowledge is a knowledge about available knowledge it is systematic as well as domain independent knowledge helps in building an expert system that is less dependent on a particular domain Meta Knowledge structure is given as Confidence Factors Are the values associated with a particular variable They indicate the degree of truth for the particular variable Based on the confidence factor, the expert system can give guidelines or recommendations Confidence factors can be made available in various ways User input Rule set Data Information Knowledge Meta-Knowledge
User input A user specifies the confidence level for some specific variable by direct or indirect means direct Asking a student how good you are in a particular subject in a 1 to 10 scale The possible answer is 8 then the confidence factor is 80% indirect form A database is used by ES to obtain the confidence factor A user recommendation stored in the form of a table Rule set by the use of rules By the rule of ‘if(Degree = CS) and (Masters = CS) then High-Salary=True’ with a confidence factor of 75 These rules are based on previous available information
Probabilistic approaches can assist in developing these confidence factors based on the previous available probable values for any variable A simple probable value can be treated as confidence factor Existing Expert Systems 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 . 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. CaDeT : The CaDet expert system is a diagnostic support system that can detect cancer at early stages.
Mycin earliest backward chaining expert systems designed to find the bacteria causing infections like bacteraemia and meningitis. also used for the recommendation of antibiotics and the diagnosis of blood clotting diseases. Building of MYCIN Expert System Pathology Experts provide information about the causes, symptoms, and other knowledge in that domain. The Knowledge Base of the MYCIN is updated. To test MYCIN, the doctor provides a new problem to it. The problem is to identify the presence of the bacteria by giving the details of a patient, including the symptoms, current condition, and medical history. The Expert System will need a questionnaire to be filled by the patient to know the general information about the patient, such as gender, age, etc.
System collects 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. In the end, it will provide a response to the patient by using the user interface. Expert System Shells The early expert systems were built using LISP ( LISt Processing) language. To facilitate building of ES , a platform which would contain most of the common procedures that an ES would require. Shells were developed, called as AI tools or Skeletons. An expert system shell is a software which contains user interface, a format for declarative knowledge in the knowledge base and an inference engine . Shell = Rules + Interpreter Interpreter can be separated from the domain specific knowledge to build new systems
Example EMYCIN (empty MYCIN ) was derived from MYCIN. Knowledge engineer will use these shells to develop an ES Shell structure Inference Knowledge Explanations Mechanism base-subset User interface Domain/Application specific data and Knowledge base Shell
Explanations An important feature of ES, shows the ability of the system to express itself For any action there is a necessity to have explanation , as we do not accept things unless they are clarified and we are convinced about them For making the ES effective, it should be interactive The explanations are based on the rules that are used for the inference process
Knowledge acquisition A process which allows the experts to enter their knowledge or expertise into the expert system, and to refine it later as and when required. The knowledge acquisition process can usually comprise of three principal stages: Knowledge elicitation is the interaction between the expert and the knowledge engineer/program to elicit the expert knowledge in some systematic way. The knowledge thus obtained is usually stored in some form of human friendly intermediate representation. The intermediate representation of the knowledge is then compiled into an executable form (e.g. production rules) that the inference engine can process Expert System Knowledge feedback
Self Explaining System is a feature of ES that shows the ability to explain itself It is able to justify why a particular question is being asked and how it has arrived to the conclusion . Rule based expert systems It consists of rules(KB), set of facts and an interpreter Rule based ES are designed so that they can have heuristic reasoning and proper explanations User Interface Explanations Inference Mechanism KB Comprising rules Facts
Instead of representing knowledge in a relatively declarative or static way (as a bunch of things that are true), rule-based system represent knowledge in terms of a bunch of rules that tell you what you should do or what you could conclude in different situations. A rule-based system consists of a bunch of IF-THEN rules, a bunch of facts, and some interpreter controlling the application of the rules, given the facts. The inference mechanism referred as Inference Engine, seeks the necessary information and the relationships from the KB to answer
Inference In a forward chaining system start with the initial facts , and keep using the rules to draw new conclusions (or take certain actions) given those facts. Inference rules are successively applied to elements of the knowledge base until the goal is reached Inference mechanisms Forward chaining knowledge base and set of inference rules. deriving a particular goal matching facts to the antecedents
Backward chaining In a backward chaining system start with some hypothesis (or goal) trying to prove, and look for rules that would conclude that hypothesis or setting new sub goals to prove Inference mechanisms Backward chaining knowledge base and set of inference rules. antecedent of the relation is added to the list of goals matching the goal of the search to the consequents of the relations stored Search proceeds until a goal be matched against a fact
condition action premise idea or theory with a conclusion
Example Knowledge Base given as: If [X croaks and eats flies] Then [X is a frog] If [X chirps and sings] Then [X is a bird] If [X is a frog] Then [X is colored green] If [X is a bird] Then [X is colored yellow] [Fritz croaks and eats flies] Goal: [Fritz is colored Y] ?
Workflow If [X croaks and eats flies] Then [X is a frog] [Fritz croaks and eats flies] [Fritz is a frog] Knowledge Base If [X croaks and eats flies] Then [X is a frog] If [X chirps and sings] Then [X is a bird] If [X is a frog] Then [X is colored green] If [X is a bird] Then [X is colored yellow] [Fritz croaks and eats flies] Goal [Fritz is colored Y ] ?
Frame-Based Expert Systems A frame provides a means of organising knowledge in slots to describe various attributes and characteristics of the object set of attributes Car Make Type Colour has a value attached Frame data structure with typical knowledge particular object or concept Computer Model Processor Memory has a value attached Price