E ExamMaster

Artificial Intelligence · AI Foundations

Expert Systems

In AI because the classical expert system is a named architecture — knowledge base, inference engine, working memory — and the hybrid lesson already owns what happens when that…

The Knowledge Engineering and Hybrid Systems lesson already told the maintenance story: MYCIN matched specialists and never ran in a clinic, and modern stacks put a logical gate around a learned proposer. This lesson is the classical machine those stories assume — the named boxes, the named roles, and the empty engine a shell leaves you to fill. The campus running example is a clinic desk: a student walks in with a fever, and a small authored KB decides whether to send them to a doctor today. No learned scorer, no LLM, no payment-gate hybrid: those remain the other lesson's object.

  • Artificial Intelligence
  • Medium level
  • 5 concepts

1A KB plus an engine, not a trained score

An expert system is a program that answers a case by running an inference procedure over a knowledge base a person wrote. The clinic desk does not fit a fever-to-refer model on past visits. It stores rules such as 'if fever and a cough lasting three days, refer', and an engine that matches those rules against today's symptoms. The answer is a derived conclusion, in the sense of the last two logic lessons, not a score.

That split — authored KB, separate engine — is the definition. A long Python script with the same ifs inlined into the user interface is an ordinary program. A neural net that predicts 'refer' from a table of past visits is a learned model. Both can be useful. Neither is this architecture. The hybrid lesson is where those two meet a rule layer; this lesson stays inside the classical box.

Three ways to decide 'refer'
ApproachWhere the knowledge livesWhat a case produces
Expert systemAuthored KB, separate engineA derived conclusion
Inlined ifsThe program textWhatever the branches do
Learned scorerWeights fitted on past visitsA score, then a threshold

Coding lab. Forward chaining rule engine runs in the app, with checks on your output.

2The four boxes

Four pieces recur. The knowledge base holds the lasting rules and facts of the domain — 'fever plus a three-day cough means refer'. Working memory holds this case: the symptoms entered so far, and the conclusions the engine has already added. The inference engine is the matcher — typically forward or backward chaining from the last lesson — that compares working memory with the KB and fires. The user interface asks the next missing symptom and, when asked, shows which rule just fired.

The engine does not contain clinic knowledge. The KB does not contain the match loop. That separation is what lets a shell, later in this lesson, ship an engine with no rules in it, and what lets a knowledge engineer swap a rule without rewriting the matcher.

Figure. The engine sits between the user and two stores: the lasting KB and this-case working memory. Edges are the match and the I/O, not a data-flow animation. Labels are short on purpose.

What each box holds
BoxHoldsChanges when
KBLasting clinic rulesThe engineer edits a rule
Working memoryThis student's symptomsA new answer arrives
EngineThe match loop, no clinic factsNever — it is domain-ignorant
User I/OQuestions and the 'why'The engine needs a missing slot
What are the two central decoupled components of a classic expert system?
  1. A convolutional feature extractor and a fully connected softmax layer
  2. A domain knowledge base of facts and rules, and an inference engine that reasons over them
  3. A relational SQL database and a CSS frontend styling stylesheet
  4. A random number generator and a gradient descent loss optimizer

An expert system separates domain expertise (Knowledge Base) from general reasoning algorithms (Inference Engine).

3Three roles around the KB

Three people, or three hats, sit around the clinic desk. The domain expert is the campus doctor who already knows when to refer. The knowledge engineer interviews that doctor, writes the rules, and keeps them consistent. The end user is the desk volunteer who answers 'fever?' and reads 'refer' — they do not edit the KB.

The hybrid lesson's bottleneck is this interview. Experts disagree, they forget the exception they used last Tuesday, and the written rule is a frozen picture of a moving clinic. This lesson only needs the cast: if one person is doctor, engineer and volunteer, the architecture can still run, and the failure modes of acquisition are still theirs. Do not retell MYCIN's evaluation here; that measurement lives on the other page.

Who owns which box
RoleOwnsDoes not own
Domain expertThe clinic judgementThe match loop
Knowledge engineerThe written KBToday's symptoms
End userThe case at the deskThe rule text

4Heuristics and meta-knowledge

A domain heuristic is a rule of thumb written as a rule: 'if the fever started after an all-nighter and there is no cough, ask about sleep before referring'. It can be wrong, and it is still knowledge — the doctor uses it, so the KB may store it, tagged as a heuristic rather than as a hard constraint. The last search lessons used heuristic in a different sense (an h(n)). Here the word is the expert's shortcut, not an admissible estimate.

Meta-knowledge is knowledge about the knowledge: which rule to try first, when to stop asking questions, when a conflict between two rules should prefer the more specific one. 'Try infection rules before lifestyle rules' is not a clinic fact; it is a fact about the KB. Shells expose a conflict-resolution strategy — recency, specificity, a declared priority — so that meta-knowledge has a place to live that is not another inlined if.

Two 'heuristic' words
Word in this courseMeansLives in
Search heuristic h(n)Optimistic remaining costA* / AO*
Expert heuristicA rule of thumb that can be wrongThe KB, tagged
Meta-knowledgeWhich rule to try, when to stopThe engine's strategy

5A shell is an empty engine

A shell is the inference engine, the working-memory store, the I/O, and the conflict strategy — with no clinic rules in it. CLIPS, Jess, and the 1980s commercial tools are shells in this sense. You load a KB; you have an expert system. You load a different KB; you have a different expert system on the same engine. The shell is reusable precisely because the last concepts kept the engine ignorant of the domain.

Building from scratch means writing the matcher yourself. That is justified when the inference is not chaining — a special constraint solver, a temporal engine — and it is wasted effort when the clinic rules are ordinary definite clauses. The hybrid lesson's modern picture (a learned proposer behind a validator) is a different architecture again: the validator is a KB-shaped gate, not a shell waiting for a MYCIN-sized rule base. Use this lesson's names for the classical machine; use that lesson's names for the split with learning.

A team downloads CLIPS, writes no rules, and tells the dean they have 'an expert system for the clinic'. What do they actually have?
  1. A shell: an engine and I/O with an empty KB, which is not yet an expert system for any domain
  2. An expert system, because CLIPS is one
  3. A hybrid model, because the engine can later call a scorer
  4. A knowledge engineer, because the tool was installed

CLIPS is a shell. The expert system appears when a KB for the clinic is loaded. Installing the engine does not create the knowledge, the engineer, or a hybrid.

Notes

  • An expert system is a program whose answers come from an authored knowledge base plus a separate inference engine.
  • Working memory holds the case; the engine matches it against the KB; the user sees questions and explanations, not the match loop.
  • A shell is the engine and the I/O, empty of domain rules — CLIPS-style tools are shells, not expert systems, until someone fills the KB.

Exam traps & shortcuts

  • If the rules and the engine are one tangled program, you do not have an expert system — you have an ordinary program that happens to be about a domain.
  • Knowledge acquisition is the bottleneck the hybrid lesson already named; this lesson names the roles around it.
  • Meta-knowledge is knowledge about which rule to try, not a second copy of the domain.

Recap

Next: explanation-based learning.

Definition
Authored KB plus a separate engine. A derived conclusion, not a score, and not the hybrid gate the other lesson owns.
Four boxes
KB (lasting rules), working memory (this case), engine (match), user I/O (questions and why).
Roles
Domain expert, knowledge engineer, end user. Acquisition is the interview; its cost lives on the hybrid page.
Shell
Empty engine. Load a KB and you have an expert system. Heuristic here means a rule of thumb, not h(n).

Practise Expert Systems

Reading is free and needs no account. Practice, mocks and progress live in the app.

  • 2 quick checks with worked explanations
  • Timed mocks scored with the real marking scheme
  • Readiness tracked per topic, kept on your device
Continue with Google — freeNo card, no trial. Works offline once installed.