Knowledge Representation in AI
This is a free course. Log in to run the code exercises and track your progress.
Knowledge Representation in AI
Knowledge Representation (KR) in AI addresses how machines store and structure real-world information so they can reason, learn, and decide with human-like intelligence.
- Encodes knowledge in a structured form computers can process.
- Supports reasoning and problem-solving in AI systems.
- Powers intelligent uses such as medical diagnosis and language understanding.
- Lets machines draw on stored knowledge and prior experience effectively.
Types of Knowledge
- Declarative Knowledge: Facts and concepts that answer what something is. Example: Paris is the capital of France.
- Procedural Knowledge: Know-how for performing a task or solving a problem. Example: Steps to sort numbers with an algorithm.
- Meta knowledge: Knowledge about knowledge, or about how knowledge is applied. Example: Knowing that a particular rule works better for math problems.
- Heuristic Knowledge: Experience-based rules of thumb used by experts. Example: A doctor using past cases to suspect a disease.
- Structural Knowledge: Knowledge that captures relationships among concepts. Example: A car is a type of vehicle.
Relation between Knowledge and Intelligence
Knowledge underpins intelligence in people and in AI. Agents rely on knowledge and experience to interpret situations, choose actions, and respond intelligently.
The diagram shows that intelligent behavior arises only when a decision-maker draws on knowledge from the environment. That relationship can be summarized as:
- Real-world knowledge is required to build intelligent AI systems
- Agents use knowledge to interpret inputs and act appropriately.
- Correct responses depend on knowledge or prior experience.
- Without knowledge, an AI system cannot exhibit intelligent behaviour.
Techniques of knowledge representation
1. Logical Representation
Logical representation encodes knowledge with formal rules and logic so systems can conclude from given conditions. Core ideas include:
- Syntax: Rules for how symbols and sentences are written in logic.
- Semantics: Rules that assign meaning to logical sentences.
- Logical representation mainly covers Propositional Logic and Predicate Logic.
Advantages
- Supports logical reasoning and decision making.
- Underpins many programming languages.
Disadvantages
- Can be hard to use and grasp.
- Logic-based reasoning may be slow or inefficient.
2. Semantic Network Representation
A semantic network models knowledge as a graph: nodes are concepts or objects, and arcs are relationships. It highlights links among concepts.
- IS-A relation: Captures inheritance (e.g. Cat is a Mammal).
- Kind-of relation: Captures category relationships.
Advantages
- Natural, accessible way to represent knowledge.
- Easy to understand and visualize.
- Straightforward to extend.
Disadvantages
- Searching large networks can be time-consuming.
- Building networks as rich as human memory is hard.
- Link names and logical expressions lack firm standards.
3. Frame Representation
A frame is a structure that describes an object or situation through slots (attributes) and values. Related facts sit together; frames are common in NLP and computer vision.
Example: A Book frame might hold slots for title, author, year, and pages.
Advantages
- Clusters related information, simplifying programming.
- Flexible; new attributes are easy to add.
- Easy to understand and visualize.
Disadvantages
- Inference and reasoning are not always efficient.
- Can be too generic for intricate reasoning.
4. Production Rules
Production rules encode knowledge as IF–THEN statements. When a condition holds, the matching action runs. A production-rule system has three main parts:
- Set of rules
- Working memory (current problem state)
- Recognize act cycle (checking conditions and firing rules)
Example: IF (bus arrives) THEN (get into the bus).
Advantages
- Easy to follow because rules use plain language.
- Highly modular; rules can be added, removed, or edited easily.
Disadvantages
- Systems typically do not learn from past outcomes.
- Many active rules can slow the system or reduce efficiency.
Applications
- Expert systems that advise and support decisions in specialized domains such as medical diagnosis.
- NLP systems that understand and generate language in chatbots and translation tools.
- Robots that interpret their surroundings for navigation and obstacle avoidance.
- The semantic web, helping machines organize and interpret links among web information.
- Cognitive computing that analyzes large datasets for insights, including healthcare research.
Challenges
- Complexity makes fully accurate domain knowledge hard to capture.
- Ambiguity arises when words have multiple meanings that confuse AI.
- Scalability is difficult when data volumes grow very large.
- Knowledge Acquisition is hard: collecting and storing expert knowledge is nontrivial.