Knowledge Representation in AI
Knowledge Representation in AI
Python Java JavaScript SQL C C++ HTML CSS React Node js Spring Boot C# PHP MySQL
Home › Artificial Intelligence › Knowledge Representation
Knowledge Representation in AI
10 Jun 2025 | 9 min read
Humans are best at understanding, reasoning, and interpreting knowledge. Human knows things, which is knowledge, and based on their
knowledge, they perform various actions in the real world. But how machines do all these things comes under knowledge representation and
reasoning. Hence, we can describe Knowledge representation as follows:
Knowledge representation and reasoning (KR, KRR) is the part of Artificial Intelligence which concerned with AI agents' thinking and how
thinking contributes to the intelligent behaviour of agents.
It is responsible for representing information about the real world so that a computer can understand and utilise this knowledge to solve
complex real-world problems, such as diagnosis a medical condition or communicating with humans in natural language.
It is also a way to describe how we can represent knowledge in artificial intelligence. Knowledge representation is not just storing data in a
database, but it also enables an intelligent machine to learn from that knowledge and experience so that it can behave intelligently like a
human.
What to Represent?
The following are the kind of knowledge that needs to be represented in AI systems:
Object: All the facts about objects in our world domain. E.g., Guitars contain strings, and trumpets are brass instruments.
Facts: Facts are the truths about the real world and what we represent.
Knowledge Base: The central component of the knowledge-based agents is the knowledge base. It is represented as KB. The
Knowledgebase is a group of Sentences (Here, sentences are used as a technical term and not identical with the English language).
Knowledge: Knowledge is awareness or familiarity gained by experiences of facts, data, and situations. The following are the types of
knowledge in artificial intelligence:
Types of Knowledge
The following are the various types of knowledge:
1. Declarative Knowledge
2. Procedural Knowledge
Procedural knowledge is a type of knowledge that is responsible for knowing how to do something.
3. Meta-Knowledge
4. Heuristic Knowledge
Heuristic knowledge is rules of thumb based on previous experiences and awareness of approaches, and it is good to work with but not
guaranteed.
5. Structural Knowledge
It describes relationships between various concepts such as kind of, part of, and grouping of something.
Let's suppose that you met a person who is speaking in a language that you don't know; then how would you be able to act on that? The same
thing applies to the intelligent behaviour of the agents.
As we can see in the diagram below, there is one decision-maker who acts by sensing the environment and using knowledge. But if the
knowledge part is not present, then it cannot display intelligent behaviour.
AI Knowledge Cycle
An Artificial intelligence system has the following components for displaying intelligent behaviour:
Perception
Learning
Planning
Execution
The above diagram shows how an AI system can interact with the real world and what components help it to show intelligence. An AI system
has a Perception component by which it retrieves information from its environment. It can be visual, audio, or another form of sensory input.
The learning component is responsible for learning from data captured by the Perception component.
In the complete cycle, the main components are knowledge representation and Reasoning. These two components are involved in showing the
intelligence of machine-like humans. These two components are independent of each other but also coupled together. The planning and
execution depend on the analysis of Knowledge representation and reasoning.
It is the simplest way of storing facts, which uses the relational method, and each fact about a set of objects is set out systematically in
columns.
This approach of knowledge representation is famous in database systems, where the relationship between different entities is
represented.
Example:
Player1 65 23
Player2 58 18
Player3 75 24
2. Inheritable Knowledge
In the inheritable knowledge approach, all data must be stored in a hierarchy of classes.
This approach contains inheritable knowledge, which shows a relation between instance and class, and it is called the instance relation.
Every individual frame can represent the collection of attributes and their value.
Example:
3. Inferential Knowledge
The inferential knowledge approach represents knowledge in the form of formal logic.
It guaranteed correctness.
Example:
a. Marcus is a man
b. All men are mortal
man(Marcus)
∀x = man (x) ----------> mortal (x)s
4. Procedural Knowledge
The procedural knowledge approach uses small programs and codes that describe how to do specific things and how to proceed.
In this approach, one important rule is used, which is the If-Then rule.
With this knowledge, we can use various coding languages such as LISP and Prologue.
However, it is not necessary that we can represent all cases in this approach.
1. Representational Accuracy: The KR system should have the ability to represent all kinds of required knowledge.
2. Inferential Adequacy: The KR system should have the ability to manipulate the representational structures to produce new knowledge
corresponding to the existing structure.
3. Inferential Efficiency: The ability to direct the inferential knowledge mechanism in the most productive directions by storing appropriate
guides.
4. Acquisitional efficiency: The ability to acquire new knowledge easily using automatic methods.
Ambiguity: In other words, language, symbols, concepts, and other sorts of signifiers can be given more than one meaning, depending
on the context. In this case, the word can be any of a financial institution or the side of a river as a bank.
Uncertainty: But, unsurprisingly, incomplete, imprecise, or contradictory information is the fact of the matter. For example, the
prediction of stock market trends is uncertainty of economic data, geopolitical factors, as well as human behavior.
They are commonly used to represent and infer under uncertainty with systems that are based on making reasoned guesses using what is
known as Bayesian networks and probabilistic graphical models.
Scalability of Representation
Volume of Knowledge: For example, there are plenty of high-dimensional domains involving lots of data to be managed by AI systems,
which need to be made available in a timely fashion for use in answering questions (e.g., healthcare or autonomous vehicles).
As we store and retrieve knowledge at a large scale, we can do that using knowledge graphs and distributed storage systems, such as Neo4j,
due to which knowledge can be stored and retrieved efficiently.
Complexity of Interrelations: As the knowledge increases, but prior to a point at which computational efficiency is reached, the number
of relationships between entities increases.
Clustering, as well as hierarchical representations and modular ontologies, can reduce the complexity in terms of complex relationships without
destroying the complexity.
When you are to be rich and detailed, it is best to know and to get lots of knowledge, but that can be computationally inefficient. For example,
ontologies needed to explain such a complex legal framework would prevent the reasoning algorithm.
Approaching the problem, however, they balance the symbolic and the sub-symbolic by giving a problem with symbolist and sub-symbolic
representations at the same time. For example, it serves as a framework with which to combine logical frameworks with machine learning
models to have high expressiveness without inefficiency.
Efficiency:
Computation is very fast, at the expense of some details that may incur the loss of some information and may lead to suboptimal decisions or
reasoning errors. Heuristic-based mechanisms, optimisation algorithms, and, of course, caching mechanisms will facilitate the processing of
rich knowledge representations to be efficient.
This becomes the pressing need for the integration of new knowledge without disrupting the existing structure when the domain is changing
rapidly, such as weather forecasting or social media analysis. These systems can incrementally learn and online learn (to update their
knowledge base without the need to retrain from scratch).
Maintenance:
Such a huge knowledge base that's an ongoing process and incorporates many sources of data makes it difficult to be consistent and accurate.
Merging the healthcare databases from several hospitals would include redundant or conflicting information. The risk of quitting is mitigated
through regular audits, conflict resolution frameworks, and automatic tools for deduplicating and validating knowledge base quality.
Structured Problem Analysis: AI systems can use such frameworks as logical or logical systems and production rules to decompose
problems into parts that are easier to manage.
Decision Support Systems: Usually, knowledge graphs and ontologies are used in these systems to assess multiple scenarios, find the
best solution, and suggest recommendations.
Environmental Mapping: One, that robots use semantic networks to understand spatial relationships to enable pathfinding and
navigation, and two, that all commonly implemented application domains that involve navigation can be modelled in semantic networks.
Task Automation: Execution of tasks such as assembling components, cleaning, or delivering goods is made more autonomous by
allowing the robot to represent procedural knowledge.
Human-Robot Collaboration: Ontologies allow robots to understand what humans are trying to say and what they intend to do,
resulting in natural human-robot interactions in shared spaces.
Autonomous Vehicles: Vehicles can make real-time decisions for safe navigation by being represented as road networks, traffic rules,
and environmental context words.
Clinical Decision Support Systems (CDSS): These systems play a role in helping to diagnose, suggest treatments, and predict patient
outcomes by representing medical knowledge in the form of ontologies and rules.
Drug Discovery: The ideal tool for identifying drug targets and studying disease mechanisms is the representation of molecular and
genetic data.
Predictive Maintenance: Through knowledge graphs, machines can self-diagnose and predict when a machine will fail, and it saves
downtime and cost.
Process Optimisation: Knowledge about production process workflows can be encoded into the system, which can then find and
suggest improvements.
Knowledge Graphs in Search Engines: Searching the web becomes easy when you represent web content as connected entities
(entities are the connected entities). For example, entering "Leonardo da Vinci" results in both web pages as well as facts about his life,
his works, and his period.
Content-Based Filtering: By considering the data attributes and modelling similar items, it can help users know their preferences and
recommend the preferable items.
Collaborative Filtering: Social and historical data about system users are represented as relationships and used to suggest items that
other similar users have liked.
← prev next →
Related Posts
Search...
Python Java JavaScript SQL C C++ HTML CSS React Node js Spring Boot C# PHP MySQL
Home › Artificial Intelligence › Propositional Logic
Propositional logic is used by artificial intelligence to allow a computer to express propositions concerning a particular subject in formally
logical ways. It combines propositions (these are statements that must be either true or false) with logical connectives such as ∧, ∨ and ¬. Many
automated logic, knowledge representation and decision-making systems are based on this logic that can be provided.
Given the formal definition of the situations, the so-called facts, which are represented by the so-called propositions, propositional logic
provides for an organized approach to the reasoning about situations and, besides, makes the AI system able to conclude new facts based on
the available ones.
While less fully formed than predicate logic, due to the limited number of available expressions, first-order logic has a central place in making
intelligent agents. It defines a technique of knowledge representation in logical and mathematical form.
Atomic Propositions
Compound propositions
Atomic Proposition: Atomic propositions are simple propositions. It consists of a single proposition symbol. These are the sentences which
must be either true or false.
Example 1:
Compound proposition: Compound propositions are constructed by combining simpler or atomic propositions, using parenthesis and logical
connectives.
Example 2:
Logical Connectives
Logical connectives are used to connect two simpler propositions or represent a sentence logically. We can create compound propositions with
the help of logical connectives. There are mainly five connectives, which are given as follows:
Negation: A sentence such as ¬ P is called negation of P. A literal can be either Positive literal or negative literal.
P= Rohan is intelligent,
Q= Rohan is hardworking. → P∧ Q.
Disjunction: A sentence that has ∨ a connective, such as P ∨, is called disjunction, where P and Q are the propositions.
Example: "Ritika is a doctor or Engineer"
Implication: A sentence such as P → Q is called an implication. Implications are also known as if-then rules. It can be represented as
Truth Table
In propositional logic, we need to know the truth values of propositions in all possible scenarios. We can combine all the possible
combinations with logical connectives, and the representation of these combinations in a tabular format is called a Truth table. Following is the
truth table for all logical connectives:
Truth Table with Three Propositions
We can build a proposition composing three propositions: P, Q, and R. This truth table is made up of 8n Tuples as we have taken three
proposition symbols.
Precedence of connectives:
Just like arithmetic operators, there is a precedence order for propositional connectors or logical operators. This order should be followed
while evaluating a propositional problem. Following is the list of the precedence order for operators:
Precedence Operators
Logical Equivalence
Propositional logic is one of the features that have logical equivalence. The definition of logical equivalence is given by saying two propositions
are logically equivalent if and only if the columns of a truth table are the same.
Assuming two propositions, A and B, we'll mark it by A⇔B, and this is the logical equivalence. From the below truth table, we see that the
columns of ¬A∨ B and B→A are identical, so A is Equivalent to B.
Properties of Operators
Commutativity:
P∧ Q= Q ∧ P, or
P ∨ Q = Q ∨ P.
Associativity:
(P ∧ Q) ∧ R= P ∧ (Q ∧ R),
(P ∨ Q) ∨ R= P ∨ (Q ∨ R)
Identity element:
P ∧ True = P,
P ∨ True= True.
Distributive:
P∧ (Q ∨ R) = (P ∧ Q) ∨ (P ∧ R).
P ∨ (Q ∧ R) = (P ∨ Q) ∧ (P ∨ R).
DE Morgan's Law:
¬ (P ∧ Q) = (¬P) ∨ (¬Q)
¬ (P ∨ Q) = (¬ P) ∧ (¬Q).
Double-negation elimination:
¬ (¬P) = P.
Problem Solving and Planning: This serves the purpose of allowing AI planners to solve problems and create action sequences given
particular goals. For instance, the STRIPS planning system assists propositional logic in the following aspects: it is used in representing
preconditions and effects of actions.
Decision Making: If applied properly, it assists in considering top choices and selecting the best approach to be used. Ername logical
rules for decision criteria or even truth tables can be implemented in order to evaluate the performance of various choices.
Natural Language Processing (NLP): However, this is also used in NLP applications such as semantic parsing, which involves turning
natural language sentences into logical forms. This assists in the meaning post-processing of a sentence and enables one to give reasons
for the meaning of a given sentence.
In propositional logic, we use symbolic variables to represent the logic, and we can use any symbol to represent a proposition, such as A,
B, C, P, Q, R, etc.
A proposition formula that is always true is called tautology, and it is also called a valid sentence.
A proposition formula which has both true and false values is called.
Statements that are questions, commands, or opinions, such as "Where is Rohini?", "How are you?" and "What is your name?" are not
propositions.
Limitations of Propositional Logic
Although it has numerous advantages, it also has some drawbacks, and they are as follows:
Lack of Expressiveness: It cannot differentiate scenarios such as 'All humans are mortal'.
Scalability: The Excel table goes up with the number of propositions as the number of rows as rows in the Excel table will increase.
Limited Inference: It only considers and works with true and false propositions and cannot handle the probabilities.
No Quantifiers: Unlike predicate logic, it does not cover the use of quantifiers for all symbols ∝ and their existing symbols ∃.
Inability to Handle Uncertainty: It cannot accommodate probabilities or partial truths to assist, which makes it deficient in uncertain
conditions.
Lack of Context Awareness: It removes the meaning or context of statements, which in turn reduces the ability to decipher complex
situations.
We cannot represent relations like ALL, some, or none with propositional logic.
Conclusion
Therefore, propositional logic can be seen as providing essential premises for further improvements in the logical thinking of artificial
intelligence. It allows logical relationships to be encoded and represented in such a way that provides a common interface for AI systems to
manipulate data and think about it. Even though it is not as explanatory as FOL, PL remains actively employed in rule-based programs,
problem-solving paradigms, and planning strategies.
This is particularly important to move on to higher forms of logic, including predicate and probabilistic calculus. In conclusion, it will be pointed
out that propositional logic still plays a significant role in the development and work of modern intelligent systems.
← prev next →
Related Posts
Unification in FOL
What is Unification? Unification, which involves the common solving of forms of quantitative expressions with variables
(''unification of forms''), is a central process in AI and symbolic reasoning. In simple words, it is used to make various
expressions or terms equivalent or equated by assigning values...
7 min read
6 min read
5 min read
First-order logic
First-Order Logic in Artificial Intelligence In the topic of Propositional logic, we have seen how to represent statements using
propositional logic. Unfortunately, in propositional logic, we can only represent the facts, which are either true or false. PL is
not sufficient to describe complex sentences or...
8 min read
7 min read
Reasoning in AI
Reasoning in Artificial intelligence Reasoning is that particular process in the field of AI that nourishes the machine to think
rationally as a human and perform manipulations as a human. Reasoning is the process of logically concluding and
predicting outcomes that flow from given knowledge, facts,...
9 min read
9 min read
14 min read
Resolution in FOL
(First Order Logic) Resolution in First-Order Logic (FOL) is a basic rule of inference applied in automated reasoning and logic
programming. It generalizes resolution principles from the propositional to the quantifier and predicate case. The approach
substitutes literals on clauses in the Conjunctive Normal Form...
7 min read
Contact info
hr@[Link]
+91-9599086977
Follow us
Tutorials
Java
Data Structures
C Programming
C++ Tutorial
C# Tutorial
PHP Tutorial
HTML Tutorial
JavaScript Tutorial
jQuery Tutorial
Spring Tutorial
Interview Questions
Microsoft
Amazon
Adobe
Intuit
Accenture
Cognizant
Capgemini
Wipro
Tcs
Infosys
Online Compiler
C
R
C++
Php
Java
Html
Swift
Python
JavaScript
TypeScript
In the topic of Propositional logic, we have seen how to represent statements using propositional logic. Unfortunately, in propositional logic,
we can only represent the facts, which are either true or false. PL is not sufficient to describe complex sentences or natural language
statements. The propositional logic has very limited expressive power. Consider the following sentence, which we cannot represent using PL
logic.
To represent the above statements, PL logic is not sufficient, so we require some more powerful logic, such as first-order logic.
First-Order logic
First-order logic is another way of knowledge representation in artificial intelligence. It is an extension of propositional logic. FOL is sufficiently
expressive to represent the natural language statements concisely.
It is also known as predicate logic or first-order predicate logic. First-order logic is a powerful language that develops information about
objects in an easier way and can also express the relationship between those objects.
First-order logic (like natural language) not only assumes that the world contains facts like propositional logic but also assumes the following
things in the world:
Objects: A, B, people, numbers, colours, wars, theories, squares, pits, wumpus, ......
Relations: It can be a unary relation, such as red, round, is adjacent, or n-any relation, such as the sister of, brother of, has colour, comes
between
Function: Father of, best friend, third inning of, end of, ......
1. Syntax
2. Semantics
Variables x, y, z, a, b,...
Connectives ∧, ∨, ¬, ⇒, ⇔
Equality ==
Quantifier ∀, ∃
Atomic Sentences
Atomic sentences are the most basic sentences of first-order logic. These sentences are formed from a predicate symbol followed by a
parenthesis with a sequence of terms. We can represent atomic sentences as Predicate (term1, term2, ......, term n).
Example
Complex Sentences
Complex sentences are made by combining atomic sentences using connectives.
Predicate: A predicate can be defined as a relation that binds two atoms together in a statement.
Consider the statement: "x is an integer." It consists of two parts: the first part, x, is the subject of the statement, and the second part, "is an
integer," is known as a predicate.
A quantifier is a language element that generates quantification, and quantification specifies the quantity of specimens in the universe of
discourse. These are the symbols that permit the determination or identification of the range and scope of the variable in the logical
expression. There are two types of quantifiers:
Universal Quantifier
The universal quantifier is a symbol of logical representation, which specifies that the statement within its range is true for everything or every
instance of a particular thing.
For all x
For each x
For every x
Example
Let a variable x, which refers to a cat, so all x can be represented in UOD as below:
Python Java JavaScript SQL C C++ HTML CSS React Node js Spring Boot C# PHP MySQL
It will be read as: There are all x, where x is a man who drinks coffee.
Existential Quantifier
Existential quantifiers are a type of quantifiers that express that the statement within its scope is true for at least one instance of something.
It is denoted by the logical operator ∃, which resembles an inverted E. When it is used with a predicate variable, it is called an existential
quantifier.
Note: In the Existential quantifier, we always use AND or the Conjunction symbol (∧).
If x is a variable, then the existential quantifier will be ∃x or ∃(x). And it will be read as:
Example:
It will be read as: There are some x where x is a boy who is intelligent.
Points to Remember:
Properties of Quantifiers:
Example:
And since there are all birds who fly, it will be represented as follows:
∀x bird(x) →fly(x)
In this question, the predicate is "respect(x, y)," where x=man, and y= parent.
Since there is every man so will use ∀, and it will be represented as follows:
In this question, the predicate is "play(x, y)," where x= boys, and y= game. Since there are some boys we will use ∃, and it will be represented
as:
∃x boys(x) → play(x, cricket)
In this question, the predicate is "like(x, y)," where x= student, and y= subject.
Since there are not all students, we will use ∀ negation, so the following representation for:
In this question, the predicate is "failed(x, y)," where x= student, and y= subject.
Since there is only one student who failed in Mathematics, we will use the following representation for this:
∃(x) [ student(x) → failed (x, Mathematics) ∧∀ (y) [¬(x==y) ∧ student(y) → ¬failed (x, Mathematics)]
Free Variable:
A variable is said to be a free variable in a formula if it occurs outside the scope of the quantifier.
Example
Bound Variable:
A variable is said to be a bound variable in a formula if it occurs within the scope of the quantifier.
Example
∀x [A (x) B( y)]
For a simple, clear, logical, structured representation of real-world knowledge, FOL is a robust framework. It can encode facts, relationships,
and rules about facts about entities that are about such a domain.
Example:
Reasoning:
It allows for deriving conclusions from known facts and rules. For instance, if we have Parent(John, Mary) and the rule above, then the system
will be able to infer that Ancestor(John, Mary).
Use Case:
Creating systems that could make intelligent decisions themselves ¬- in other words, diagnostic systems in medicine or fraud detection in
finance, for example.
FOL formalises the constructs of natural language into logical representations and hence helps in understanding and processing natural
language.
Example:
Applications:
Semantic parsing: Deriving logic that a machine can understand from natural language.
Question answering systems: Matching questions with knowledge base facts using FOL.
Use Case:
One good example of a couple of people deploying such types of reasoning is Virtual Assistants like Siri and Google Assistant, which reason
from user queries through the principles of FOL.
FOL is used to underpin ontologies and rules to the effect that the relationship between web entities is specified.
Example:
In turn, FOL creates structured, machine-readable web content by means of (especially) RDF (Resource Description Framework) and OWL (Web
Ontology Language) ontologies.
Applications:
Intelligent search engines: Understanding relationships of concepts, which will affect search.
Use Case:
Though the knowledge graph setting of Google, or the linked open data effort, is the most prominent application, FOL is being used for
meaningful information retrieval.
Expert Systems
Role in AI: Knowledge in some particular domain is represented in an FOL, and then solutions for problems are inferred through logical
reasoning in the FOL.
Reasoning: If we know fact Symptom(John, Fever) and Symptom(John, Cough), the system infers Diagnosis(John, Flu).
Applications:
Use Case:
The use of FOL was known in MYCIN, a famous early expert system used for the diagnosis of bacterial infections.
Given: P(a)
Applications:
Use Case: For example, Coq and Prover9 use FOL to generate automated proofs.
We cannot create effective tests in FOL to find out whether a given statement is true in all models or not. It can be stated that there
doesn't exist an algorithm in general that might work out the truth or falsity of every first-order statement.
For example, a logical problem in FOL that has some structure so that the reasoning cycle leads to an infinite loop will require infinite
time/resources to solve.
Computational Complexity:
In some cases in which it's possible to find a solution, the time required to solve the problem may grow exponentially worse than the size
of the problem.
With an increasingly complex domain, the cost of the task with respect to both time and memory grows.
However, temporal reasoning necessitates, for example, temporal logic or higher-order logic.
Continuous Domains:
Many real-world problems deal with continuous variables (e.g., physics-based systems and machine learning models). The real-world domains
in which these problems live are constant; FOL, as is, simply does not work well there.
FOL can be difficult (or impossible) to describe the composition of complex relationships with self-references or nested conditions. For
example, the sentence 'this statement is false' is a logical paradox.
On the other hand, FOL is a deterministic world wherein if you can prove something that just isn't the case true, then it is true; vice versa, it is
also false. Unfortunately, this binary approach cannot be applied to all aspects of uncertainty since many AI applications easily show a lack of
ambiguity and partial truth.
For example, in medical diagnosis, each symptom gives rise to several potential diseases, each with differing probabilities - a structure that's
too complex for FOL to represent without extra mechanisms.
Crucial probabilistic reasoning, machine learning, decision-making under uncertainty, etc, depend on it. Unfortunately, FOL doesn't handle
concepts like probability natively.
For example, in natural language processing or social systems, information is either incomplete or uncertain in multiple domains. Yet FOL is
unsuitable when information is partial, fuzzy, or interpretation-dependent.
← prev next →
Related Posts
8 min read
Rules of Inference
in Artificial intelligence Inference: In artificial intelligence, we need intelligent computers which can create new logic from old
logic or by evidence, so generating the conclusions from evidence and facts is termed as Inference. Inference rules: Inference
rules are the templates for generating valid arguments. Inference rules...
3 min read
Resolution in FOL
(First Order Logic) Resolution in First-Order Logic (FOL) is a basic rule of inference applied in automated reasoning and logic
programming. It generalizes resolution principles from the propositional to the quantifier and predicate case. The approach
substitutes literals on clauses in the Conjunctive Normal Form...
7 min read
7 min read
9 min read
Knowledge Representation
in AI Humans are best at understanding, reasoning, and interpreting knowledge. Human knows things, which is knowledge,
and based on their knowledge, they perform various actions in the real world. But how machines do all these things comes
under knowledge representation and reasoning. Hence, we...
8 min read
Reasoning in AI
Reasoning in Artificial intelligence Reasoning is that particular process in the field of AI that nourishes the machine to think
rationally as a human and perform manipulations as a human. Reasoning is the process of logically concluding and
predicting outcomes that flow from given knowledge, facts,...
9 min read
14 min read
6 min read
Contact info
hr@[Link]
+91-9599086977
Follow us
Tutorials
Java
Data Structures
C Programming
C++ Tutorial
C# Tutorial
PHP Tutorial
HTML Tutorial
JavaScript Tutorial
jQuery Tutorial
Spring Tutorial
Interview Questions
Microsoft
Amazon
Adobe
Intuit
Accenture
Cognizant
Capgemini
Wipro
Tcs
Infosys
Online Compiler
C
R
C++
Php
Java
Html
Swift
Python
JavaScript
TypeScript
Python Java JavaScript SQL C C++ HTML CSS React Node js Spring Boot C# PHP MySQL
Home › Artificial Intelligence › Knowledge Representation Techniques
Artificial intelligence refers to the process of experiencing intelligence through machines to execute specific functions such as perceiving,
understanding, deciding, and deciding. However, this becomes a challenge when it comes to accomplishing this goal because machines need
human knowledge to accomplish such tasks. Knowledge representation, which can be defined as the ways and methods that enable the
storage and understanding of human knowledge by machines, falls under AI.
There is clearly a significant task with regard to knowledge representation in the context of making it understandable by machines for
subsequent use in reasoning and problem-solving. To meet this challenge, several techniques of representing knowledge in artificial
intelligence have been formulated, including the rule-based system, semantic network, frame knowledge representation, ontology, and logic-
based knowledge representation.
They help organize the information in a manner that such knowledge can be processed and used for the application of varying levels of
inference or reasoning.
This makes AI useful in practice in the sense that many intelligent systems are designed using the techniques of knowledge representation in
order to reason, understand language, find patterns, learn, and make decisions. For instance, the KRS can be of help in constructing an
application that would enable the user to ask questions related to a specific area of interest or create a recommender system to be used to
recommend items of interest to the user.
Objects
It is a nominal variable defined as things in the external environment that can be viewed in terms of their characteristics or can be GET IT
tangible and inert. Some of the objects will be cars, buildings, and people. Various techniques, such as object-oriented programming
techniques, represent knowledge in AI.
Events
In wider terms, they refer to activities that occur in the world or actions that happen in the world. Some of the things that are associated with
events include driving a car, preparing a meal or going to a concert. Event-based systems are used to represent knowledge in AI, and the use
of events does this.
Performance
Performance can also be defined as the manner in which agents or systems act in terms of executing tasks. It consists of the purpose and aims
of the task as well as the measures that will be employed to assess productivity. These systems rely on performance as the basis of knowledge
in AI.
Facts
Facts mean statements that can either be true or false statements. It is common knowledge that a preposition is a part of speech that involves
an adverbial modification of a verb, and it can be confirmed using a fact or as an argument from the conclusion. Some examples of facts
include "the sky is blue", "the earth orbits around the sun", and "water boils at 100 degrees Celsius". Invariably, facts are used to model
knowledge in AI knowledge-based systems.
Meta-Knowledge
Meta-knowledge refers to knowledge about knowledge. The first subtopic is the structure and organization of knowledge, which is more
detailed about the structuring of information and how knowledge institutions are arranged. The meta-knowledge is crucial to AI since it
facilitates the evaluation of the quality of knowledge for adequate reasoning to be applied.
Knowledge-Base
A knowledge base is also referred to as 'artificial knowledge' and can be described as a pool of information in a format that can be accessed
and utilized by machines. It is the information that is embedded within an entity and is pertinent to a specific subject area of activity. One of
the most used knowledge representations in AI is the use of a knowledge base to represent knowledge in KBS.
Logical Representation
Frame Representation
Production Rules
Logical Representation
Logical representation is a language with some concrete rules which deal with propositions and have 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 support sound inference. Each sentence can be translated into logic using syntax
and semantics.
Syntax:
Syntaxes are the rules that decide how we can construct legal sentences in logic.
Semantics:
Semantics are the rules by which we can interpret the sentence in the logic.
Semantics also involves assigning a meaning to each sentence.
Propositional Logics
Predicate logics
Logical representations have some restrictions and are challenging to work with.
Logical representation techniques may not be very natural, and inference may not be so efficient.
Example:
The following are some statements that we need to represent in the form of nodes and arcs.
Statements:
1. Jerry is a cat.
2. Jerry is a mammal
3. Jerry is owned by Priya.
4. Jerry is brown-coloured.
5. All Mammals are animals.
In the above diagram, we have represented the different types of knowledge in the form of nodes and arcs. Each object is connected with
another object by some relation.
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.
Frame Representation
A frame is a record-like structure that consists of a collection of attributes and its values to describe an entity in the world. Frames are the AI
data structure that divides knowledge into substructures by representing stereotypical situations. It consists of a collection of slots and slot
values. These slots may be of any type and size. Slots have names and values called facets.
Facets: The various aspects of a slot are known as Facets. Facets are features of frames that 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.
Frames are derived from semantic networks and later evolved into our modern-day classes and objects. A single frame is not very useful. The
frames system consists of a collection of frames that 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 that is widely used in various applications, including Natural language processing
and machine visions.
Example: 1
Slots Filters
Year 1996
Page 1152
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 the city of London, and the
country is England. So, the following is the frame representation for this:
Slots Filter
Name Peter
Profession Doctor
Age 25
Weight 78
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.
Production Rules
Production rules system consists of (condition, action) pairs, which means, "If condition then action". It has mainly three parts:
Working Memory
The recognize-act-cycle
In production rules, the agent checks for the condition, and if the condition exists, then the production rule fires and a corresponding action is
carried out. The condition part of the rule determines which rule may be applied to a problem. The action part carries out the associated
problem-solving steps. This complete process is called a recognize-act cycle.
The working memory contains the description of the current state of problem-solving and rules that can write knowledge to the working
memory. This knowledge matches and may fire other regulations.
If a new situation (state) is generated, then multiple production rules will be fired together; this is called a conflict set. In this situation, the
agent needs to select a rule from these sets, and it is called a conflict resolution.
Example:
IF (at bus stop AND bus arrives) THEN action (get into the bus)
IF (on the bus AND paid AND empty seat) THEN action (sit down).
IF (bus arrives at destination) THEN action (get down from the bus).
The production rule system does not exhibit any learning capabilities, as it does not store the result of the problem for future use.
During the execution of the program, many rules may be active; hence, rule-based production systems are inefficient.
Conclusion
Knowledge representation plays an important role in various intelligent systems where the data has to be stored, processed, and acted upon
desirably. Resources like Semantic Networks, Sframes, Rules, and Ontology are other approaches that are used to point toward systematic
representation of real-world knowledge. Every one of them has its specific pros and depends on the domain and the degree of the task's
complexity. However, rule-based systems are more suitable for logical rather than semantic reasoning and data exchange.
Therefore, ontologies are complementary to rule-based systems. Finally, deciding on an adequate representation scheme is crucial to
developing useful, explainable, and provably correct and efficient designs of AI systems. With the development of artificial intelligence,
integration of various methods or a combination of advanced approaches is preferred to manage multiple and fluctuating knowledge
efficiently.
← prev next →
Related Posts
6 min read
Knowledge Representation
in AI Humans are best at understanding, reasoning, and interpreting knowledge. Human knows things, which is knowledge,
and based on their knowledge, they perform various actions in the real world. But how machines do all these things comes
under knowledge representation and reasoning. Hence, we...
8 min read
Propositional Logic
in Artificial Intelligence Propositional logic is used by artificial intelligence to allow a computer to express propositions
concerning a particular subject in formally logical ways. It combines propositions (these are statements that must be either
true or false) with logical connectives such as ∧, ∨...
6 min read
Python Java JavaScript SQL C C++ HTML CSS React Node js Spring Boot C# PHP MySQL
Home › Artificial Intelligence › Forward Chaining and backward chaining
In artificial intelligence, forward and backward chaining is one of the important topics, but before understanding forward and backward
chaining, let's first understand where these two terms came from.
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. The inference engine commonly proceeds in
two modes, which are:
1. Forward Chaining
2. Backward Chaining
Definite Clause: A clause that is a disjunction of literals with exactly one positive literal is known as a definite clause or strict horn clause.
Horn clause: A clause that is a disjunction of literals with at most one positive literal is known as a horn clause. Hence, all the definite
clauses are horn clauses.
Example
(¬ p V ¬ q V k)
It is equivalent to p ∧ q → k.
1. 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 that starts 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 adds their conclusion to the
known facts. This process repeats until the problem is solved.
Properties of Forward-Chaining
It is a process of making a conclusion based on known facts or data by starting from the initial state and reaching the goal state.
The forward-chaining approach is also called data-driven, as we reach the goal using available data.
The forward-chaining approach is commonly used in expert systems, such as CLIPS, business, and production rule systems.
Consider the following famous example, which we will use in both approaches:
Example:
"As per the law, it is a crime for an American to sell weapons to hostile nations. Country A, an enemy of America, has some missiles, and all the
missiles were sold to it by Robert, who is an American citizen."
To solve the above problem, first, we will convert all the above facts into first-order definite clauses, and then we will use a forward-chaining
algorithm to reach the goal.
Country A has some missiles. ?p Owns(A, p) ∧ Missile(p). It can be written in two definite clauses by using Existential Instantiation, introducing a
new Constant T1.
Robert is American
American(Robert). ..........(8)
In the first step, we will start with the known facts and will choose the sentences that do not have implications, such as American(Robert),
Enemy(A, America), Owns(A, T1), and Missile(T1). All these facts will be represented below.
Step-2:
In the second step, we will see those facts that can be inferred from available facts and with satisfied premises.
Rule-(1) does not satisfy the premises, so it will not be added in the first iteration.
Rule-(4) satisfies with the substitution {p/T1}, so Sells (Robert, T1, A) is added, which infers from the conjunction of Rule (2) and (3).
Rule-(6) is satisfied with the substitution(p/A), so Hostile(A) is added, which infers from Rule-(7).
Step-3:
In step 3, we can check Rule-(1) is satisfied with the substitution {p/Robert, q/T1, r/A}, so we can add Criminal(Robert), which infers all the
available facts. Hence, we reached our goal statement.
Hence, it is proved that Robert is a Criminal using the forward chaining approach.
Example:
In medical diagnosis systems, forward chaining is used to determine a patient's symptoms against a knowledge base of diseases and
symptoms. From the provided facts (for example, "Patient has a fever and rash"), the system links the input facts to probable diagnoses by
means of rules.
Other Uses:
Forward chaining is commonly used in decision-making for expert systems in industries such as chemical process control, financial analysis,
and troubleshooting technical systems.
Real-World Applications
Diagnosis Systems: Forward chaining is traditionally applied in diagnostic tools related to a variety of domains:
Healthcare: Systems such as MYCIN, for example, use forward chaining, making a list of possible infections and treatment possibilities.
Automotive: The diagnostic tools used in vehicles make use of forward chaining to detect such problems as engine faults from the data
in sensors.
Configuration Problems: To mechanize the configuration of intricate systems, forward chaining is used, for example:
Network Configuration: It helps to establish ideal routes and interfaces in large-scale IT networks.
Data-Driven Approach: In forward chaining starts from known data and proceeds with the use of inference rules to derive all possible
conclusions.
Real-Time Processing: The approach is outstanding in places that demand prompt decision-making, such as control and monitoring
systems.
Ease of Automation: The rule-based nature of forward chaining makes it easier to automate in areas such as diagnostics, where
predictable modes of decision arise.
Scalability: It can manage large rule bases and datasets as long as the system is properly optimized.
Rule Explosion: In intricate systems, however, the proliferation of the number of rules has been known to increase exponentially, and as
such, it presents a challenge in terms of keeping up with the rule base.
Efficiency Issues: Forward chaining can be inefficient in the sense that it may generate conclusions that have nothing to do with the
problem of interest, losing computational resources working on them.
Dependence on Complete Data: The method depends on having data that are both complete and accurate. Lack of or wrong facts may
result in incomplete or incorrect conclusions.
Maintenance Complexity: The expansion of new rules or modifications in regulations used in big systems can break the inference
process and cause inconsistencies.
Not Goal-Oriented: In contrast to backward chaining, forward chaining need not be goal-driven and, therefore, cannot be very efficient
when applied in targeted reasoning.
2. 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 that starts with the goal and works backward chaining through rules to find known facts that support
the goal.
In backward chaining, the goal is broken into sub-goals or sub-goals to prove the facts are 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 uses a depth-first search strategy for proof.
Example:
In backward-chaining, we will use the same above example and rewrite all the rules.
Backward-Chaining Proof:
In Backward chaining, we will start with our goal predicate, which is Criminal(Robert), and then infer further rules.
Step-1:
In the first step, we will take the goal fact. From the goal point, we will infer other facts, and at last, we will prove those facts true. So our goal
fact is "Robert is a Criminal," so the following is the predicate of it.
Step-2:
In the second step, we will infer other facts from the goal fact that satisfy the rules. So, as we can see in Rule-1, the goal predicate Criminal
(Robert) is present with substitution {Robert/P}. So, we will add all the conjunctive facts below the first level and will replace p with Robert.
Step-3:
In step 3, we will extract further fact Missile(q), which is inferred from Weapon(q), as it satisfies Rule-(5). Weapon (q) is also true with the
substitution of a constant T1 at q.
Step-4:
In step 4, we can infer facts Missile(T1) and Owns(A, T1) form Sells(Robert, T1, r), which satisfies Rule 4, with the substitution of A in place of r.
So, these two statements are proved here.
Step-5:
In step 5, we can infer the fact Enemy(A, America) from Hostile(A), which satisfies Rule 6. Hence, all the statements are proven true using
backward chaining.
Applications of Backward Chaining
Expert Systems for Diagnosis: Backward chaining is extensively applied in diagnostic expert systems, for example, medical diagnosis
tools. For example, if fever is the goal (i.e., symptom), the system will find the disease by tracing back with rules that link symptoms to
diagnoses.
Legal and Compliance Systems: In law and regulatory requirements, backward chaining is utilized in determining whether some action
or process meets the required legal requirements, starting from the applicable rules.
Troubleshooting Tools: Systems that utilize backward chaining to establish backward from observed problems to fundamental faults,
the source of technical issues, use such models.
Real-World Applications
Query Systems: The application of backward chaining is very widespread in database query systems and knowledge-based applications.
For instance, say if a user asks a system to look for certain information, backward chaining measures whether the data fits the criteria of
the query.
Planning and Scheduling: In planning systems, backward chaining determines the steps for which a given outcome should be taken.
Project Management Software: Figure out the prerequisite tasks for the milestones of a project.
AI-Driven Task Scheduling: Creation of a sequence of actions to perform complex tasks within such domains as robotics or logistics.
Rule-Based AI Systems: Backward chaining is often applied in intelligent systems, in activities that plan and route optimization for
delivery services, or in the creation of workflows in automated industrial environments.
Goal-Driven Strategy: When the final goal is well described, backward chaining does well. By attending only to rules and data required
for the desired outcome, it does not perform unwanted computations.
Efficient Use of Resources: As opposed to forward chaining, which exhausts the entire possibility set, backward chaining reduces the
search space to that which needs to be done to meet the goal.
Adaptability to Complex Rule Sets: Backward chaining is successful in addressing complex hierarchical rule-based systems and
decomposing goals into more manageable goals.
Weaknesses and Challenges
Dependence on Rule Completeness: Backward chaining puts great reliance on an exquisite and precise rule base. Lack of or incomplete
rules can result in erroneous judgments or incomplete judgments.
Computational Limitations with Multiple Goals: In multigoal systems with interdependent goals, backward chaining can be
computationally intensive. It must assess different possibilities that may lead to an increase in processing time.
Difficulty with Large Data Sets: The backward chain systems may also fail to trace back from extensive chains of logic when they are
used on large data sets or highly interconnected rules.
Incompatibility with Uncertain Data: Whereas probabilistic reasoning systems do not require precise data, as is the case with
backward chaining. It is less effective in those domains where information is ambiguous and incomplete, for example, the forecast of
future events.
← prev next →
Related Posts
Reasoning in AI
Reasoning in Artificial intelligence Reasoning is that particular process in the field of AI that nourishes the machine to think
rationally as a human and perform manipulations as a human. Reasoning is the process of logically concluding and
predicting outcomes that flow from given knowledge, facts,...
9 min read
8 min read
5 min read
Rules of Inference
in Artificial intelligence Inference: In artificial intelligence, we need intelligent computers which can create new logic from old
logic or by evidence, so generating the conclusions from evidence and facts is termed as Inference. Inference rules: Inference
rules are the templates for generating valid arguments. Inference rules...
3 min read
Search...
Python Java JavaScript SQL C C++ HTML CSS React Node js Spring Boot C# PHP MySQL
Home › Artificial Intelligence › Difference between Backward Chaining and Forward Chaining
Forward chaining, as the name suggests, starts from the known facts and moves forward by applying inference rules to extract more data, and
it continues until it reaches the goal, whereas backward chaining starts from the goal, moves backward by using inference rules to determine
the facts that satisfy the goal.
Forward chaining is called a data-driven inference technique, whereas backward chaining is called a goal-driven inference technique. It is also
known as the down-up approach, whereas backward chaining is known as a top-down approach.
It uses a breadth-first search strategy, whereas backward chaining uses a depth-first search strategy. Forward and backward chaining both
apply the Modus ponens inference rule. It can be used for tasks such as planning, design process monitoring, diagnosis, and classification,
whereas backward chaining can be used for classification and diagnosis tasks.
It can be like an exhaustive search, whereas backward chaining tries to avoid the unnecessary path of reasoning. In forward-chaining, there can
be various ASK questions from the knowledge base, whereas in backward-chaining, there can be fewer ASK questions.
Forward chaining is slow as it checks for all the rules, whereas backward chaining is fast as it checks only the required rules.
Backward Chaining: This strategy begins at a particular goal or hypothesis. The system is working backward using the rules or the facts
that are identified to prove or to achieve the goal of the client. The goal of backward chaining, for instance, is diagnosis in medical
practice, whereby if the aim is to diagnose a disease, then the doctors get into symptoms and analysis of a person's medical history to
confirm whether it fits with a disease.
Forward Chaining: That approach starts from "Given information or given conditions". It uses rules on the data to infer new data till a
conclusion is reached. For example, in sensor-based automation, forward chaining relies on sensor inputs to activate corresponding
actions or systems, such that if there is smoke from a fire sensor, it will trigger an alarm.
Backward Chaining: The flow of execution is Deductive. The system is contrary to this; it begins from the goal back to the data or facts
and observes whether there is substantial evidence to justify the goal. Every rule is considered only if it is applicable to the goal.
Forward Chaining: The flow is progressive and step-by-step forwarding. Iterative application of rules on the preexisting dataset led to
various new facts until there was no further inference possible or a desired result was obtained. This ensures hunting for options.
Backward Chaining: It is practical when only a moderate number of potential goals are possible and when accurate hypotheses are
being tested. A targeted approach reduces unnecessary computation and relies only on rules that are applicable to their goal.
Forward Chaining: It is excellent for situations where a lot of raw data needs to be filtered through before patterns can be found or
conclusions arrived at. However, it might be somewhat more computationally demanding since it considers all possible rules at each
step, so it works poorly for goal-directed activities.
Forward Chaining: Suitable for data-informed systems, e.g., monitoring systems, sensor networks, and real-time decision-making
applications. These systems use the incoming data as the source, and as it continues to be updated, the source determines its
conclusions or actions.
Medical Diagnosis (Backward Chaining): The idea of a specific disease is the beginning of a healthcare system that is based on the
patient's symptoms. It examines this hypothesis by establishing that there are similar features of the suspected disease, for instance, the
outcome of the test.
Sensor-Based Automation (Forward Chaining): In the case of the smart home system, sensors sense changes in the outdoor
environment (temperature/motion), and responses are initiated (AC switched on/security alert) based on rules that are forward-chained.
Imagine a system for medical diagnostics responsible for the diagnosis of pneumonia. The system starts from the aim (diagnosis of
pneumonia) and goes backward the way of the rules:
Rule 1: Pneumonia is suspected when there is a high fever, chest pain, and a level of dyspnea.
Rule 3: Chest pain is diagnosed when conflicting patient complaints are reconciled with physical examination findings.
The patient suffers from chest pain, and even clinical signs back this up.
Difficulty breathing is read from oxygen saturation level and lung sounds.
Upon confirmation of all conditions, the system will diagnose that it is probably pneumonia, providing a diagnosis path.
In a home environment, intelligent, forward chaining can automate the range of operations based on the value of the environment in question:
Rules:
If the room is occupied and the light is poor, switch on the lights.
Turn off all lights and appliances when not occupied after 10 minutes.
Process: First, the system takes the data from the sensors and applies the rules one by one.
Outcome:
When it happens that the room is too hot, the AC switches on.
Energy conservation is realised when idle devices are switched off in any idle room spaces.
This demonstrates how ingrained a data-driven approach is in forward chaining as the system constantly determines inputs to make decisions
and enhance the user experience, respectively.
1. Forward chaining starts from known facts Backward chaining starts from the goal
and applies inference rules to extract and works backward through inference
more data unit it reaches the goal. rules to find the required facts that
support the goal.
5. Forward chaining tests for all the Backward chaining only tests for a few
available rules required rules.
← prev next →
Related Posts
Knowledge Representation
in AI Humans are best at understanding, reasoning, and interpreting knowledge. Human knows things, which is knowledge,
and based on their knowledge, they perform various actions in the real world. But how machines do all these things comes
under knowledge representation and reasoning. Hence, we...
8 min read
Propositional Logic
in Artificial Intelligence Propositional logic is used by artificial intelligence to allow a computer to express propositions
concerning a particular subject in formally logical ways. It combines propositions (these are statements that must be either
true or false) with logical connectives such as ∧, ∨...
6 min read
4 min read
Reasoning in AI
Reasoning in Artificial intelligence Reasoning is that particular process in the field of AI that nourishes the machine to think
rationally as a human and perform manipulations as a human. Reasoning is the process of logically concluding and
predicting outcomes that flow from given knowledge, facts,...
9 min read
8 min read
Unification in FOL
What is Unification? Unification, which involves the common solving of forms of quantitative expressions with variables
(''unification of forms''), is a central process in AI and symbolic reasoning. In simple words, it is used to make various
expressions or terms equivalent or equated by assigning values...
7 min read
8 min read
Resolution in FOL
(First Order Logic) Resolution in First-Order Logic (FOL) is a basic rule of inference applied in automated reasoning and logic
programming. It generalizes resolution principles from the propositional to the quantifier and predicate case. The approach
substitutes literals on clauses in the Conjunctive Normal Form...
7 min read
9 min read
Rules of Inference
in Artificial intelligence Inference: In artificial intelligence, we need intelligent computers which can create new logic from old
logic or by evidence, so generating the conclusions from evidence and facts is termed as Inference. Inference rules: Inference
rules are the templates for generating valid arguments. Inference rules...
3 min read
Contact info
hr@[Link]
+91-9599086977
Follow us
Tutorials
Java
Data Structures
C Programming
C++ Tutorial
C# Tutorial
PHP Tutorial
HTML Tutorial
JavaScript Tutorial
jQuery Tutorial
Spring Tutorial
Interview Questions
Microsoft
Amazon
Adobe
Intuit
Accenture
Cognizant
Capgemini
Wipro
Tcs
Infosys
Online Compiler
C
R
C++
Php
Java
Html
Swift
Python
JavaScript
TypeScript
Python Java JavaScript SQL C C++ HTML CSS React Node js Spring Boot C# PHP MySQL
Home › Artificial Intelligence › Probabilistic Reasoning in AI
Till now, we have learned knowledge representation using first-order logic and propositional logic with certainty, which means we were sure
about the predicates. With this knowledge representation, we might write A→B, which means if A is true, then B is true, but consider a situation
where we are not sure about whether A is true or not, then we cannot express this statement; this situation is called uncertainty.
So, to represent uncertain knowledge, where we are not sure about the predicates, we need uncertain reasoning or probabilistic reasoning.
Causes of Uncertainty
The following are some leading causes of uncertainty to occur in the real world.
Experimental Errors
Equipment fault
Temperature variation
Climate change
We use probability in probabilistic reasoning because it provides a way to handle the uncertainty that is the result of someone's laziness and
ignorance.
In the real world, there are lots of scenarios where the certainty of something is not confirmed, such as "It will rain today," "the behavior of
someone in some situations," or "A match between two teams or two players." These are probable sentences for which we can assume that it
will happen, but we are not sure about it, so here we use probabilistic reasoning.
In probabilistic reasoning, there are two ways to solve problems with uncertain knowledge:
Bayes' rule
Bayesian Statistics
As probabilistic reasoning uses probability and related terms, before understanding probabilistic reasoning, let's know some common terms:
Probability: Probability can be defined as the chance that an uncertain event will occur. It is the numerical measure of the likelihood that an
event will occur. The value of probability always remains between 0 and 1, which represents ideal uncertainties.
We can find the probability of an uncertain event by using the following formula.
P(¬A) + P(A) = 1.
Sample Space: The collection of all possible events is called the sample space.
Random Variables: Random variables are used to represent the events and objects in the real world.
Prior Probability: The prior probability of an event is the probability computed before observing new information.
Posterior Probability: The probability that is calculated after all evidence or information has been considered. It is a combination of
prior probability and new information.
Conditional probability:
Conditional probability is the probability of an event occurring when another event has already happened.
Let's suppose we want to calculate event A when event B has already occurred, "the probability of A under the conditions of B" can be written
as:
Where,
If the probability of A is given and we need to find the probability of B, then it will be given as:
It can be explained by using the below Venn diagram, where B is the occurrence of an event, so the sample space will be reduced to set B, and
now we can only calculate event A when event B has already occurred by dividing the probability of P(A⋀B) by P( B ).
Example:
In a class, there are 70% of the students like English and 40% of the students like English and mathematics. What is the percentage of students
who like English and also like mathematics?
Solution:
Probabilistic Models in AI
In the essence of artificial intelligence, the probabilistic models can help the efficient administration of uncertainty and can assist in depicting
complex relations between variables.
Bayesian Networks
Belief networks, Bayesian Networks, are a more common name and show probabilistic dependencies among variables in the form of a
graphical structure. They are composed of:
Nodes: Every node in the Bayesian network is equivalent to a random variable, which could be another variable or continuous.
Edges: Edges going from one node to another represent that a variable at the starting node affects the conditional probability of the
variable at the end node.
Conditional Probability Tables (CPTs): Each node contains a CPT that indicates the degree of dependence of the node in relation to the
variables presented by its parent nodes.
For illustration, in a medical diagnosis network, an individual variable, such as "Fever", might depend on "Infection", denoted by arrows
between the nodes and a CPT, special probability values.
Markov Models
Markov Chains
It is a probabilistic model used in modelling systems that evolve via state changes. Key characteristics include:
Memoryless Property: The following state is dependent on the present state and not the one before it.
State Transition Matrix: Shows opportunities for changing from one state to another.
A weather model may attempt to display changes in weather through its "Sunny," "Cloudy", and "Rainy" states.
Emission Probabilities: The Possibility of observing particular states with hidden elements.
Temporal Dependencies: Demonstrate the way that variables change from one time step to another.
Transition Models: Describe the chance of being in a different state in the long run.
Language Modelling: N-grams and neural probabilistic language models come under modelling systems based on probability, which
judge a sequence of words determined by probability and to which text generation and autocomplete features owe their development.
Speech Recognition: The process of empowering spoken language alignment with HMMs and probabilistic algorithms increases the
quality of transcriptions because of higher accuracy.
Machine Translation: A variety of statistical machine translation systems take advantage of the employment of probabilistic algorithms,
providing both good and poor-mode translations as they relate to their contextual meaning.
Sentiment Analysis: Bayesian approaches calculate the probabilities of certain sentiments being presented in a text, improving opinion
analysis and sentiment classification.
Localisation and Mapping: Techniques, such as Monte Carlo Localisation and SLAM, allow robots to localise and map their environment
for easy navigation.
Path Planning: Robots that calculate the probability of a danger-free condition of specific routes can move safely.
Decision-Making under Uncertainty: Robots are equipped with Bayesian networks and MDPs to handle uncertain data and respond
appropriately, hence appropriate for situations with insufficient or noisy information.
Human-Robot Interaction: Probabilistic models allow robots to recognise human intentions, and this increases their cooperation and
communication.
Disease Diagnosis: Based on processing symptoms and test results, Bayesian networks establish the probabilities of occurrence for
specific diseases, facilitating good diagnosis calls by medical personnel.
Predictive Analytics: Information processed using probabilistic models assists healthcare providers in predicting how a disease will
develop and where preventive measures will be required.
Treatment Recommendation Systems: Algorithms analyse the medical history of a patient, genetic details, and previous responses to
treatments to personalise therapy recommendations.
Clinical Decision Support: Machine-based systems utilise probabilistic analysis to recommend diagnostic checks and interpret their
results.
Recommender Systems
Collaborative Filtering: Probabilistic models analyse user interactions, identifying repeating patterns, and suggest items that match
similar user behaviours.
Content-Based Recommendations: Applying Bayesian techniques, with the help of characteristics and their historical interactions, the
probability of a user liking an item by a user is known.
Hybrid Approaches: More accurate recommendations can be achieved from a combination of synergised probabilistic, collaborative,
and content-based methods.
Dynamic Preferences: When users change their preferences, algorithms adjust their recommendations based on the application of
probabilistic temporal models.
Fraud Detection
Anomaly Detection: Bayesian and probabilistic methods estimate the anomalies for transactions and indicate signs of possible fraud.
Risk Scoring: Fraud detection systems judge if a transaction is fraudulent by using previous data and situational information.
Network Analysis: Probabilistic graph models reveal hidden connections and activities characteristic of fraud in financial or social
networks.
Real-Time Decision-Making: Instant algorithms judge while risking further racist behaviour or financial ruin.
Despite the effectiveness of probabilistic reasoning in the management of uncertainty in decision-making, it is prone to be hampered by
practical issues undermining its successful implementation. Addressing these issues is a prerequisite for enlarging the application of
probabilistic reasoning in artificial intelligence.
Scalability Issues
The more complex the AI system is, the more problematic the task of probabilistic models to deal with data and calculations will be.
Large-Scale Networks: The manipulation of such many variables and dependencies that Bayesian networks and their counterparts
require compels a great deal of computational power. As an example, the complexities of weather or financial markets require handling
enormous data sets to make a correct model design.
High-Dimensional Data: The more variables that are added, the more one gets into a condition where probability distributions are
exponentially increased, thus effectively depicting the "curse of dimensionality".
Real-Time Applications: In practical situations such as self-driving cars and the recommendation of websites, there is an urgent need
for immediate and fast inference capabilities. Performance in finding a balance point between speed and accuracy continues to pose two
great challenges to probabilistic reasoning models in such applications.
Potential Solutions: To solve these problems, new algorithms like variational inference, parallel computation, and frameworks such as
TensorFlow Probability are employed.
Computational Complexity
Probabilistic reasoning models have their share of beautiful computations that may soon necessitate large amounts of processing.
Exact Inference: Techniques such as variable elimination and belief propagation have exponential complexities under conditions that
restrict their applicability to large-scale systems.
Sampling Methods: Such techniques (Monte Carlo and Gibbs Sampling) can be computationally expensive (and require a lot of
computational capacity) if a high degree of precision is needed.
Dynamic Systems: Integrating the time-varying dynamics into Bayesian networks, where dynamic models are used, places additional
computational demands, requiring the iterative application of state transition updates.
Potential Solutions: Using hybrid algorithms that combine both deterministic and probabilistic methods and using GPU and TPU
technology, computational inefficiencies can be overcome.
Sparse Data: Routine acquisition of complete and reliable data samples for the successful testing of probabilities can be quite
problematic. It is generally difficult to model complex events such as system outages or catastrophic weather events because they are
poorly reflected in the data sets.
Noisy Data: Unhandled or noisier datasets can easily lead to biased outcomes and compromise the validity of inferences. This problem is
particularly critical in such areas as medical diagnostics, in which mistakes in data interpretation can cause severe health risks.
Imbalanced Data: When this data is not balanced among the various categories, probabilistic methods may generate biased predictions.
Potential Solutions: As a solution for data sparsity and maintaining the quality of the data, practitioners regularly implement techniques
such as data augmentation, transfer learning, and reliable statistical estimation strategies. Subject matter experts' insights can
substantially enhance probabilistic models when the coverage of the dataset is limited.
Pyro
Developed based on PyTorch, Pyro allows the developers of such models to instantly build and deploy probabilistic models that are scalable
and flexible.
Key Features:
Simplifies the development of neural network-based probabilistic models by integrating with PyTorch.
Provides support for both variational inference and Markov Chain Monte Carlo (MCMC) approaches.
Use Cases:
Robust efficiencies in developing machine learning models that support scientific research and experimental techniques.
Key Features:
Provides capabilities for Bayesian inference, Monte Carlo sampling, and optimisation techniques.
Plugging into TensorFlow enables the generation of hybrid models based on the combination of deep learning with probabilistic
methodologies.
Use Cases:
Creating combined deep learning and statistical models for use in applications like uncertainty quantification.
Examining the possibility of optimising predictions via the use of Bayesian neural networks.
Pomegranate
Pomegranate is a probabilistic modelling library for Python, focused on simplicity and efficiency.
Key Features:
The library provides implementations for many probabilistic models, such as Bayesian networks, Hidden Markov Models, and Gaussian
Mixture Models.
The design is modular, and it makes one's customisation easy, and experimenting with different approaches is easier.
Use Cases:
An application of probabilistic models to sequential data in such areas as speech and transcription recognition and bioinformatics.
Application of probabilistic algorithms for clustering and classification in unsupervised learning setups.
← prev next →
Related Posts
11 min read
Bayes theorem in AI
Bayes' Theorem in Artificial Intelligence Bayes' theorem is also known as Bayes' rule, Bayes' law, or
Bayesian reasoning, which determines the probability of an event with uncertain knowledge. In probability theory, it relates
the conditional probability and marginal probabilities of two random events. Bayes' theorem was named after...
9 min read
| ELITE MEMBERSHIP AT
All80% OFF
Courses
All Blogs
Statistics Resources
Bayesian Network
Bayesian Network
Publication Date :
Blog Author :
Edited by :
Reviewed by :
Table Of Contents
Key Takeaways
Types
Examples
Example #1
Suppose Sam utilized the Bayesian
network concept to predict the future
performance of ABC stock. This approach
| ELITE MEMBERSHIP AT 80% OFF
represented the stock’s past returns along
with their conditional dependencies
between the future and past stock prices
through a DAG. The belief network
determined the stock price from the
discrete stock price value set to ensure the
maximization of the occurrence probability.
Example #2
Suppose XYZ Bank wanted to predict its
clients’ behavior to increase its sales,
evaluate risk, and create categories of its
financial products efficiently. The company
had limited data available. As a result, it
used the Bayesian Network, which helped
it create a predictive model. Based on this
model, the bank created product
categories and made adjustments to its
existing offerings to increase its revenue.
Applications
Advantages And
Disadvantages
Advantages
This model helps in parameter and
structural learning.
It integrates input data from various
sources for the purpose of
overcoming data limitations.
The model compactly represents
substantial probability distributions.
Belief models can serve as visual
decision-support tools.
Another key adjective of Bayesian
networks is that they transparently
represent causal components
between the system variables.
Disadvantages
These networks lack feedback loops.
| ELITE MEMBERSHIP AT 80% OFF
Belief models perform continuous
data representation.
Such models deal with continuous
variables in a restricted manner only.
Another key Bayesian Network
limitation is that creating
straightforward yet expressive
probability distribution is challenging.
Bayesian
Neural Network Markov Network
Network
Such networks
are ideal for
These
taking events
networks
that took place
help Markov
and making
computers networks
predictions
make simplify joint
regarding the
decisions probability
possibility that
that are distributions and
any of the
intelligent preserve
various
using interesting
possible
restricted dependencies.
known reasons
human
was the main
assistance.
contributing
factor.
I N F O R M AT I O N P R O C E S S I N G & R E T R I E VA L
Table of Contents
What is knowledge engineering?
The role of knowledge engineers
Key responsibilities of knowledge engineers
Steps in knowledge engineering
Step 1: Knowledge acquisition
Step 2: Knowledge representation
Step 3: Inference mechanisms
Step 4: Knowledge integration and testing
Challenges in knowledge engineering
1. Knowledge acquisition bottleneck
2. Ambiguity in knowledge representation
3. Maintaining and updating knowledge
Conclusion
Once knowledge has been acquired, it must be represented in a form that the
computer system can understand and use. There are different methods for
knowledge representation, each suitable for different types of problems. Some of
the most common techniques include:
As the world changes, so too does knowledge. New research, discoveries, and
practices can quickly make an expert system obsolete. Keeping the knowledge
base up-to-date is an ongoing challenge in knowledge engineering. This requires
continuous collaboration with experts and periodic updates to the system’s
knowledge base.
Conclusion
Knowledge engineering plays a critical role in AI and expert systems, acting as the
bridge between human expertise and machine learning. By following a structured
process of knowledge acquisition, representation, and inference, knowledge
engineers create systems that can reason, solve problems, and provide expert-
level decisions. However, challenges such as the knowledge acquisition bottleneck
and the need for ongoing maintenance make this process far from simple. Despite
these hurdles, the field continues to evolve, with new tools and techniques being
developed to make expert systems smarter and more efficient.
What do you think? How do you see the future of knowledge engineering evolving
in the next decade? Can we expect AI systems to become more autonomous in
acquiring and applying knowledge?
s Project Ideas Search Algorithms Local Search Algorithm Generative AI Data Science Machin
Expert Systems in AI
Last Updated : 11 Jul, 2025
The user interface is the bridge that allows users to interact with the
expert system. It’s designed to be intuitive and user-friendly, ensuring
that even non-experts can use the system effectively. Users provide
a query (problem or question), and the system processes the request.
The system then delivers advice or recommendations back to the user.
1. Forward Chaining
2. Backward Chaining
Backward Chaining
Conclusion
Expert systems are a crucial aspect of AI, providing intelligent
decision-making capabilities across various domains. By emulating
human expertise, they offer valuable insights, consistent solutions, and
efficiency. Despite their limitations, expert systems continue to evolve
and play a significant role in advancing AI technologies.
Naman Singhal
JioHotstar, Meesho, Zomato,…
Sandeep Kumar
HCL Technologies, Paytm
Abhishek Prasad
Cisco Systems
View All →
Business Development…
eSparkBiz
Internship • Onsite - Ahmedabad…
Apply by Thu Dec 11 2025
Business Development -…
Kazam
2 - 3 Years • Onsite - Bengaluru…
Apply by Thu Dec 11 2025
SEO Executive
Henceforth Solutions [Link]
Fresher • Onsite - Mohali (Punjab)
Apply by Thu Dec 11 2025
View All →
Upcoming Courses
Data Structure & Algorithm…
Starting from - December 11, 2025 4.7
• LIVE
Registered Address:
K 061, Tower K, Gulshan Vivante
Apartment, Sector 137, Noida, Gautam
Buddh Nagar, Uttar Pradesh, 201305
Company Explore
About Us POTD
Legal Job-A-Thon
Privacy Policy Connect
Careers Blogs
Contact Us Nation Skill Up
Corporate Solution
Campus Training Program
Tutorials Courses
Programming Languages ML and Data Science
DSA DSA and Placements
Web Technology Web Development
AI, ML & Data Science Data Science
DevOps Programming Languages
CS Core Subjects DevOps & Cloud
GATE GATE
School Subjects Trending Technologies
Software and Tools