Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
44 views70 pages

AI Knowledge Engineering Guide

4676

Uploaded by

rlekha1902
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views70 pages

AI Knowledge Engineering Guide

4676

Uploaded by

rlekha1902
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 70

Knowledge Acquisition

and Representation

Unit II
Contents
• Introduction
• Machine Learning
• Knowledge Engineering
• Procedure for Knowledge Acquisition
• Knowledge Representation
• Reasoning
• KRR System
• KR Languages
• Domain Modeling
• Semantic Nets Reasoning Systems
• Frames Based Systems
• Hybrid Representation Systems
Introduction
• Intelligence – The faculty of understanding
• Understanding – to comprehend something or to
recognize its significance.
• Knowledge possesses some less desirable properties
which includes the followings:
– It is voluminous
– It is hard to characterize accurately
– It is constantly changing
– It differs from data by being organized
Machine Intelligence
• Key issues confronting the designer of an AI system
are:
– Knowledge acquisition
– Knowledge representation
– Knowledge Manipulation
• What is knowledge acquisition?
Knowledge acquisition has been defined as: “ the transfer and
transformation of potential problem-solving expertise from
some knowledge source to a program” – Buchanan et.al.
1983
Machine Intelligence
• The knowledge acquisition process can also be
defined as the task of identifying and eliciting
relevant domain knowledge in sufficient quantities to
provide the power to solve complex problems.

• The process often referred to as expertise transfer


involves the extraction of knowledge from a variety
of sources and its representation in a suitable format.
Machine Intelligence
• Knowledge manipulation occurs primarily through
inference and deduction and the often search-oriented
control strategy or inference engine.
Knowledge Engineering
• The field of knowledge engineering can be defined as
the process of assessing problems, acquiring
knowledge and building knowledge-based systems.
• Knowledge-based development involves the
incorporation of expert knowledge into a system.
• For this reason system development has traditionally
been undertaken by a knowledge engineer.
• A knowledge engineer analogous to the systems
analyst but is much more concerned with the thought
process of the expert.
Management KnowledgeInputs
Engineering
• Identifies the problems to be solved
Expert
• Describe the task, Explains the reasoning, Identifies the
User
• Knows some facts and
additions sources of knowledge, Identifies successful relationships
performance • Needs advice

Knowledge Engineer
Knows the strengths and weakness of Learns about the task from May provide expertise from own
the tools management, experts and users experience and knowledge

Outputs
Analyzing
Choosing a good representation Building a Expanding the Fielding the Maintaining the
domain and task and control prototype system prototype system system
strategies
Procedure for Knowledge
Acquisition
Identify knowledge domain

Locate knowledge source

Overview the knowledge domain

Define the domain boundaries

Select and apply elicitation technique

Review and
Further knowledge required analyze
acquired
knowledge

Domain knowledge base


Sources of Knowledge
• The three main sources of knowledge
– Literature
– Experts
– Examples
• Three different bases of knowledge
– Scientific laws
– Experience
– models
Sources of Knowledge
• Knowledge consists of facts, procedures and
judgmental rules and its widely disseminated.
• Human experts, people of proven tract record, can
provide different types of information.
• Weiss and Kulikowski(1983) identified these as:
– Personal experience of past problems solved
– Personal expertise or methods for solving the problems
– Personal knowledge about the reasons for choosing the
methods used.
Sources of Knowledge
• However, for engineering knowledge based system applications this
approach is insufficient. Few engineering problems are purely
heuristic and the following knowledge sources in addition to the
human expert must be investigated:
– Expert opinion
– Historic data
– Codes of practice
– Standard engineering procedures
– Experimental data
– Technical literature
• Textbooks
• Journals
• Manuals
• Manufacturers information
– Established engineering equations
Types of Knowledge
• Perceptual knowledge
– This covers the knowledge of simple facts and
relationships
• Concepts and relations
– The scientific laws, such as Newton’s equation and Boyle’s
law.
– This is the basis of expert systems
• Strategic knowledge
– The knowledge about how to set about a problem, how to
go round difficulties, what to do when they get stuck.
Knowledge Representation
• The knowledge representation problem concerns the
mismatch between humans and computer ‘memory’,
i.e, how to encode knowledge so that it is a faithful
reflection of the expert’s knowledge and can be
manipulated by computer.
• Psychological research suggests that we do not
exhibit the kinds of reasoning behaviour that we
associate with deductive or ‘theorem proving’
systems. Humans reason from situations to actions
using logical consequences.
Knowledge Representation
• To program a computer to solve non-quantitative
problems dealing with such intangibles as ideas, concepts
and their relationships, a formalism capable of
representation and manipulating these relatively abstract
entities must be devised.
• This requires structuring and processing tools that go
beyond the data, text and numerical manipulation and
computation-oriented systems and languages that prevail
today.
• We call these more powerful structures knowledge bases
and the manipulative operation on these knowledge bases,
inference engine programs.
Knowledge Representation
• What to represent?
• Using knowledge
• Form Vs. Content of Knowledge
• Representing Knowledge
What to Represent
• Objects
– Facts about objects in our real world domain.
• Events
– Actions that occur in our world
• Performance
– A behaviour like playing the guitar involves knowledge
about how to do things
• Meta-Knowledge
– Knowledge about what we know
What to Represent
• Thus ins solving problems in AI, we must represent
knowledge and there are two entities to deal with:
– Facts
• Truths about the real world and what we represent.
• This can be regarded as the knowledge level.
– Representation of the facts
• Which we manipulate.
• This cane be regarded as the symbol level since we usually define the
representation in terms of symbols that can be manipulated by programs.
• The entities can be structured in two ways:
– Knowledge level - at which facts are described
– Symbol level – at which representations of objects are defined in
terms of symbols that can be manipulated in programs.
Using knowledge
• The knowledge can be used in:
– Learning
• Means acquiring knowledge. This is more than simply adding new
facts to a knowledge base. In this process new knowledge is added
to the knowledge base and knowledge previously acquired is
refined or improved.
– Retrieval
• The representation scheme used can have a critical effect on the
efficiency of the method. Humans are very good at it.
– Reasoning
• Infer facts from existing data.
Form vs Content of
Knowledge
• The specific structures by which knowledge is
characterized, in its encoded form, can have
significant effect on its use is solving problems.
• Further, since no single representation or model can
capture all aspects of a real object, an intelligent
entity must employ a wide spectrum of
representations to deal with the world.
Representing Knowledge
• A representation of a situation (or object, or problem)
is a translation of the situation into a system
consisting of a vocabulary that names things and
relations, operations that can be performed on these
things, and facts and constraints about these things.
• The primary distinguished characteristics of a
representation are:
– What information is made explicit
– How the information is physically encoded
Representing Knowledge
• The purpose of a representation is so simplify the
problem of answering a restricted class of questions
about the given situation, and thus the selection of the
representation must be goal-directed.
• At least two distinct representations are required to
match the competence of some given computing
mechanisms to the requirements of solving a real-world
problem:
– The first representation provides efficient symbolic apparatus
for answering questions about the given situation,
– The second translates the solution techniques of the first into
the operations and storage structures inherent in the machine.
Representing Knowledge
• Numerous representation schemes have been
proposed and implemented, each having their own
strength and weakness.
• Mylopoulos and Levesque(1954) have classified
these into four categories:
– Logical representation scheme
– Procedural representation scheme
– Network representation scheme
– Structured representation scheme
Representing Knowledge
• Logical Representation
– It uses expression in formal logic to represent a knowledge
base.
– Inference rules and proof procedure apply this knowledge
to problem instances.
– First-order predicate calculus is the most widely used
logical representation scheme, but it is only the number of
logical representations.
– PROLOG is an ideal programming language for
implementing logical representation schemes.
Representing Knowledge
• Procedural Representation Schemes
– Procedural schemes represent knowledge as a set of
instructions for solving a problem.
– In a rule-based system, for example, an if…then rule may
be interpreted as a procedure for soling a goal in problem
domain to solve the conclusions, solve the premises in
order.
– Production systems are examples of procedural
representation schemes.
Representing Knowledge
• Network Representation Schemes
– Captures knowledge as a graph in which the nodes
represent objects or concepts in the problem domain and
the arcs represent relations or associations between them.
• Structural Representation Schemes
– Extends networks by allowing each note to be a complex
data structure consisting of named slots with attached
values.
– These values may be simple numeric or symbolic data,
pointers to other frames, or even procedures for performing
a particular task.
Logical Representation
• Logical representation is a language with some
concrete rules which deals with propositions and has
no ambiguity in representation.
• Logical representation means drawing a conclusion
based on various conditions.
• This representation lays down some important
communication rules. It consists of precisely defined
syntax and semantics which supports the sound
inference. Each sentence can be translated into logics
using syntax and semantics.
Logical Representation
• Syntax:
– Syntaxes are the rules which decide how we can construct legal
sentences in the logic.
– It determines which symbol we can use in knowledge
representation.
– How to write those symbols.
• Semantics:
– Semantics are the rules by which we can interpret the sentence in
the logic.
– Semantic also involves assigning a meaning to each sentence.
– Logical representation can be categorised into mainly two logics:
– Propositional Logics
– Predicate logics
Logical Representation
• Advantages of logical representation:
– Logical representation enables us to do logical reasoning.
– Logical representation is the basis for the programming
languages.
• Disadvantages of logical Representation:
– Logical representations have some restrictions and are
challenging to work with.
– Logical representation technique may not be very natural,
and inference may not be so efficient.
Procedural Representation
Schemes
• It is constitute with rule-based expert systems.
• An expert system is a knowledge based program that
provides “expert quality” solutions to problems in a
specific domain.
• It is the method used to organize and formalize the
knowledge in the knowledge base. It is in the form of
IF-THEN-ELSE rules.
• Example:
– If it is raining then bring umbrella.
Network Representation
Schemes
• Association theories define the meaning of an object in terms of a
network of other objects in a mind or a knowledge base.
• Although symbols denote objects in a world, this denotation is mediated
by our store of knowledge.
• When We perceive and reason about an object, that perception is first
mapped into concept minds. This concept is a part of our entire
knowledge of the world and is connected, through appropriate
relationships to other concepts.
• These relationships forte understanding of the properties and behaviour
of objects such as "snow", for example*, through an experience we
associate the concept "snow" with other concepts such as cold, white,
snowman, slippery, and ice.
• Our understanding of 'snow" and the truth of statements like "snow is
white" manifests itself out of this network of associations. Here we shall
see two types of network re schemes which are discussed below:
Network Representation
Schemes
• The types of network representations are:
– Semantic Networks
– Conceptual Graphs
– Conceptual Dependency
Semantic Networks
• Semantic networks are alternative of predicate logic
for knowledge representation.
• In Semantic networks, we can represent our
knowledge in the form of graphical networks.
• This network consists of nodes representing objects
and arcs which describe the relationship between
those objects.
• Semantic networks can categorize the object in
different forms and can also link those objects.
Semantic networks are easy to understand and can be
easily extended.
Semantic Networks
• This representation consist of mainly two types of
relations:
– IS-A relation (Inheritance)
– Kind-of-relation
• Example: Following are some statements which we need
to represent in the form of nodes and arcs.
Statements:
– Jerry is a cat.
– Jerry is a mammal
– Jerry is owned by Priya.
– Jerry is brown colored.
– All Mammals are animal.
Semantic Networks
• Advantages of Semantic network:
– Semantic networks are a natural representation of
knowledge.
– Semantic networks convey meaning in a transparent
manner.
– These networks are simple and easily understandable.
Semantic Networks
• Drawbacks in Semantic representation:
– Semantic networks take more computational time at runtime as we
need to traverse the complete network tree to answer some questions.
It might be possible in the worst case scenario that after traversing the
entire tree, we find that the solution does not exist in this network.
– Semantic networks try to model human-like memory (Which has
1015 neurons and links) to store the information, but in practice, it is
not possible to build such a vast semantic network.
– These types of representations are inadequate as they do not have any
equivalent quantifier, e.g., for all, for some, none, etc.
– Semantic networks do not have any standard definition for the link
names.
– These networks are not intelligent and depend on the creator of the
system.
Conceptual Graphs
• A Conceptual graph is a finite, connected, bipartite
graph.
• The nodes of the graphs are either concepts or
conceptual relations.
• Conceptual graphs do not use labeled arcs; instead the
conceptual relation nodes represent relation between
concepts.
• Because conceptual graphs are bipartite; concepts can
have arcs to conceptual relations and vice-versa.

Dog color Brown


Conceptual dependency
• Conceptual dependency theory is a model of natural language
understanding used in artificial intelligence systems.
• This representation is used in natural language processing in
order to represent them earning of the sentences in such a
way that inference we can be made from the sentences. It is
independent of the language in which the sentences were
originally stated.
• CD representations of a sentence is built out of primitives,
which are not words belonging to the language but are
conceptual, these primitives are combined to form the
meaning s of the words. As an example consider the event
represented by the sentence.
Conceptual dependency
• Arrows indicate direction of dependency
Double arrow indicates two may link between actor and the action
• P indicates past tense
• ATRANS is one of the primitive acts used by the theory . it indicates transfer of
possession
• 0 indicates the object case relation
• R indicates the recipient case relation
• Example
Conceptual dependency
• Conceptual dependency provides a str5ucture in which knowledge
can be represented and also a set of building blocks from which
representations can be built. A typical set of primitive actions are
– ATRANS - Transfer of an abstract relationship(Eg: give)
– PTRANS - Transfer of the physical location of an object(Eg: go)
– PROPEL - Application of physical force to an object (Eg: push)
– MOVE - Movement of a body part by its owner (eg : kick)
– GRASP - Grasping of an object by an actor(Eg: throw)
– INGEST - Ingesting of an object by an animal (Eg: eat)
– EXPEL - Expulsion of something from the body of an animal (cry)
– MTRANS - Transfer of mental information(Eg: tell)
– MBUILD - Building new information out of old(Eg: decide)
– SPEAK - Production of sounds(Eg: say)
– ATTEND - Focusing of sense organ toward a stimulus (Eg: listen)
Conceptual dependency
• Four primitive conceptual categories to build
dependency structures:
– ACTs : Actions
– PPs : Object (Picture Procedures)
– AAs : Modifiers of actions (action aiders)
– Pas : Modifiers of PPs (picture aiders)
Structured Representation
Scheme - Frames
• A frame is a record like structure which consists of a
collection of attributes and its values to describe an
entity in the world.
• Frames are the AI data structure which divides
knowledge into substructures by representing
stereotypes situations.
• It consists of a collection of slots and slot values.
• These slots may be of any type and sizes. Slots have
names and values which are called facets.
Structured Representation
Scheme - Frames
• Facets: The various aspects of a slot is known
as Facets.
• Facets are features of frames which enable us to put
constraints on the frames.
• Example: IF-NEEDED facts are called when data of
any particular slot is needed.
• A frame may consist of any number of slots, and a slot
may include any number of facets and facets may have
any number of values.
• A frame is also known as slot-filter knowledge
representation in artificial intelligence.
Structured Representation
Scheme - Frames
• Frames are derived from semantic networks and later
evolved into our modern-day classes and objects.
• A single frame is not much useful. Frames system
consist of a collection of frames which are connected.
• In the frame, knowledge about an object or event can
be stored together in the knowledge base.
• The frame is a type of technology which is widely
used in various applications including Natural
language processing and machine visions.
Structured Representation
Scheme - Frames
Example: 1
Let's take an example of a frame for a
book

Slots Filters

Title Artificial Intelligence

Genre Computer Science

Author Peter Norvig

Edition Third Edition

Year 1996

Page 1152
Structured Representation
Scheme - Frames
• Example 2:
• Let's suppose we are taking an entity, Peter. Peter is
an engineer as a profession, and his age is 25, he lives
in city London, and the country is England. So
following is the frame representation for this:
Slots Filter

Name Peter
Profession Doctor
Age 25
Marital status Single
Weight 78
Structured Representation
Scheme - Frames
• Advantages of frame representation:
– The frame knowledge representation makes the
programming easier by grouping the related data.
– The frame representation is comparably flexible and used
by many applications in AI.
– It is very easy to add slots for new attribute and relations.
– It is easy to include default data and to search for missing
values.
– Frame representation is easy to understand and visualize.
Structured Representation
Scheme - Frames
• Disadvantages of frame representation:
– In frame system inference mechanism is not be easily
processed.
– Inference mechanism cannot be smoothly proceeded by
frame representation.
– Frame representation has a much generalized approach.
Structured Representation
Scheme - Scripts
• A structured representation of background world
knowledge. This structure contains knowledge about
objects, actions, and situations that are described in
the input text.
• If we consider the Knowledge about Shooping or
Entering into the Restraunt. This kind of stored
Knowledge about stereotypical events is called a
Script.
Structured Representation
Scheme - Scripts
• Scripts like frames, are a structure used to represent
stereotypical situation It also contains slots which can
be filled with appropriate values. However, whereas
frames typically represent knowledge of objects and
concepts, scripts represent knowledge of events.
• They were originally proposed as a means of
providing contextual information to support natural
language understanding. As script is used in
predicting what will happen in a certain situation
even though certain events have not been observed as
yet.
Structured Representation
Scheme - Scripts
• A script consists of number of elements such as:
– I. Entry Conditions:
• These are the conditions which must be true for the script to be activated.
– II. Results:
• These are the facts which are true when the script ends.
– III. Props:
• These are the objects which are involved in the events described in the scripts.
– IV. Roles:
• These are the expected actions of the major participants in the events described in
the script.
– V. Scenes:
• These are the sequences of events which take place. The events are described
following the formalism of CD (conceptual dependency).
– VI. Tracks:
• These represent variations on general theme or pattern represented by a particular
script.
Structured Representation
Scheme - Scripts
• Example:-Script for going to the bank to withdraw money.
SCRIPT : Withdraw money
TRACK : Bank
PROPS : Money
Counter
Form
Token
Roles : P= Customer
E= Employee
C= Cashier
Entry conditions: P has no or less money.
The bank is open.
Results : P has more money.
Structured Representation
Scheme - Scripts
• Advantages of Scripts
– Ability to predict events.
– A single coherent interpretation maybe builds up from a
collection of observations.
• Disadvantages of Scripts
– Less general than frames.
– May not be suitable to represent all kinds of knowledge
REASONING AND KRR
SYSTEMS
Reasoning
• Reasoning
– The reasoning is the mental process of deriving logical
conclusion and making predictions from available
knowledge, facts, and beliefs. Or we can say, "Reasoning is
a way to infer facts from existing data." It is a general
process of thinking rationally, to find valid conclusions.
• Types of Reasoning
– Formal reasoning
– Procedural reasoning
– Reasoning by analogy
– Generalization and abstraction
– Metalevel reasoning
Reasoning
• Formal reasoning
– Involves the syntactic manipulation of data structures to
deduce new ones, in accordance with pre-specified rules of
inference.
– It is the type of reasoning that is most natural and most
commonly used in logic-based and production rule-based
representation systems.
– It involves rules such as modus ponens: if P implies Q, and
P is true, then Q must be true.
Reasoning
• Procedural reasoning
– Involves specialized routines or procedures for answering
questions and solving problems.
– Procedural reasoning is most commonly used today in
frame-based and semantic network based systems.
– It is used to a lesser extent in conventional programs for
which skeletal program shells are created that can solve a
class of specific problems.
Reasoning
• Reasoning by analogy
– Involves the extrapolation of new facts from existing
knowledge.
• Generalization and abstraction
– It is natural reasoning process
– It involves induction rules.
• Metalevel reasoning
– Involves using knowledge-particularly knowledge about
the extent of your knowledge about the importance of
certain facts in order to solve a problem.
Forward and Backward
Chaining
• The inference engine is the component of the
intelligent system in artificial intelligence, which
applies logical rules to the knowledge base to infer
new information from known facts. The first
inference engine was part of the expert system.
Inference engine commonly proceeds in two modes,
which are:
– Forward chaining
– Backward chaining
Forward Chaining
• Forward chaining is also known as a forward
deduction or forward reasoning method when using an
inference engine.
• Forward chaining is a form of reasoning which start
with atomic sentences in the knowledge base and
applies inference rules (Modus Ponens) in the forward
direction to extract more data until a goal is reached.
• The Forward-chaining algorithm starts from known
facts, triggers all rules whose premises are satisfied,
and add their conclusion to the known facts. This
process repeats until the problem is solved.
Forward Chaining
• Properties of Forward-Chaining:
– It is a down-up approach, as it moves from bottom to top.
– It is a process of making a conclusion based on known
facts or data, by starting from the initial state and reaches
the goal state.
– Forward-chaining approach is also called as data-driven as
we reach to the goal using available data.
– Forward -chaining approach is commonly used in the
expert system, such as CLIPS, business, and production
rule systems.
Backward Chaining
• Backward-chaining is also known as a backward
deduction or backward reasoning method when using
an inference engine.
• A backward chaining algorithm is a form of
reasoning, which starts with the goal and works
backward, chaining through rules to find known facts
that support the goal.
Backward Chaining
• Properties of backward chaining:
• It is known as a top-down approach.
• Backward-chaining is based on modus ponens inference rule.
• In backward chaining, the goal is broken into sub-goal or sub-
goals to prove the facts true.
• It is called a goal-driven approach, as a list of goals decides
which rules are selected and used.
• Backward -chaining algorithm is used in game theory,
automated theorem proving tools, inference engines, proof
assistants, and various AI applications.
• The backward-chaining method mostly used a depth-first
search strategy for proof.
S. Forward Chaining Backward Chaining
No
.

1. Forward chaining starts from known facts Backward chaining starts from the goal
and applies inference rule to extract more and works backward through inference
data unit it reaches to the goal. rules to find the required facts that
support the goal.

2. It is a bottom-up approach It is a top-down approach


3. Forward chaining is known as data-driven Backward chaining is known as goal-
inference technique as we reach to the driven technique as we start from the
goal using the available data. goal and divide into sub-goal to extract
the facts.
4. Forward chaining reasoning applies a Backward chaining reasoning applies a
breadth-first search strategy. depth-first search strategy.

5. Forward chaining tests for all the available Backward chaining only tests for few
rules required rules.
6. Forward chaining is suitable for the Backward chaining is suitable for
planning, monitoring, control, and diagnostic, prescription, and debugging
interpretation application. application.

7. Forward chaining can generate an infinite Backward chaining generates a finite


number of possible conclusions. number of possible conclusions.

8. It operates in the forward direction. It operates in the backward direction.


9. Forward chaining is aimed for any Backward chaining is only aimed for the
conclusion. required data.
Knowledge Representation
Languages
• The main features of KR languages are:
– Object oriented
• All information about a specific concept
– Generalization/specialization
• Grouping concepts in hierarchies
– Reasoning
• Ability to state in a formal way
– Classification
• Given an abstract description of a concept
Domain Modeling
• Domain modeling is the field in which the application
of KR to specific domain is studied and performed.
• It consists of the following:
– Domain knowledge – refers to the knowledge possessed by
domain experts
– Meta model – refers to the KR formalism
– Instantiation – refers knowledge acquisition
• It is implemented in
– Ontological analysis
– Discourse Representation Theory (DRT)
Domain Modeling
• Ontological analysis:
– An ontology is a set of concepts and categories in a subject
area or domain that possesses the properties and relations
between them. Ontological Modeling can help the cognitive
AI or machine learning model by broadening its' scope. They
can include any data type or variation and set each diver data
to a specific task.
• DRT
– Discourse representation theory is in the first instance a
theory of natural language (NL) semantics. Its main relevance
for pragmatics is that the theory has prompted a reassessment
of the relationship between semantics and pragmatics.
Semantic Network
• AI agents have to store and organize information in
their memory. One of the ways they do this is by
using semantic networks.
• Semantic networks are a way of representing
relationships between objects and ideas. For example,
a network might tell a computer the relationship
between different animals (a cat IS A mammal, a cat
HAS whiskers). Below is an example image of a
semantic network.

You might also like