0% found this document useful (0 votes)
73 views111 pages

Unit 5

The document discusses expert systems, including their architecture, components, development process, and examples. It describes the key parts of an expert system as the knowledge base, inference engine, and user interface. It also covers rule-based systems, frame-based systems, and the stages of building an expert system such as knowledge acquisition and coding the knowledge base. Common expert system languages and examples like MYCIN are also mentioned.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
Download as pptx, pdf, or txt
0% found this document useful (0 votes)
73 views111 pages

Unit 5

The document discusses expert systems, including their architecture, components, development process, and examples. It describes the key parts of an expert system as the knowledge base, inference engine, and user interface. It also covers rule-based systems, frame-based systems, and the stages of building an expert system such as knowledge acquisition and coding the knowledge base. Common expert system languages and examples like MYCIN are also mentioned.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1/ 111

18CSC305J-Artificial Intelligence

Unit- V

17/07/2023 1
• Expert System Architecture • Advance topics in Artificial Intelligence- Cloud
Pros and cons of Expert system Computing and Intelligent agent
• Rule based systems • Business Intelligence and Analytics
Frame based expert system
• Sentiment Analysis
• Case study • Deep Learning Algorithms
• NLP – levels of NLP • Planning and Logic in intelligent Agents
• Syntactic and Semantic Analysis
Information Retrieval
• Information Extraction
Machine Translation
• NLP Applications

17/07/2023 2
Expert Systems

17/07/2023 3
Expert Systems - Objectives
• Learn the meaning of an expert system
• Understand the problem domain and knowledge domain
• Learn the advantages of an expert system
• Understand the stages in the development of an expert
system
• Examine the general characteristics of an expert system

17/07/2023 4
What is an expert system?
“An expert system is a computer system that emulates, or acts in all
respects, with the decision-making capabilities of a human expert.”

Professor Edward Feigenbaum


Stanford University

17/07/2023 5
Components of Expert Systems

17/07/2023 6
Expert System Components
User
Interface
A facility for the user to interact with the
Expert System

Inference
Reasoning (Thinking). Makes logical Engine
deductions based upon the knowledge in the
KB.

Knowledge
Base
Contains the domain knowledge
17/07/2023 8
Architecture of Expert Systems
Knowledge Base
Stores all relevant information, data, rules, cases, and
relationships used by the expert system.
Uses
•Rules
•If-then Statements
•Fuzzy Logic

Inference Engine
Seeks information and relationships from the knowledge
base and provides answers, predictions, and suggestions
the way a human expert would.
Uses
•Backward Chaining
•Forward Chaining

17/07/2023 9
Architecture of Expert Systems
Explanation Facility
Allows a user to understand how the expert system arrived at certain conclusions or results.
For example: it allows a doctor to find out the logic or rationale of the diagnosis made by a medical expert
system

Knowledge acquisition facility


Provide convenient and efficient means of capturing and storing all the components of the knowledge base.
Acts as an interface between experts and the knowledge base.

User Interface
Specialized user interface software employed for designing, creating, updating, and using expert
systems.
The main purpose of the user interface is to make the development and use of an expert system easier
for users and decision makers
17/07/2023 10
General Methods of Inferencing
• Forward chaining (data-driven)– It is a strategy of an expert system to answer
the question, “What can happen next?”

Examples: CLIPS, OPS5


• Backward chaining (query/Goal driven) – With this strategy, an expert system
finds out the answer to the question, “Why this happened?”

Examples: MYCIN

17/07/2023 11
Expert Systems Development

17/07/2023 12
Expert system technology may include:

• Special expert system languages – CLIPS

• Programs

• Hardware designed to facilitate the implementation of those


systems

17/07/2023 13
Problem Domain vs. Knowledge Domain

• An expert’s knowledge is specific to one problem domain –


medicine, finance, science, engineering, etc.
• The expert’s knowledge about solving specific problems is called
the knowledge domain.
• The problem domain is always a superset of the knowledge
domain.

17/07/2023 14
Problem and Knowledge Domain Relationship

17/07/2023 15
Advantages of Expert Systems
• These systems are highly reproducible.
• They can be used for risky places where the human presence is not
safe.
• Error possibilities are less if the KB contains correct knowledge.
• The performance of these systems remains steady as it is not affected
by emotions, tension, or fatigue.
• They provide a very high speed to respond to a particular query.

17/07/2023 16
Disadvantages of Expert Systems
• The response of the expert system may get wrong if the knowledge
base contains the wrong information.
• Like a human being, it cannot produce a creative output for different
scenarios.
• Its maintenance and development costs are very high.
• Knowledge acquisition for designing is much difficult.
• For each domain, we require a specific ES, which is one of the big
limitations.
• It cannot learn from itself and hence requires manual updates.

17/07/2023 17
Examples of Expert Systems

Following are the Expert System Examples:


• MYCIN: It was based on backward chaining and could identify various
bacteria that could cause acute infections. It could also recommend drugs
based on the patient's weight. It is one of the best Expert System Example.
• DENDRAL: Expert system used for chemical analysis to predict molecular
structure.
• PXDES: An Example of Expert System used to predict the degree and type
of lung cancer
• CaDet: One of the best Expert System Example that can identify cancer at
early stages

17/07/2023 18
Development of an Expert System

17/07/2023 19
Uncertainty
• Both human experts and expert systems must be able to deal with
uncertainty.
• It is easier to program expert systems with shallow knowledge than
with deep knowledge.
• Shallow knowledge – based on empirical and heuristic
knowledge.
• Deep knowledge – based on basic structure, function, and
behavior of objects.

17/07/2023 20
Broad Classes of Expert Systems

17/07/2023 21
The process of building an expert system:

1. The knowledge engineer establishes a dialog with


the human expert to elicit knowledge.
2. The knowledge engineer codes the knowledge
explicitly in the knowledge base.
3. The expert evaluates the expert system and gives a
critique to the knowledge engineer.

17/07/2023 22
Considerations for Building Expert Systems
• Can the problem be solved effectively by conventional
programming?
• Is there a need and a desire for an expert system?
• Is there at least one human expert who is willing to cooperate?
• Can the expert explain the knowledge to the knowledge
engineer can understand it.
• Is the problem-solving knowledge mainly heuristic and
uncertain?

17/07/2023 23
Languages, Shells, and Tools

• Expert system languages are post-third generation.


• Procedural languages (e.g., C) focus on techniques to
represent data.
• More modern languages (e.g., Java) focus on data abstraction.
• Expert system languages (e.g. CLIPS) focus on ways to represent
knowledge.

17/07/2023 24
Production Rules

• Knowledge base is also called production memory.


• Production rules can be expressed in IF-THEN pseudocode format.
• In rule-based systems, the inference engine determines which rule
antecedents are satisfied by the facts.

17/07/2023 25
1.

Types of ES

*Rule-based ES
*Frame based ES

17/07/2023 26
Structure of a Rule-Based Expert System

17/07/2023 27
Rules of ES
 The term rule in AI, which is the most commonly used type of
knowledge representation, can be defined as an IF-THEN structure
that relates given information or facts in the IF part to some action in
the THEN part. A rule provides some description of how to solve a
problem. Rules are relatively easy to create and understand.
 Any rule consists of two parts: the IF part, called the antecedent
(premise or condition) and the THEN part called the consequent
(conclusion or action).
IF antecedent
THEN consequent
 A rule can have multiple antecedents joined by the keywords AND
(conjunction), OR (disjunction) or
a combination of both.

IF antecedent 1 IF antecedent 1
AND antecedent
.. 2 ..OR antecedent 2
. .
AND antecedent n OR antecedent n
THEN consequent THEN consequent
 The antecedent of a rule incorporates two parts: an object (linguistic
object) and its value. The object and its value are linked by an operator.
 The operator identifies the object and assigns the value. Operators such
as is, are, is not, are not are used to assign a symbolic value to a
linguistic object.
 Expert systems can also use mathematical operators to define an object
as numerical and assign it to the numerical value.
IF ‘age of the customer’ < 18
AND ‘cash withdrawal’ > 1000
THEN ‘signature of the parent’ is required
Rules can represent relations, recommendations, directives,
strategies and heuristics:
 Relation
IF the ‘fuel tank’ is empty
THENthe car is dead
 Recommendation
IF the season is autumn
AND the sky is cloudy
AND the forecast is drizzle
THENthe advice is ‘take an umbrella’
 Directive
IF the car is dead
AND the ‘fuel tank’ is empty
THENthe action is ‘refuel the car’
 Strategy
IF the car is dead
THENthe action is ‘check the fuel tank’;
step1 is complete
IF step1 is complete
AND the ‘fuel tank’ is full
THENthe action is ‘check the battery’;
step2 is complete
 Heuristic
IF the spill is liquid
AND the ‘spill pH’ < 6
AND the ‘spill smell’ is vinegar
THENthe ‘spill material’ is ‘acetic acid’
Inference Engine Cycle

17/07/2023 33
Advantages of rule-based expert systems
 Natural knowledge representation. An expert usually explains the
problem-solving procedure with such expressions as this: “In such-
and-such situation, I do so-and-so”. These expressions can be
represented quite naturally as IF-THEN production rules.
 Uniform structure. Production rules have the uniform IF-THEN
structure. Each rule is an independent piece of knowledge. The very
syntax of production rules enables them to be self-documented.
Advantages of rule-based expert systems

 Separation of knowledge from its processing. The structure of a


rule-based expert system provides an effective separation of the
knowledge base from the inference engine. This makes it possible to
develop different applications using the same expert system shell.
 Dealing with incomplete and uncertain knowledge. Most rule-based
expert systems are capable of representing and reasoning with
incomplete and uncertain knowledge.
Disadvantages of rule-based expert systems
 Opaque relations between rules. Although the individual production
rules are relatively simple and self-documented, their logical
interactions within the large set of rules may be opaque. Rule-based
systems make it difficult to observe how individual rules serve the
overall strategy.
 Ineffective search strategy. The inference engine applies an
exhaustive search through all the production rules during each cycle.
Expert systems with a large set of rules (over 100 rules) can be slow,
and thus large rule-based systems can be unsuitable for real-time
applications.
Disadvantages of rule-based expert systems
 Inability to learn. In general, rule-based expert systems do not have
an ability to learn from the experience. Unlike a human expert, who
knows when to “break the rules”, an expert system cannot
automatically modify its knowledge base, or adjust existing rules or
add new ones. The knowledge engineer is still responsible for
revising and maintaining the system.
Frame-Based Expert System
• The expert systems which make use of frames for the knowledge are called
frame-based expert systems.
• What is a frame? – A frame is a data structure with typical knowledge
about the object or concept.
• Frame has its name and set of attributes
• Example : A car frame can have make, type, color and so on as
slots/attributes in the frame
• Each slot/ attribute has unique value associated to it

17/07/2023 38
Frame-Based Expert System
We can have the following included in the slot

1. Frame Name
2. Relationship with other frames
3. Values or Ranges
4. Procedural information

Represents the frame structure for Class and Instance


17/07/2023 39
Frame-Based Expert System
• Relationship – hierarchy, or to be specific, the
inheritance is depicted

• Values & Ranges – Represent the actual/default values


or specified ranges

• Procedural information – the slot is attached to a


procedure that is executed when any event is triggered
such as change in value for the slot

• Instance Frame refers to an object and Class frame


refers to group
Frames : Class and Instance

17/07/2023 40
Working of Frame-Based Expert System
• Method – A method is a procedure that is executed
when requested

• Demon – makes use of if-then structure

• Frames that have the knowledge representation, the


methods or the demons essentially add actions to
them.
When needed and when required methods : Snapshot
• As an example, how the process of an expert system
works to check the eligibility of a student appearing
for an exam is explained in the picture

17/07/2023 41
Guidelines to build a Frame-Based Expert System
The development of a frame-based system
typically involves the following steps:

1. Specify the problem and define the scope of the system.


2. Determine classes and their attributes.
3. Define instances.
4. Design displays.
5. Define WHEN CHANGED and WHEN NEEDED
methods, and demons.
6. Define rules.
7. Evaluate and expand the system.

17/07/2023 42
Guidelines to build a Frame-Based Expert System

17/07/2023 43
Natural Language
Processing (NLP)

17/07/2023 44
Natural Language Processing or NLP is a technique or program which makes computers
or machines enable to understand and process human language. Means it’s a
communication tool between human and machine.

17/07/2023 45
17/07/2023 46
APPLICATION OF NATURAL LANGUAGE PROCESSING

Question Answering

17/07/2023 47
17/07/2023 48
Natural Language Understanding (NLU)

17/07/2023 49
Syntactical Ambiguity

Lexical Ambiguity

17/07/2023 50
17/07/2023 51
Natural Language Generation (NLG)

It is the process of producing meaningful phrases and sentences in the form of natural language from
some internal representation.
It involves −

17/07/2023 52
17/07/2023 53
17/07/2023 54
17/07/2023 55
17/07/2023 56
17/07/2023 57
17/07/2023 58
17/07/2023 59
17/07/2023 60
17/07/2023 61
NLP PIPELINE

17/07/2023 62
17/07/2023 63
INFORMATION RETRIEVAL

17/07/2023 64
Classic IR Models

Boolean model
simple model based on set theory
queries as Boolean expressions
adopted by many commercial systems
Vector space model
queries and documents as vectors in an M-dimensional space
M is the number of terms
find documents most similar to the query in the M-dimensional space
Probabilistic model
probabilistic approach
assume an ideal answer set for each query
iteratively refine the properties of the ideal answer set

17/07/2023 65
17/07/2023 66
Information retrieval - Models

17/07/2023 67
Information retrieval - Models

17/07/2023 68
17/07/2023 69
Information retrieval - Models

17/07/2023 70
Information retrieval - Models

17/07/2023 71
VECTOR SPACE MODEL

17/07/2023 72
PROBABILISTIC MODEL

17/07/2023 73
Information Extraction

Information extraction is the process of extracting information from unstructured textual sources to
enable finding entities as well as classifying and storing them in a database

17/07/2023 74
Information Extraction

17/07/2023 75
Information Extraction

17/07/2023 76
MACHINE TRANSLATION

17/07/2023 77
• Advance topics in Artificial Intelligence- Cloud Computing and
Intelligent agent
• Business Intelligence and Analytics
• Sentiment Analysis
• Deep Learning Algorithms
• Planning and Logic in intelligent Agents

17/07/2023 78
Advance topics in Artificial Intelligence- Cloud
Computing and Intelligent agent
Cloud computing
The practice of using a network of remote servers hosted on the
Internet
to:
 store,
 manage,
 and process data,
rather than a local server or a personal computer.

17/07/2023 79
Cloud computing and
AI(contd.)
Cloud computing and AI

While artificial intelligence (A.I.) has struggled to gain


footholds in other niches, it is finding its place in the
world of cloud computing, a sort of revolution within the
revolution that could rapidly change the face of businesses
using cloud computing solutions over the next few years.

17/07/2023 80
Cloud computing and
AI(contd.)
In three areas of cloud computing, A.I. is taking long strides.
Those areas are

 Parallel processing

 Machine Learning-ML Algorithms

 Big Data

17/07/2023 81
Business Intelligence and Analytics

17/07/2023 82
Business intelligence systems are used to maintain, optimize and streamline current operations. BI
improves and maintains operational efficiency and helps businesses increase organizational
productivity. Business intelligence software confers many benefits, notably powerful reporting and
data analysis capabilities. Using BI’s rich visualization mechanisms, managers are able to generate
intuitive, readable reports that contain relevant, actionable data.

17/07/2023 83
How AI uses big data
As business enterprises increasingly need a massive data-
crunching champion, cloud computing companies have begun
to deploy Artificial Intelligence as a service (AIaaS). Once
AIaaS is deployed, it can begin crunching data at a faster
rate than any single microprocessor or human mind could
ever hope to compete with.

17/07/2023 84
AI has not come to take over our world, but to improve
the way we harness technology to make everything better.
Consider the surface of AI finally scratched. ??

17/07/2023 85
Business Intelligence and Analytics

17/07/2023 86
So, how does AI actually work in
the business world? let’s try to
understand what artificial
intelligence is and why it is so
important for today’s business
corporations.

17/07/2023 87
What is Business Intelligence
(BI)?

Business intelligence systems are used to maintain, optimize and streamline current operations. BI
improves and maintains operational efficiency and helps businesses increase organizational
productivity. Business intelligence software confers many benefits, notably powerful reporting and
data analysis capabilities. Using BI’s rich visualization mechanisms, managers are able to generate
intuitive, readable reports that contain relevant, actionable data.

Popular business intelligence solutions include; SAP BusinessObjects, QlikView, IBM Cognos, Microstrategy, etc.

https://selecthub.com/business-intelligence/business-intelligence-vs-business-analytics/

17/07/2023 88
What is Business Analytics
(BA)?

Like business intelligence, BA collects and analyzes data, employs predictive analytics and
generates richly visualized reports, helping identify and address an organization’s weak points.
That’s where similarities end. Business analytics software is used to explore and analyze
historical and current data. It utilizes statistical analysis, data mining and quantitative analysis
to identify past business trends.

Popular business analytics solutions include; SAP Business Analytics Suite, Pentaho BA, Birst BI and Tableau BIg Data Analytics.

https://selecthub.com/business-intelligence/business-intelligence-vs-business-analytics/

17/07/2023 89
Choosing between Business Intelligence (BI)
and Business Analytics (BA)

While superficially similar, the difference between business intelligence vs business analytics
is clear:
- BI uses past and current data to optimize the present for current success.
- BA uses the past and analyzes the present to prepare businesses for the future.

Choosing the solution for your business depends on your aims.


- If you are satisfied with your business model as a whole and mainly wish to improve
operations, increase efficiency and meet organizational goals, business intelligence may be
an optimal solution.
- If you intend to change your business model and need to know where to start, business
analytics might be the best option.

https://selecthub.com/business-intelligence/business-intelligence-vs-business-analytics/

17/07/2023 90
Chatbots, virtual assistants, and business
Based on these intelligence bots
capabilities, we
have seen
Targeted online advertising
multiple
applications of
artificial Predictive analytics

intelligence in
business in the Voice recognition
form of:
Pattern recognition
17/07/2023 91
Sentiment Analysis

17/07/2023 92
Sentiment Analysis

Sentiment analysis is the automated process of analyzing text to


determine the sentiment expressed (positive, negative or neutral).
Some popular sentiment analysis applications include social media
monitoring, customer support management, and analyzing customer
feedback

17/07/2023 93
Social media monitoring

https://monkeylearn.com/sentiment-analysis/
17/07/2023 94
Google Product
Search
• a

95

17/07/2023
DEEP LEARNING

17/07/2023 96
17/07/2023 97
17/07/2023 98
MACHINE
LEARNING
• Train machine by ourselves
• Extract feature and feed to the machine then
apply algorithm to train it

17/07/2023 99
ML VS
DL

17/07/2023 100
DEEP LEARNING
•It’s a type of ML inspired by
human brain.
•In DL, the structure is called
artificial neural network.
•In DL, machine learns itself
using artificial neural
network that mimics
biological neural network.
17/07/2023 101
17/07/2023 102
CONVOLUTIONAL
NEURAL
NETWORK

17/07/2023 103
17/07/2023 104
CONVOLUTIONAL
NEURAL NETWORK (CNN)

• Image recognition
• Image
classification
• Object detection

17/07/2023 105
CONVOLUTION LAYER
• An image matrix (volume) of dimension (h x w x d)
• A filter (fh x fw x fd)
• Out put a volume dimension

17/07/2023 106
Image Filter Matrix Convolved
Matrix Feature

17/07/2023 107
STRIDE

17/07/2023 108
PADDING

•Pad the picture with zero-padding


so that it fits.
•Drop part where image did not if.
This called valid padding which
keep only valid part of image.

17/07/2023 109
SEPARABLE
CONVOLUTION
LAYER
• The spatial separable convolution is so
named because it deals primarily with
the spatial dimensions of an image
and kernel: the width and the height.
(The other dimension, the “depth”
dimension, is the number of channels of
each image).
I also use this
layer in my
project too

17/07/2023 110
17/07/2023 111

You might also like