KBAI Lec2-Knowledge Represenation

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 35

KBAI-Knowledge

Lecture 2
The Spirit and Pragmatics of KBS, Knowledge
Representations

Dr. Rasha Abdelkawy

3/17/2024 1
Recall: The KBAI behavior is driven by knowledge

❑ KBAI acts accurately on problem-solving only when it has knowledge or experience about the input problem
domain.
❑ The KB system actions are justified by sensing the environment (Taking input) and
using knowledge
❑ Earlier KB Components
1. knowledge base
• contains essential information about the problem domain
• often represented as facts and rules
2. inference engine
• mechanism to derive new knowledge from the knowledge
base and the information provided by the user
• often based on the use of rules
3. user interface
• interaction with end users
• development and maintenance of the knowledge base

3/17/2024 2
Recall: The KBAI behavior is driven by knowledge

• knowledge acquisition
• transfer of knowledge from humans to computers
• sometimes knowledge can be acquired directly from
the environment
• machine learning
• knowledge representation
• suitable for storing and processing knowledge in
computers
• inference
• mechanism that allows the generation of new
conclusions from existing knowledge in a computer
• explanation
• illustrates to the user how and why a particular
solution was generated

3/17/2024 3
Recall: The KBAI behavior is driven by knowledge

• Key issues:
• Representation of knowledge → knowledge base
• Reasoning processes → inference/reasoning

(*) called Knowledge Representation (KR) language

3/17/2024 4
Lecture Agenda

1. Knowledge and Knowledge Representation.


2. Five Types of Knowledge
3. Cycle of Knowledge Representation
4. Knowledge Representation Requirements
5. Knowledge Representation Approaches
6. Formal Knowledge Representation
7. Which domains are worth building into an expert system?

3/17/2024 5
1. knowledge

❑ Knowledge is a theoretical or practical understanding of a subject or a domain.


Knowledge is also the sum of what is currently known, and apparently,
knowledge is power.
❑ Those who possess knowledge are called experts.
❑ Anyone can be considered a domain expert if he or she has deep knowledge (of
both facts and rules) and strong practical experience in a particular domain.
The area of the domain may be limited. In general, an expert is a skilful person
who can do things other people cannot.
1. knowledge

Knowledge: Implicit versus explicit

Two hypotheses:

(1) Human reasoning is hard to capture, and, thus, intricate implicit


methods, such as neural networks, capture human reasoning best

(2) Human reasoning can be captured, although possibly incompletely.


However, explicit representation is necessary for getting a grip on that
knowledge (e.g., to be able to explain recommendations)

Choice: Explicit Knowledge

3/17/2024 7
1. Knowledge Data Pyramids

3/17/2024 8
1. Knowledge Data Pyramid

3/17/2024 9
1. Knowledge Data Pyramid

Algorithms
+ Data Structures
Meta- = Programs
Knowledge

Information Conventional Programming

Data
Knowledge
Noise + Inference
= Expert System
Data Pyramid
Knowledge-Based Systems
3/17/2024 10
1. What is Knowledge Representation?

❑Knowledge Representation is a study of how the beliefs, intentions, and judgments of


an intelligent agent can be expressed suitably for automated reasoning. One of the primary
purposes of Knowledge Representation includes modeling intelligent behavior for an agent.

❑Knowledge Representation and Reasoning (KR, KRR) represents information from the real
world for a computer to understand and then utilize this knowledge to solve complex real-life
problems like communicating with human beings in natural language. Knowledge representation in
AI is not just about storing data in a database, it allows a machine to learn from that knowledge and
behave intelligently like a human being.

❑The different kinds of knowledge that need to be represented in AI are Objects, Events,
Performance, Facts, Meta-Knowledge , Knowledge-base

3/17/2024 11
2. Five Types of Knowledge

1. Declarative Knowledge –
▪ It includes concepts, facts, and objects and is expressed in a
declarative sentence. ( What instead of how)
2. Structural Knowledge
▪ It is a basic problem-solving knowledge that describes the
relationship between concepts and objects.
3. Procedural Knowledge
▪ This is responsible for knowing how to do something and
includes rules, strategies, procedures, etc.
4. Meta Knowledge
▪ Meta Knowledge defines knowledge about other types of
Knowledge.
5. Heuristic Knowledge
▪ This represents some expert knowledge in the field or
subject.

3/17/2024 12
2. Five Types of Knowledge Example
Procedural style:

3/17/2024 13
3. Cycle of Knowledge Representation
▪ Artificial intelligent Systems usually consist of various components to display their
intelligent behavior. Some of these components include:

1. Perception
2. Learning
3. Knowledge Representation & Reasoning
4. Planning
5. Execution

3/17/2024 14
3. Cycle of Knowledge Representation
1. Perception component retrieves data or information from the environment. Find out the source of the noises
and check if the AI was damaged by anything. Also, it defines how to respond when any sense has been
detected.
2. Learning Component learns from the captured data by the perception component. The goal is to build
computers that can be taught instead of programming them. Learning focuses on the process of self-
improvement. To learn new things, the system requires knowledge acquisition, inference, acquisition of
heuristics, faster searches, etc.
3. Knowledge Representation and Reasoning which shows the human-like intelligence in the machines.
Knowledge representation is all about understanding intelligence. Instead of trying to understand or build
brains from the bottom up, its goal is to understand and build intelligent behavior from the top down and focus
on what an agent needs to know to behave intelligently. Also, it defines how automated reasoning procedures
can make this knowledge available as needed.
4. Planning and Execution components depend on the analysis of knowledge representation and reasoning.
Planning includes giving an initial state, finding its preconditions and effects, and a sequence of actions to
achieve a state in which a particular goal holds.
5. The final stage is the execution of the entire process.

3/17/2024 15
4. Knowledge Representation Requirements

❑knowledge representation properties include:

✓ Representational Accuracy
▪ It should represent all kinds of required knowledge.
✓ Inferential Adequacy ((‫)الكفاية االستداللية‬
▪ It should be able to manipulate the representational structures to produce new
knowledge corresponding to the existing structure.
✓ Inferential Efficiency (‫)الكفاءة االستداللية‬
▪ The ability to direct the inferential knowledge mechanism in the most productive
directions by storing appropriate guides.
✓ Acquisitional efficiency
▪ The ability to acquire new knowledge easily using automatic methods.

3/17/2024 16
5. Knowledge Representation Approaches
1. Simple Relational Knowledge
✓ It is the simplest way of storing facts which uses the relational method.
✓ Here, all the facts about a set of objects are set out systematically in columns.
✓ Also, this approach of knowledge representation is famous in database systems where the relationship
between different entities is represented. Thus, there is little opportunity for inference.
Example:
This is an example of representing simple relational knowledge. Emp ID Name Age
100071 John 25
100056 Amanda 23
2. Inferential Knowledge 100042 Sam 27
• The inferential knowledge approach represents knowledge
in the form of formal logic. Thus, it can be used to derive more facts. Also, it guarantees correctness.
Example:
Statement 1: John is a cricketer.
Statement 2: All cricketers are athletes.

Then it can be represented as; Cricketer(John) ∀x = Cricketer (x) -> Athelete (x)s

3/17/2024 17
5. Knowledge Representation Approaches

3. Inheritable Knowledge
▪ In the inheritable knowledge approach, all data must be stored in a hierarchy of
classes and should be arranged in a generalized form or a hierarchal manner.
▪ The approach contains inheritable knowledge which shows a relation between
instance and class, and it is called instance relation.
▪ In this approach, objects and values are represented in Boxed nodes.

• Example:

3/17/2024 18
6. Formal Knowledge Representation
There are four techniques for representing knowledge such as:
1. Logical Representation:

▪ Is a language with some definite rules that


deal with propositions and have no
ambiguity in representation.

▪ It represents a conclusion based on various


conditions and has some
important communication rules.

▪ it consists of precisely defined syntax and


semantics that support sound inference.

▪ Each sentence can be translated into logic


using syntax and semantics.
3/17/2024 19
6. Formal Knowledge Representation
Logical Representation

Logic was originally developed as a language for mathematical reasoning, as a Need for semantics
shared by most researchers in knowledge representation

Logic definitions as mathematical definitions are exact and complete. E.g.: triangle: shape defined by three
points that are not on a straight line and that are connected by a line.

In time logic has become the dominant language as probability theory for uncertainty reasoning

3/17/2024 20
6. Formal Knowledge Representation Logical
Representation

To manage beliefs expressed in the language.


More than just implementation of a (logical, probabilistic) calculus The symbolic representation
causes the system to behave in a particular fashion

Any language with sufficient expressive power can be used with emphasis on:
• What is represented ≡ content ⇒ Knowledge level (rather than symbol level )
• Statements must be interpreted in relationship to other statements (otherwise no knowledge )
• This implies: language should have a truth theory
• Not a single language, but a spectrum of languages (from simple, computationally tractable, to
complex, computationally intractable

3/17/2024 21
6. Formal Knowledge Representation Logical
Representation

• Tradeoff between expressive power and computational complexity. E.g.: First-order logic versus
(Finite) propositional logic (NP-complete problem)

• Advantages:
• Logical representation helps to perform logical reasoning.
• This representation is the basis for the programming languages.

• Disadvantages:
• Logical representations have some restrictions and are challenging to work with.
• This technique may not be very natural, and inference may not be very efficient.

3/17/2024 22
6. Formal Knowledge Representation Semantic
Network Representation

2- Semantic Network Representation

▪ Semantic networks work as an alternative to predicate logic for knowledge representation.


▪ In Semantic networks, knowledge is represented in the form of graphical networks.
▪ The network consists of nodes representing objects and arcs which describe the relationship
between those objects. Also, it categorizes the object in different forms and links those objects.

• This representation consists of two types of relations:


1. IS-A relation (Inheritance)
2. Kind-of-relation

3/17/2024 23
6. Formal Knowledge Representation Semantic
Network Representation

❑Advantages:

▪ Semantic networks are a natural representation of knowledge.


▪ Also, it conveys meaning transparently.
▪ These networks are simple and easy to understand.

❑Disadvantages:

▪ Semantic networks take more computational time at runtime.


▪ Also, these are inadequate as they do not have any equivalent quantifiers.
▪ These networks are not intelligent and depend on the creator of the system.

3/17/2024 24
6. Formal Knowledge Representation Frame

• Frame Representation
• A frame is a record-like structure that consists of a collection of attributes and values to
describe an entity in the world.
• It consists of a collection of slots and slot values of any type and size. Slots have names and
values which are called facets.
• Advantages:
• It makes the programming easier by grouping the related data.
• Frame representation is easy to understand and visualize.
• It is very easy to add slots for new attributes and relations.
• Also, it is easy to include default data and search for missing values.
• Disadvantages:
• In frame system inference, the mechanism cannot be easily processed.
• The inference mechanism cannot be smoothly proceeded by frame representation.
• It has a very generalized approach.

3/17/2024 25
6. Formal Knowledge Representation Production
Rules

• Production Rules

▪ In production rules, the agent checks for the condition and if the condition exists then the
production rule fires, and corresponding action is carried out.
▪ The condition part of the rule determines which rule may be applied to a problem. Whereas,
the action part carries out the associated problem-solving steps.
▪ This complete process is called a recognize-act cycle.

• The production rules system consists of three main parts:

▪ The set of production rules


▪ Working Memory
▪ The recognize-act-cycle

3/17/2024 26
6. Formal Knowledge Representation Production
Rules

❑Advantages:

• The production rules are expressed in natural language.


• The production rules are highly modular and can be easily removed or modified.

❑Disadvantages:

• It does not exhibit any learning capabilities and does not store the result of the problem for
future use.
• During the execution of the program, many rules may be active. Need Conflict resolution
methodology
.

3/17/2024 27
7. Which domains are worth building into an
expert system?
• Mike Greenwell’s classification of types of expertise, according to identifiable mental components of
the skill (with examples):[source: Greenwell (1988)]

3/17/2024 28
7. Which domains are worth building into an
expert system?

3/17/2024 29
7. Which domains are worth building into an
expert system?

3/17/2024 30
7. Which domains are worth building into an
expert system?

3/17/2024 31
7. Which domains are worth building into an
expert system?

3/17/2024 32
7. Which domains are worth building into an
expert system?

3/17/2024 33
7. Which domains are worth building into an
expert system?

Greenwell argues that only expertise that is judgmental and


analytical, i.e. only the middle box of the nine, is worth
capturing and including in an expert system.

“Any problem that can be and frequently is solved by your in-


house expert in a 10-30 minute phone call can be automated
as an expert system.” Prof.Morris Firebaugh

3/17/2024 34
End of Lecture

End of Lecture

3/17/2024 35

You might also like