← IGCSE Computer Science Paper 1

Knowledge base

The part of an expert system that stores facts and information about a subject, gathered from human experts. It can be updated with new facts. The rule base holds the rules.

Understanding Knowledge base in IGCSE Computer Science Paper 1

What it does: This shows the knowledge base as a collection of facts, and the facts come from human experts.

Common mistakes: The arguments are the wrong way round. APPEND takes the list first, then the item to add, so the fact is stored in the knowledge base with APPEND(knowledgeBase, fact). A new fact must be added to the knowledge base (KB), not the rule base (RB). The rule base holds rules, not facts. The line should be APPEND(KB, newFact).

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 662–678) and word search (Modules 652–678).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
What does the knowledge base of an expert system store?
Facts and information about the subjectThe program that draws the screen layout
Matches
knowledge base = IF-THEN rules
↓
IF-THEN rules belong in the rule base. The knowledge base stores facts and information about the subject.
Applying
Meanings
Term
knowledge base
Meaning
The part of an expert system that stores facts and information about a subject, gathered from human experts. It can be updated with new facts. The rule base holds the rules.
Practice
KnowledgeBase <- []
Testing
Gaps
← "facts from experts"
Check Answer
Spots
2fact ← "Fever is a symptom"
3APPEND(fact, knowledgeBase)

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Moon Jellyfish' badge — Orbital Streak, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. What does the knowledge base of an expert system store?
A. Facts and information about the subject ✓
B. The program that draws the screen layout
The knowledge base is the collection of facts and information about a subject that the expert system uses.
2. Where does the information in a knowledge base come from?
A. Human experts in the subject ✓
B. Random guesses made by the computer
The facts are gathered from human experts, such as doctors or engineers, and then stored in the knowledge base.
3. A medical expert system stores the symptoms and known causes of many illnesses. Which part holds this?
A. Inference engine
B. Knowledge base ✓
Facts about illnesses and symptoms are stored in the knowledge base. The inference engine only uses them to reach a conclusion.
4. Which statement is true about the knowledge base?
A. It can never be changed once it is built
B. It can be updated with new facts ✓
A knowledge base can be updated with new facts, so the expert system stays accurate as knowledge about the subject grows.
5. Which part of an expert system holds the rules, such as IF-THEN statements?
A. Rule base ✓
B. Knowledge base
The rule base holds the rules. The knowledge base holds the facts. Do not mix the two up in the exam.

Match the Pairs

knowledge base → The part of an expert system that stores facts and information about a subject, gathered from human experts
knowledge base: add new fact → Updating the knowledge base so the expert system holds the latest facts about the subject
The knowledge base holds facts about the subject that were gathered from human experts, such as a doctor → knowledge_base = facts from experts
The knowledge base stores facts, but the rule base stores the IF-THEN rules used to reason → knowledge base = facts, rule base = rules
knowledge base = IF-THEN rules → IF-THEN rules belong in the rule base. The knowledge base stores facts and information about the subject.
knowledge base = facts that can never change → The knowledge base can be updated with new facts, so it is not fixed.

Key Term

knowledge base
The part of an expert system that stores facts and information about a subject, gathered from human experts. It can be updated with new facts. The rule base holds the rules.

Fill in the Blanks

1. knowledgeBase ← "facts from experts"
Hint: Type the variable name for the expert system part that stores facts gathered from human experts.
2. knowledgeBase.add("new virus fact")
Hint: Type the method name that puts a new fact into the knowledge base so it is kept up to date.
3. ruleBase ← "IF fever THEN rest"
Hint: Type the variable name for the part of an expert system that holds the rules, not the facts.
4. knowledgeBase ← "Flu causes fever"
Hint: Type the pseudocode assignment operator that stores a fact in the variable.
5. APPEND "new fact" TO knowledgeBase
Hint: Type the pseudocode keyword that adds a new item to the end of a collection.

Spot the Error

Question 1
A knowledgeBase ← []
B fact ← "Fever is a symptom"
C APPEND(fact, knowledgeBase)
Line C — The arguments are the wrong way round. APPEND takes the list first, then the item to add, so the fact is stored in the knowledge base with APPEND(knowledgeBase, fact).
Question 2
A newFact ← "Flu has fever"
B IF newFact NOT IN KB THEN
C APPEND(RB, newFact)
D ENDIF
Line C — A new fact must be added to the knowledge base (KB), not the rule base (RB). The rule base holds rules, not facts. The line should be APPEND(KB, newFact).
Question 3
A knowledgeBase ← rules
B ruleBase ← rules
C result ← USE(ruleBase, facts)
Line A — The knowledge base stores facts about the subject, not rules. The rules belong in the rule base. The line should be knowledgeBase ← facts.
Question 4
A source ← "human expert"
B fact ← ASK(source)
C APPEND(knowledgeBase, fact)
D OUTPUT LENGTH(knowledgeBase
Line D — The closing bracket is missing. The line should be OUTPUT LENGTH(knowledgeBase) to output how many facts are stored.
Question 5
A source ← "random website"
B fact ← GETFACT(source)
C APPEND(knowledgeBase, fact)
Line A — The facts in a knowledge base are gathered from human experts, not from random websites. The line should be source ← "human expert".

Student with a class code? Join your class →