KnowledgeBased Systems Priti Srinivas Sajja Associate Professor Department

Knowledge-Based Systems Priti Srinivas Sajja Associate Professor Department of Computer Science Sardar Patel University Visit priti sajja. info for detail Created By Priti Srinivas Sajja 1

Knowledge-Based Systems Introduction Contact Data Pyramid KBS Objectives and Characteristics Structure Types of Knowledge Acquisition Knowledge Representation • Name: Dr. Priti • Communication: Srinivas Sajja • Email : priti_sajja@yahoo. com • Mobile : +91 9824926020 • URL : http: //pritisajja. info • Academic qualifications : Ph. D in Computer Science • Thesis title: Knowledge-Based Systems for Socio • Economic Development • Subject area of specialization : Artificial Intelligence • Publications : 84 in Books, Book Chapters, Journals and in Proceedings of International and National Conferences Examples Created By Priti Srinivas Sajja 2

Knowledge-Based Systems Created By Priti Srinivas Sajja This slideshow is available here 3

Knowledge-Based Systems Introduction Data Pyramid KBS Objectives and Characteristics Structure Types of Knowledge Acquisition Knowledge Representation Examples Natural Intelligence Responds to situations flexibly. Makes sense of ambiguous or erroneous messages. Assigns relative importance to elements of a situation. Finds similarities even though the situations might be different. • Draws distinctions between situations even though there may be many similarities between them. • • Artificial Intelligence • According to Rich & Knight (1991) “AI is the study of how to make computers do things, at which, at the moment, people are better”. • A machine is regarded as intelligent if it exhibits human characteristics generated through natural intelligence. • AI is the study of human thought processes and moving toward problem solving in a symbolic and non-algorithmic way. Created By Priti Srinivas Sajja 4

Knowledge-Based Systems Introduction Data Pyramid KBS Objectives and Characteristics Structure Types of Knowledge Acquisition Knowledge Representation “Artificial Intelligence(AI) is the study of how to make computers do things at which, at the moment, people are better” • Elaine Rich, Artificial Intelligence, Mc. Graw Hill Publications, 1986 Examples Created By Priti Srinivas Sajja 5

Knowledge-Based Systems Introduction human thought process Data Pyramid KBS Objectives and Characteristics Structure Types of Knowledge Acquisition Knowledge Representation heuristic methods where people are better non-algorithmic characteristics we associate with intelligence knowledge using symbols Constituents of artificial intelligence Acceptable solution in acceptable time Extreme solution, either best or worst taking (infinite) time Nature of AI solutions Examples Created By Priti Srinivas Sajja 6

Knowledge-Based Systems Introduction Turing test will fail to test for intelligence in two circumstances; Data Pyramid KBS Objectives and Characteristics 1. A machine may well be Can you tell me what is 222222*67344? Why Sir? Structure Types of Knowledge Acquisition Knowledge Representation Examples intelligent without being able to chat exactly like a The B o replyi ss could no n t intelli g, thus th judge who e gent as the machine was secre tary. is as human; and; 2. The test fails to capture the general properties of intelligence, such as the ability to solve difficult problems or come up with original insights. If a machine can solve a difficult problem that no person could solve, it would, in principle, fail the test. The Turing test Created By Priti Srinivas Sajja 7

Knowledge-Based Systems Introduction Data Pyramid Creating Your Own Test… Can you find any test to check the given system is intelligent or not? KBS Objectives and Characteristics Reacts differently Makes and understands joke Structure Types of Knowledge Acquisition Knowledge Representation Solves your problem Walks, perceives, tests, smells, and feels like human If it talks like human Translates, summarizes, and learns Examples Created By Priti Srinivas Sajja 8

Knowledge-Based Systems Introduction Data Pyramid Rich & Knight (1991) classified and described the different areas that Artificial Intelligence techniques have been applied to as follows: KBS Mundane Tasks Objectives and Characteristics • Structure • Types of Knowledge Acquisition Knowledge Representation • • Perception - vision and speech Natural language understanding, generation, and translation Commonsense reasoning Robot control Expert Tasks Formal Tasks • Games - chess, backgammon, checkers, etc. • Mathematicsgeometry, logic, integral calculus, theorem proving, etc. • Engineering - design, fault finding, manufacturing planning, etc. • Scientific analysis • Medical diagnosis • Financial analysis Examples Created By Priti Srinivas Sajja 9

Knowledge-Based Systems Introduction Data Pyramid IS KBS Objectives and Characteristics Structure Types of Knowledge Acquisition Knowledge Representation Strategy makers apply morals, principles, and experience to generate policies WBS Higher management generates knowledge by synthesizing information KBS Middle management uses reports/info. generated though analysis and acts accordingly Knowledge (synthesis) DSS, MIS TPS Basic transactions by operational staff using data processing Volume Wisdom (experience) Information (analysis) Data (processing of raw observations ) Sophistication and complexity Examples Created By Priti Srinivas Sajja 10

Knowledge-Based Systems Introduction Data Pyramid KBS Objectives and Characteristics Heuristics and models Wisdom Structure Types of Knowledge Acquisition Knowledge Representation Novelty Knowledge Rules Information Experience Concepts Data Understanding Raw Data through fact finding Researching Absorbing Doing Interacting Reflecting Examples Created By Priti Srinivas Sajja 11

Knowledge-Based Systems Introduction Intelligent systems: Data Pyramid KBS Objectives and Characteristics 21 st century challenge Software resources IS EES ES ESS Users’ requirements EIS Structure Types of Knowledge Acquisition Knowledge Representation 1990 DSS EES: Executive E xpert Syste m is a hybridizatio n of an exp ert system , ex ecutive information system, and decision su pport syste m. MIS OAS 1970 TPS 1950 Hardware base/technology Examples Created By Priti Srinivas Sajja 12

Knowledge-Based Systems Introduction Data Pyramid K KBS Objectives and Characteristics Structure Types of Knowledge Acquisition Knowledge Representation Knowledge-Based Systems (KBS) are Productive Artificial Intelligence Tools working in a narrow domain. Examples Created By Priti Srinivas Sajja 13

Knowledge-Based Systems Comparison Introduction Data Pyramid KBS Objectives and Characteristics Structure Types of Knowledge Acquisition Knowledge Representation Examples Traditional Computer-Based Information Systems (CBIS) Knowledge-Based Systems (KBS) Gives a guaranteed solution and concentrate on efficiency Adds powers to the solution and concentrates on effectiveness without any guarantee of solution Data and/or information processing approach Knowledge and/or decision processing approach Assists in activities related to decision making and routine transactions; supports need for information Transfer of expertise; takes a decision based on knowledge, explains it, and upgrades it, if required Examples are TPS, MIS, DSS, etc. Examples are expert systems, CASE-based systems, etc. Manipulation method is numeric and algorithmic Manipulation method is primarily symbolic/connectionist and nonalgorithmic These systems do not make mistakes These systems learn by mistakes Need complete information and/or data Partial and uncertain information, data, or knowledge will do Works for complex, integrated, and wide areas in a reactive manner Works for narrow domains in a reactive and proactive manner Created By Priti Srinivas Sajja 14

Knowledge-Based Systems Introduction Categories of KBS Data Pyramid KBS Objectives and Characteristics Structure • • • Expert systems Linked systems Intelligent tutoring system CASE based system Intelligent user interface for databases Types of Knowledge Acquisition Knowledge Representation Examples Created By Priti Srinivas Sajja 15

Knowledge-Based Systems Introduction Data Pyramid KBS Objectives and Objectives Characteristics Structure Types of Knowledge Acquisition Knowledge Representation • • Provides a high intelligence level • • • Offers a vast amount of knowledge in different areas • Acquires new perceptions by simulating unknown situations • • Offers significant software productivity improvement Assists people in discovering and developing unknown fields Aids in management Solves social problems in better way than the traditional CBIS Significantly reduces cost and time to develop computerized systems Examples Created By Priti Srinivas Sajja 16

Knowledge-Based Systems Introduction Data Pyramid KBS Objectives and Characteristics Structure Types of Knowledge Acquisition Knowledge Representation Components of KBS Knowledge base is a repository of domain knowledge and meta knowledge. Enriches the system with self-learning capabilities Inference engine is a software program, which infers the knowledge available in the knowledge base Explanation and reasoning Knowledge base Inference engine Selflearning User interface Provides explanation and reasoning facilitates Friendly interface to users working in their native language Examples Created By Priti Srinivas Sajja 17

Knowledge-Based Systems Introduction Data Pyramid KBS Objectives and Characteristics Structure Types of Knowledge Acquisition Knowledge Representation Examples Advantages and Difficulties • • • Permanent Documentation of Knowledge Cheaper Solution and Easy Availability of Knowledge Dual Advantages of Effectiveness and Efficiency Consistency and Reliability Justification for Better Understanding Self-Learning and Ease of Updates • • • Completeness of Knowledge Base Characteristics of Knowledge Large Size of Knowledge Base Acquisition of Knowledge Slow Learning and Execution Development model and Standards Created By Priti Srinivas Sajja 18

Knowledge-Based Systems Introduction Experience Experts Data Pyramid KBS Objectives and Characteristics Printed Media Sources of knowledge Satellite Broadcasting (Internet, TV, and Radio) Types of Knowledge Structure • Tacit knowledge Types of of Knowledge Acquisition Knowledge Representation • Explicit knowledge • Commonsense knowledge • Informed commonsense knowledge • Heuristic knowledge • Domain knowledge • Meta knowledge Examples Created By Priti Srinivas Sajja 19

Knowledge-Based Systems Introduction Data Pyramid Knowledge Components • KBS Objectives and Characteristics • Structure Types of of Knowledge Acquisition Knowledge Representation • Facts – Facts represent sets of raw observation, alphabets, symbols, or statements. • The earth moves around the sun. • Every car has a battery. Rules – Rules encompass conditions and actions, which are also known as antecedents and consequences. • If there is daylight, then the Sun is in the sky. • If the car does not start, then check the battery and fuel. Heuristics – It is a rule of thumb, which is practically applicable however, does not offer guarantee of solution. • If there is total eclipse of the sun, there is no daylight, even though the sun is in the sky. • If it is a rainy season and a car was driven through water, silencer would have water in it, so it may not start. Examples Created By Priti Srinivas Sajja 20

Knowledge-Based Systems Introduction Data Pyramid KBS Inference Engine An inference engine is a software program that refers the existing knowledge, manipulates the knowledge according to need, and makes decisions about actions to be taken. Objectives and Characteristics Match Structure Types of Knowledge Acquisition Knowledge Representation Conflict Setting Knowledge Base Select Working Memory Execute Typical Inference Cycle Examples Created By Priti Srinivas Sajja 21

Knowledge-Based Systems Introduction Data Pyramid KBS Objectives and Characteristics Structure Types of Knowledge Acquisition Knowledge Representation Forward Chaining 1. Consider initial facts and store them into working memory of the knowledge base. 2. Check the antecedent part (left hand side) of the production rules. 3. If all the conditions are matched, fire the rule (execute the right hand side). 4. If there is only one rule do the following: 4. 1 Perform necessary actions. 4. 2 Modify working memory and update facts. 4. 3 Check for new conditions. 5. If more than one rule is selected use the conflict resolution strategy to select the most appropriate rules and go to step 4. 6. Continue until appropriate rule is found and executed. Examples Created By Priti Srinivas Sajja 22

Knowledge-Based Systems Introduction Data Pyramid KBS Objectives and Characteristics Structure Types of Knowledge Acquisition Knowledge Representation Examples Backward Chaining 1. Start with possible hypothesis, say H. 2. Store the hypothesis H in working memory along with the available facts. Also consider a rule indicator R, and set it to Null. 3. If H is in the initial facts, the hypothesis it is proven. Go to step 7. 4. If H is not in the initial facts, find a rule, say R, that has a descendent (action) part mentioning the hypothesis. 5. Store R in working memory. 6. Check conditions of the R and match with the existing facts. 7. If matched, then fire the rule R and stop. Otherwise, continue to step 4. Created By Priti Srinivas Sajja 23

Knowledge-Based Systems A Short Break …. Created By Priti Srinivas Sajja 24

Knowledge-Based Systems Introduction Data Pyramid KBS Objectives and Characteristics Structure Types of Knowledge Acquisition Knowledge Representation Examples IDENTIFICATION CONCEPTULIZATION Other Knowledge Sources Experts Knowledge discovery and verification • • • Knowledge Acquisition Techniques Literature review Protocol analysis Diagram-based techniques Concept sorting etc. IDENTIFICATION KBS requirements Knowledge Engineer Knowledge representation User FORMALIZATION IMPLEMENTATION Knowledge Base Data Base Cases and documents Automatic creation from cases TESTING Activities in the knowledge acquisition process • • Find suitable experts and a knowledge engineer Proper homework and planning Interpreting and understanding the knowledge provided by the experts Representing the knowledge provided by the experts Created By Priti Srinivas Sajja 25

Knowledge-Based Systems Knowledge Acquisition Introduction Data Pyramid • Problem Solving • Talking and Story Telling • Supervisory Style • Dealing with multiple experts KBS Objectives and Characteristics Structure Types of Knowledge Acquisition Knowledge Representation Knowledge Engineer Individual expert handling Hierarchical handling Group handling Examples Created By Priti Srinivas Sajja 26

Knowledge-Based Systems Introduction Knowledge Update Data Pyramid KBS Objectives and Characteristics Structure Types of Knowledge Acquisition Knowledge Representation Self-update by system Update by knowledge engineer Update by expert through interface Examples Created By Priti Srinivas Sajja 27

Knowledge-Based Systems Knowledge Representation Introduction Constant: RAM, LAXMAN Data Pyramid Variable: Man Function: Elder (RAM, LAXMAN) returns any value, here, RAM KBS Objectives and Characteristics Predicate: Mortal (RAM) returns a Boolean value, here, True WFF: ‘If you do not exercise, you will gain weight is represented as: x[{Human(x) ^ ~Exercise (x)} Gain weight(x)] Factual Knowledge Representation Structure Types of Knowledge Acquisition Knowledge Representation Examples Person Instance Doctor Agent Instance Patient Give Recipient Medicine Semantic Ne twork Name: ory: Broad Categ y: Sub Categor Fuel Type: Cost: Capacity: Speed: Frame Created By Priti Srinivas Sajja Power Bike Land Vehicle Gearless Gas $ 350 s Two person r 160 Km/Hou 28

Knowledge-Based Systems Knowledge Representation Introduction Data Pyramid Name: Visit to Pharmacy Props: Money Symptoms Treatment Medicine Roles: Dentist - D Receptionist - R Patient - P KBS Objectives and Characteristics Structure Types of Knowledge Acquisition Knowledge Representation Entry Conditions: Patient P has toothache. Patient P has money. Exit Conditions Patient P has less money. Patient P returns with treatment. Patient P has appointment. Patient P has prescription. Scene 1: Entry P enters to the pharmacy. P goes to reception. P meets R. P pays registration and/or fees and gets appointment. Go to Scene 2: Consulting Doctor P meets D. P conveys symptoms. P gets treatment. P gets appointment. Go to Scene 3: Exiting P pays money to R. P exits the pharmacy. Script Examples Created By Priti Srinivas Sajja 29

Knowledge-Based Systems Examples Typology Created By Priti Srinivas Sajja 30

Knowledge-Based Systems Examples Created By Priti Srinivas Sajja 31

Knowledge-Based Systems Examples Created By Priti Srinivas Sajja 32

Knowledge-Based Systems Examples Created By Priti Srinivas Sajja 33

Knowledge-Based Systems Examples Created By Priti Srinivas Sajja 34

Knowledge-Based Systems Examples Created By Priti Srinivas Sajja 35

Knowledge-Based Systems Examples Created By Priti Srinivas Sajja 36

Knowledge-Based Systems Examples Created By Priti Srinivas Sajja 37

Knowledge-Based Systems Examples Created By Priti Srinivas Sajja 38

Knowledge-Based Systems Examples Created By Priti Srinivas Sajja 39

Knowledge-Based Systems Examples Created By Priti Srinivas Sajja 40

Knowledge-Based Systems Examples Created By Priti Srinivas Sajja 41

Knowledge-Based Systems Introduction Data Pyramid Examples KBS • ELIZA is a computer program and an early example of primitive natural language processing. Objectives and Characteristics • ELIZA was written at MIT by Joseph Weizenbaum between 1964 to 1966. Structure • ELIZA was implemented using simple pattern matching techniques, but was taken seriously by several of its users, even after Weizenbaum explained to them how it worked. Types of Knowledge Acquisition Knowledge Representation • It was one of the first chatterbots in existence. Examples Created By Priti Srinivas Sajja 42

Knowledge-Based Systems Examples // Description: this is a very basic example of a chatterbot program by Gonzales Cenelia #include <iostream> #include <string> #include <ctime> int main() { std: : string Response[] = {"I HEARD YOU!", "SO, YOU ARE TALKING TO ME. ", CONTINUE, I AM LISTENING. ", "VERY INTERESTING CONVERSATION. ", MORE. . . " }; srand((unsigned) time(NULL)); std: : string s. Input = ""; std: : string s. Response = ""; while(1) { std: : cout << ">"; std: : getline(std: : cin, s. Input); int n. Selection = rand() % 5; s. Response = Response[n. Selection]; std: : cout << s. Response << std: : endl; } return 0; Created By Priti Srinivas Sajja } "TELL ME 43

Knowledge-Based Systems Introduction Data Pyramid KBS Objectives and Characteristics Structure Types of Knowledge Acquisition Knowledge Representation Examples Created By Priti Srinivas Sajja 44
- Slides: 44