Knowledge Representation (KR) is a concept in Artificial Intelligence that focuses on how machines store and use knowledge about the real world. Just like humans use their knowledge to understand situations and make decisions, computers also need a structured way to represent information so they can reason, learn and solve problems smartly.

- Knowledge Representation and Reasoning (KR or KRR) is a part of AI that focuses on how intelligent agents think and make decisions.
- It helps represent real world information in a way that computers can understand and process.
- Using this knowledge, machines can solve complex problems such as medical diagnosis or natural language communication.
- It is not only about storing data but also about enabling machines to use knowledge and past experiences to act intelligently.
Types of Knowledge

In Artificial Intelligence, different types of knowledge are used to help systems understand information and perform tasks effectively. These include the following types:
- Declarative Knowledge: Knowledge about facts and concepts it answers what something is . Example: Paris is the capital of France.
- Procedural Knowledge: Knowledge about how to perform a task or solve a problem. Example: Steps to sort numbers using an algorithm.
- Meta knowledge: Knowledge about other knowledge or how knowledge is used. Example: Knowing that a certain rule works better for solving math problems.
- Heuristic Knowledge: Experience based knowledge or rules of thumb used by experts. Example: A doctor using past experience to guess a possible disease.
- Structural Knowledge: Knowledge that shows relationships between concepts. Example: A car is a type of vehicle.
Relation between Knowledge and Intelligence
Knowledge plays an important role in intelligence for both humans and AI systems. An AI agent can behave intelligently only when it has knowledge or experience about the situation it is dealing with. Without knowledge, the system cannot properly understand inputs or make correct decisions.

As we can see in below diagram, there is one decision maker which act by sensing the environment and using knowledge. But if the knowledge part will not present then, it cannot display intelligent behaviour. This relation can be understood as follows:
- Knowledge about the real world is essential for building intelligent AI systems
- AI agents use knowledge to understand inputs and take appropriate actions.
- An agent can respond correctly only if it has knowledge or prior experience.
- Without knowledge, an AI system cannot display intelligent behaviour.
Information Represented in AI Systems
In AI systems, different types of knowledge must be represented so machines can understand information and act intelligently. These include:
- Objects: Facts about real world things (e.g., guitars have strings).
- Events: Actions or occurrences in the world.
- Performance: Knowledge about how to perform tasks.
- Meta knowledge: Knowledge about what the system knows.
- Facts: True statements about the real world.
- Knowledge Base (KB): The main storage of knowledge in an AI system.
Techniques of knowledge representation

1. Logical Representation
Logical representation uses formal rules and logic to represent knowledge in AI. It helps systems make conclusions based on given conditions. The sentences are written using defined syntax (rules of writing) and semantics (meaning of the sentences). It includes the following ideas:
- Syntax: Rules that decide how symbols and sentences are written in logic.
- Semantics: Rules that give meaning to logical sentences.
- Logical representation mainly includes Propositional Logic and Predicate Logic.
Advantages
- Helps in logical reasoning and decision making.
- Forms the basis of many programming languages.
Disadvantages
- Can be difficult to use and understand.
- Reasoning using logic can sometimes be slow or inefficient.
2. Semantic Network Representation
A semantic network represents knowledge in the form of a graph structure. It contains nodes (objects or concepts) and arcs (relationships between objects). This structure helps show how different concepts are connected. Common relations include:
- IS-A relation: Shows inheritance (e.g. Cat is a Mammal).
- Kind-of relation: Shows category relationships.

Advantages
- Natural and easy way to represent knowledge.
- Simple to understand and visualize.
- Can be easily expanded.
Disadvantages
- Searching large networks can take more time.
- Difficult to create very large networks like human memory.
- Lacks clear standards for link names and logical expressions.
3. Frame Representation
A frame is a data structure used to represent knowledge about an object or situation. It contains slots (attributes) and values that describe an entity. Frames help organize related information together. Frames are similar to modern classes and objects in programming and are widely used in NLP and computer vision.
Example: A frame for a Book may include slots such as title, author, year and pages.
Advantages
- Groups related information together, making programming easier.
- Flexible and easy to extend by adding new attributes.
- Easy to understand and visualize.
Disadvantages
- Inference and reasoning are not always efficient.
- Sometimes too generalized for complex reasoning.
4. Production Rules
Production rules represent knowledge in the form of IF–THEN rules. When a condition is satisfied, the system performs the corresponding action. A production rule system has three main parts:
- Set of rules
- Working memory (current problem state)
- Recognize act cycle (process of checking conditions and applying rules)
Example: IF (bus arrives) THEN (get into the bus).
Advantages
- Easy to understand because rules are written in simple language.
- Highly modular; rules can be added, removed, or modified easily.
Disadvantages
- Systems usually do not learn from past results.
- Many active rules can make the system slower or inefficient.
Applications
- Expert Systems: Provide advice or decisions in specific fields. Example: Medical diagnosis systems.
- Natural Language Processing (NLP): Helps computers understand and generate human language. Example: Chatbots and translation systems.
- Robotics: Helps robots understand their environment and perform tasks. Example: Robots navigating and avoiding obstacles.
- Semantic Web: Allows machines to understand and organize web information. Example: Search engines understanding relationships between topics.
- Cognitive Computing: Systems analyze large amounts of data to provide insights. Example: AI systems used in healthcare research.
Challenges
- Complexity: Representing complete domain knowledge is difficult (e.g., medical knowledge).
- Ambiguity: Words can have multiple meanings, making interpretation hard (e.g., “bank”).
- Scalability: Systems must handle growing data efficiently (e.g., search engines).
- Knowledge Acquisition: Hard to collect and convert expert knowledge into usable form.