AI Lesson 11 – Knowledge Representation | Dataplexa

Knowledge Representation in Artificial Intelligence

An intelligent system is only as good as the knowledge it has and how well it can use that knowledge. Knowledge Representation is the area of Artificial Intelligence that focuses on how information about the world is stored so that an AI system can reason and make decisions.

Simply collecting data is not enough. AI systems must understand relationships, rules, facts, and meanings in a structured way.

Why Knowledge Representation Is Important

Humans use knowledge every moment — we remember facts, apply rules, and reason about situations. AI systems need a similar ability, but in a formal and computable form.

Without proper knowledge representation:

  • AI systems cannot reason logically
  • Decisions become inconsistent
  • Learning and planning become inefficient

Knowledge representation allows machines to store knowledge, retrieve it, and reason with it.

Real-World Connection

Consider a medical diagnosis system.

  • Facts: Symptoms, diseases, patient history
  • Rules: If symptom A and symptom B occur, disease X is possible
  • Relationships: Diseases are related to organs and causes

All this information must be represented in a way that a computer can understand and reason over.

What Is Knowledge in AI?

In AI, knowledge usually includes:

  • Facts: Statements that are true
  • Rules: Logical implications
  • Relationships: How entities are connected

For example:

  • Paris is the capital of France (fact)
  • If it rains, the ground becomes wet (rule)
  • A car has an engine (relationship)

Common Knowledge Representation Techniques

AI uses several techniques to represent knowledge effectively.

1. Logical Representation

Knowledge is expressed using logic statements such as propositional logic or first-order logic.

This approach is precise and supports reasoning, but it can become complex for large systems.

2. Semantic Networks

Knowledge is represented as a graph where:

  • Nodes represent objects or concepts
  • Edges represent relationships

This is useful for representing hierarchies and associations.

3. Frames

Frames represent knowledge as structured objects with attributes and values.

They are similar to how humans organize information about objects.

4. Rule-Based Systems

Knowledge is stored as IF–THEN rules.

This is one of the most common approaches in expert systems.

Simple Rule-Based Representation (Code Example)

Below is a simple Python example showing how rules can represent knowledge.


def diagnose(symptom):
    if symptom == "fever":
        return "Possible infection"
    elif symptom == "headache":
        return "Possible stress"
    else:
        return "Unknown condition"

print(diagnose("fever"))
  
Possible infection

Code Explanation

This program stores knowledge as simple rules.

  • Each condition represents a known fact
  • The rules map symptoms to conclusions
  • The system reasons by matching input with rules

Output Explanation

When the input symptom is fever, the rule triggers a matching conclusion.

More advanced AI systems use hundreds or thousands of such rules.

Challenges in Knowledge Representation

Representing real-world knowledge is difficult because:

  • The world is complex and uncertain
  • Knowledge can be incomplete or ambiguous
  • Human reasoning is hard to formalize

Modern AI often combines knowledge representation with machine learning to overcome these challenges.

Where Knowledge Representation Is Used

  • Expert systems
  • Chatbots and virtual assistants
  • Search engines
  • Medical diagnosis systems
  • Recommendation engines

Even large language models rely on internal knowledge representations learned from data.

Practice Questions

Practice 1: Which AI concept focuses on storing and reasoning with knowledge?



Practice 2: IF–THEN statements are an example of what?



Practice 3: What type of knowledge states true information?



Quick Quiz

Quiz 1: Which technique represents knowledge as a graph?





Quiz 2: Knowledge representation mainly enables?





Quiz 3: Expert systems mostly rely on?





Coming up next: Probabilistic AI — handling uncertainty and randomness in intelligent systems.