An expert system is a computer program that reproduces the decision-making of a human specialist in a narrow domain by applying an explicit knowledge base of facts and rules through an inference engine. In artificial intelligence, expert systems are the best-known product of symbolic AI: instead of learning patterns from data, they reason over knowledge that engineers elicited from experts and wrote down as logic.
Expert systems dominated applied artificial intelligence from the mid-1970s to the late 1980s, in diagnosis, configuration and credit decisions. Their commercial boom and collapse contributed to the second AI winter, yet their core ideas survive today in business rules engines, clinical decision support and the symbolic half of neuro-symbolic AI.
How an expert system reasons
An expert system reasons by matching rules against known facts and adding the conclusions to its working memory until it reaches an answer. The classic architecture separates what the system knows from how it reasons, so that domain knowledge can be edited without rewriting the reasoning code.
The following table lists the standard components of the architecture and the role each one plays.
| Component | Role | Typical form |
|---|---|---|
| Knowledge base | Stores domain expertise | IF-THEN rules, frames, ontologies |
| Working memory | Holds facts about the current case | Assertions such as patient symptoms |
| Inference engine | Applies rules to facts | Forward or backward chaining |
| Explanation facility | Shows why a conclusion was reached | Trace of fired rules |
| Knowledge acquisition interface | Lets engineers add and test rules | Rule editor, test cases |
| User interface | Asks questions and presents advice | Dialog or form |
Two control strategies drive the inference engine. Forward chaining is data-driven: it starts from known facts and fires every rule whose conditions hold, which suits configuration and monitoring. Backward chaining is goal-driven: it starts from a hypothesis and works back to the facts that would prove it, asking the user only for missing evidence, which suits diagnosis. Production systems with many rules rely on efficient matching algorithms such as Rete, which avoids re-testing every rule on every cycle.
Real expertise is rarely certain, so many systems attach certainty factors, probabilities or fuzzy logic memberships to rules. MYCIN, the Stanford system for bacterial infection therapy, combined certainty factors on a scale from -1 to +1, an approach later criticized as probabilistically inconsistent and largely replaced by Bayesian networks.
Types of expert systems
Expert systems differ mainly in how knowledge is represented and which inference method they use. The choice follows the structure of the expertise being captured.
| Variant | Knowledge representation | Best suited to |
|---|---|---|
| Rule-based system | IF-THEN production rules | Classification, compliance checks |
| Frame-based system | Objects with slots and inheritance | Structured domains with taxonomies |
| Case-based reasoning | Library of solved past cases | Help desks, legal precedent search |
| Model-based system | Causal or physical model of a device | Fault diagnosis in engineered systems |
| Probabilistic system | Bayesian network with conditional probabilities | Medical diagnosis under uncertainty |
| Hybrid system | Rules combined with statistical models | Fraud screening, triage |
Most deployed systems were built with an expert system shell, a reusable inference engine and editor without domain content. Shells such as EMYCIN, OPS5 and later CLIPS let knowledge engineers focus on encoding rules rather than on writing search code.
Expert systems compared with machine learning
An expert system encodes knowledge supplied by people, while machine learning induces knowledge from training data. This single difference explains most of their contrasting strengths and weaknesses.
| Property | Expert system | Machine learning model |
|---|---|---|
| Source of knowledge | Interviews with domain experts | Labeled or unlabeled examples |
| Transparency | High, every rule is readable | Often low, especially for deep learning |
| Data requirement | Little or no data | Large, representative datasets |
| Handling novel inputs | Fails outside encoded rules | Generalizes within the data distribution |
| Maintenance cost | Grows with rule count | Grows with data drift and retraining |
| Auditability | Strong, decisions trace to rules | Requires explainability methods |
Neither approach dominates. Explainability and auditability keep rule-based logic attractive in regulated decisions, whereas perception tasks such as image or speech recognition proved nearly impossible to capture as hand-written rules, an observation echoed by Moravec’s paradox and the bitter lesson.
Building and choosing an expert system
Building an expert system is mostly knowledge engineering: eliciting, structuring, validating and maintaining expert knowledge. Engineers interview specialists, analyze worked cases, draft rules, and then test the rule base against cases with known correct outcomes.
The decision table below summarizes when a symbolic approach is still the sensible choice today.
| Situation | Recommended approach | Reason |
|---|---|---|
| Stable, well-documented regulations | Rules engine | Logic changes rarely and must be auditable |
| Scarce data, available experts | Expert system | Knowledge can be elicited directly |
| Abundant data, fuzzy patterns | Machine learning | Rules cannot capture the variation |
| High-stakes advice needing justification | Hybrid system | Rules constrain and explain model output |
| Language-heavy, open-ended tasks | Foundation model with guardrails | Rules cannot cover open text |
A practical rule base starts small, often with 50 to 300 rules, and grows only with tested cases. Systems such as XCON, used to configure computer orders, eventually exceeded 10,000 rules, which shows both the scalability of the approach and its maintenance burden.
Limitations and failure modes
The central weakness of expert systems is the knowledge acquisition bottleneck: experts struggle to articulate tacit judgment, and every rule must be elicited, written and verified by hand.
- Brittleness: performance collapses abruptly at the edge of the encoded domain instead of degrading gracefully.
- Lack of commonsense reasoning: a system knows only what it was told and cannot notice an absurd input.
- Rule interaction: in large rule bases, new rules silently conflict with old ones, so regression testing is essential.
- Maintenance cost: knowledge decays as practice changes, and the original experts may leave.
- Overstated confidence: certainty factors can look precise while resting on subjective estimates.
These problems, together with expensive specialized hardware, caused many 1980s projects to be abandoned. Modern practice addresses them by keeping rule bases small, versioned and tested, and by combining rules with statistical models where data exists.
A non-technical view
An expert system is like a very detailed rulebook written with the help of a specialist. People ask an experienced doctor, engineer or loan officer how they decide, write down their reasoning as many small if-then steps, and give that rulebook to a computer.
When a new case arrives, the computer checks the facts against the rules, one step after another, until it reaches a recommendation. Because every step is written down, it can explain exactly why it gave its answer. The catch is that it knows only what it was told: if a situation falls outside the rulebook, it cannot improvise the way a human expert can.
A concrete example
A regional insurance company handles about 2,000 small property claims each week. Experienced adjusters agree that most claims follow predictable patterns, so a team of knowledge engineers spends three months interviewing six senior adjusters and encodes their judgment as roughly 240 rules covering policy coverage, damage type, claim amount and fraud signals.
The system uses forward chaining on each new claim. A claim for water damage under 3,000 dollars, on an active policy, with no prior claims in two years, fires a rule chain that recommends automatic approval; a claim filed days after a coverage increase fires a rule that routes it to a human investigator, together with the list of rules that triggered.
After six months, about 60 percent of claims are approved without manual review, and auditors can trace every decision to named rules. Adjusters spend their time on complex cases, and the rule base is reviewed quarterly as policy wording changes.