How an expert system reaches a conclusion

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

How an expert system reaches a conclusion

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. Which component of an expert system first takes the user's answers to its questions?
A The inference engine
B The expert system interface
2. Which component applies the rules to the user's answers and the knowledge base?
A The inference engine
B The rule base
3. Which is the correct order of operation?
A Interface, inference engine, interface
B Inference engine, interface, knowledge base
4. Which component displays the final conclusion to the user?
A The knowledge base
B The expert system interface
5. True or false: the inference engine uses both the user's answers and the knowledge base to reach a conclusion.
A True
B False

Match the Pairs

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

Left columnRight column
1interface -> inference engine -> interface AThe sequence starts at the wrong place. The user's answers must be taken in at the interface before the inference engine can reason.
2inference engine -> knowledge base Binterface -> result shown to user
3The first step: the user's answers are taken in by the interface CThe order an expert system works: the user answers at the interface, the inference engine reasons, then the interface shows the result.
4The last step: the interface shows the conclusion to the user Duser answers -> interface
5interface -> knowledge base -> inference engine EThe interface does not send the answers straight to the knowledge base. The inference engine must apply the rules to the answers and use the knowledge base.
6inference engine -> interface -> interface FThe inference engine looks up facts and rules in the knowledge base to work out a conclusion from the user's answers.

Definitions

interface -> inference engine -> interface

Fill in the Blanks

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

1.
1. The user types answers at the _________
2.
2. The ________________ applies the rules
3.
3. The interface shows the ______
4.
interface -> ________________ -> interface
5.
The inference engine uses the rules and the ______________ to reach a conclusion

Spot the Error

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

Question 1
A answers = interface.ask()
B rules = knowledge_base.get()
C result = engine.run(result)
D interface.show(result)
Question 2
A answers = engine.ask()
B result = engine.run(answers)
C interface.show(result)
Question 3
A Step 1: User answers questions
B Step 2: Interface applies rules
C Step 3: Interface shows result
Question 4
A INPUT answers
B result = INFER(rules)
C OUTPUT result
Question 5
A INPUT answers FROM engine
B result ← INFER(answers, rules)
C OUTPUT result TO interface

Answer Key

How an expert system reaches a conclusion
Section A: Quick Questions
Q1
B — The expert system interface
Q2
A — The inference engine
Q3
A — Interface, inference engine, interface
Q4
B — The expert system interface
Q5
A — True
Section B: Match the Pairs
Q1
interface -> inference engine -> interface → The order an expert system works: the user answers at the interface, the inference engine reasons, then the interface shows the result.
Q2
inference engine -> knowledge base → The inference engine looks up facts and rules in the knowledge base to work out a conclusion from the user's answers.
Q3
The first step: the user's answers are taken in by the interface → user answers -> interface
Q4
The last step: the interface shows the conclusion to the user → interface -> result shown to user
Q5
interface -> knowledge base -> inference engine → The interface does not send the answers straight to the knowledge base. The inference engine must apply the rules to the answers and use the knowledge base.
Q6
inference engine -> interface -> interface → The sequence starts at the wrong place. The user's answers must be taken in at the interface before the inference engine can reason.
Section C: Definitions
Q1
interface -> inference engine -> interface — The user answers questions at the interface; the inference engine applies the rules to the answers and knowledge base; the interface then shows the result.
Section D: Fill in the Blanks
Q1
1. The user types answers at the interface
Q2
2. The inference engine applies the rules
Q3
3. The interface shows the result
Q4
interface -> inference engine -> interface
Q5
The inference engine uses the rules and the knowledge base to reach a conclusion
Section E: Spot the Error
Q1
C — The engine needs the user's answers to work out a conclusion. 'result' does not exist yet, so the line should be result = engine.run(answers).
Q2
A — The expert system interface asks the user the questions and takes their answers. The inference engine does not talk to the user. It should be answers = interface.ask().
Q3
B — Applying the rules is the job of the inference engine, not the interface. The interface only takes the answers and shows the result. Step 2 should say the engine applies the rules.
Q4
B — The inference engine must apply the rules to the user's answers, so the answers must be passed in too. It should be result = INFER(answers, rules).
Q5
A — The user's answers come in through the interface, not from the inference engine. It should be INPUT answers FROM interface.