Knowledge base

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

Knowledge base

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

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
2. Where does the information in a knowledge base come from?
A Human experts in the subject
B Random guesses made by the computer
3. A medical expert system stores the symptoms and known causes of many illnesses. Which part holds this?
A Inference engine
B Knowledge base
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
5. Which part of an expert system holds the rules, such as IF-THEN statements?
A Rule base
B Knowledge base

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

Left columnRight column
1knowledge base AIF-THEN rules belong in the rule base. The knowledge base stores facts and information about the subject.
2knowledge base: add new fact BUpdating the knowledge base so the expert system holds the latest facts about the subject
3The knowledge base holds facts about the subject that were gathered from human experts, such as a doctor Cknowledge_base = facts from experts
4The knowledge base stores facts, but the rule base stores the IF-THEN rules used to reason Dknowledge base = facts, rule base = rules
5knowledge base = IF-THEN rules EThe part of an expert system that stores facts and information about a subject, gathered from human experts
6knowledge base = facts that can never change FThe knowledge base can be updated with new facts, so it is not fixed.

Definitions

knowledge base

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
_____________ ← "facts from experts"
2.
knowledgeBase.___("new virus fact")
3.
________ ← "IF fever THEN rest"
4.
knowledgeBase _ "Flu causes fever"
5.
______ "new fact" TO knowledgeBase

Spot the Error

Shade in the letter of the line that contains an error.

Question 1
A knowledgeBase ← []
B fact ← "Fever is a symptom"
C APPEND(fact, knowledgeBase)
Question 2
A newFact ← "Flu has fever"
B IF newFact NOT IN KB THEN
C APPEND(RB, newFact)
D ENDIF
Question 3
A knowledgeBase ← rules
B ruleBase ← rules
C result ← USE(ruleBase, facts)
Question 4
A source ← "human expert"
B fact ← ASK(source)
C APPEND(knowledgeBase, fact)
D OUTPUT LENGTH(knowledgeBase
Question 5
A source ← "random website"
B fact ← GETFACT(source)
C APPEND(knowledgeBase, fact)

Answer Key

Knowledge base
Section A: Quick Questions
Q1
A — Facts and information about the subject
Q2
A — Human experts in the subject
Q3
B — Knowledge base
Q4
B — It can be updated with new facts
Q5
A — Rule base
Section B: Match the Pairs
Q1
knowledge base → The part of an expert system that stores facts and information about a subject, gathered from human experts
Q2
knowledge base: add new fact → Updating the knowledge base so the expert system holds the latest facts about the subject
Q3
The knowledge base holds facts about the subject that were gathered from human experts, such as a doctor → knowledge_base = facts from experts
Q4
The knowledge base stores facts, but the rule base stores the IF-THEN rules used to reason → knowledge base = facts, rule base = rules
Q5
knowledge base = IF-THEN rules → IF-THEN rules belong in the rule base. The knowledge base stores facts and information about the subject.
Q6
knowledge base = facts that can never change → The knowledge base can be updated with new facts, so it is not fixed.
Section C: Definitions
Q1
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.
Section D: Fill in the Blanks
Q1
knowledgeBase ← "facts from experts"
Q2
knowledgeBase.add("new virus fact")
Q3
ruleBase ← "IF fever THEN rest"
Q4
knowledgeBase ← "Flu causes fever"
Q5
APPEND "new fact" TO knowledgeBase
Section E: Spot the Error
Q1
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).
Q2
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).
Q3
A — The knowledge base stores facts about the subject, not rules. The rules belong in the rule base. The line should be knowledgeBase ← facts.
Q4
D — The closing bracket is missing. The line should be OUTPUT LENGTH(knowledgeBase) to output how many facts are stored.
Q5
A — The facts in a knowledge base are gathered from human experts, not from random websites. The line should be source ← "human expert".