An expert system is a program that stores a specialist's knowledge as IF-THEN rules in a knowledge base and applies them with an inference engine to give advice on one narrow problem. The best-documented example is MYCIN, built at Stanford in the 1970s to advise on antibiotic treatment of infections, and in a blinded study published on September 21, 1979, specialists rated its antimicrobial choices acceptable in 65 percent of evaluations. Every conclusion can be traced back to a readable rule, which separates this approach from a neural network.
Key takeaways
- An expert system has two main parts: a knowledge base of rules and an inference engine that applies them.
- Forward chaining starts from known facts; backward chaining starts from a goal and asks only for the facts it needs.
- MYCIN attached a certainty factor between -1 and +1 to rule conclusions instead of treating every rule as certain.
- MYCIN scored well in a 1979 evaluation but was never used routinely in patient care, for practical reasons rather than poor advice.
- Rule-based tools such as NASA's CLIPS are still documented and maintained, though most current AI products learn from data instead.
Knowledge base, inference engine, and the parts around them
The developers of MYCIN, in the opening chapter of their 1984 book, described the core of an expert system as a knowledge base and an inference mechanism, with extra programs for the user interface, explanation, and building the knowledge base. In MYCIN the knowledge was mostly conditional statements of the form "if A and B are true, conclude that C is true." The original version held 200 such rules, each written as a premise and an action. One example, translated into English from the program's internal LISP code, said that if an organism stains gram-negative, is rod-shaped, and grows with oxygen, there is strongly suggestive evidence (0.8) that it belongs to the class Enterobacteriaceae.
Keeping the rules apart from the code that runs them is the main design idea. A specialist can inspect a rule, dispute it, and change it without rewriting the program, and the explanation module can show which rules produced an answer. The same team had worked on DENDRAL, a chemistry program started in the mid-1960s by Joshua Lederberg and Edward Feigenbaum that was the first to put specialized knowledge ahead of general problem-solving methods.
Forward and backward chaining on a small example
The inference engine decides which rule to try next. Two strategies dominate. Forward chaining, also called data-directed inference, starts with the known facts and fires every rule whose conditions are met until a conclusion appears. Backward chaining, also called goal-directed inference, starts with a goal and works back through the rules to find the data that would establish it. MYCIN used backward chaining as its main strategy, which is why it behaved like an evidence-gathering program that asks questions.
The following three rules are an invented, deliberately simple repair advisor, an illustrative example and not a real product.
- Rule 1: IF the lamp is dark AND another device on the same outlet works THEN the outlet has power.
- Rule 2: IF the outlet has power AND the bulb is intact THEN the fault is in the switch or cord.
- Rule 3: IF the fault is in the switch or cord THEN recommend inspecting the switch and cord.
| Step | Forward chaining | Backward chaining |
|---|---|---|
| Start | Facts: lamp is dark, radio on the outlet works, bulb is intact | Goal: find a recommendation |
| First rule used | Rule 1 fires: outlet has power | Rule 3 needs a fault in the switch or cord |
| Second rule used | Rule 2 fires: fault is in the switch or cord | Rule 2 needs power at the outlet and an intact bulb |
| Third rule used | Rule 3 fires: inspect switch and cord | Rule 1 needs a dark lamp and a working device on the outlet |
| Questions to the user | None, all facts were supplied first | Three, asked only when a rule needs the answer |
Both routes reach the same advice. The difference is who supplies the data: the forward engine reacts to what it is given, while the backward engine decides what to ask, which suits a consultation with a person who has not yet said everything relevant.
Certainty factors: rules that are not all-or-nothing
Medical knowledge is rarely definite, so MYCIN let each inference carry a certainty factor, a number from -1 to +1 that adjusts the strength of the conclusion. Its therapy rules produced ranked drug lists with scores attached rather than a single answer. The scheme was designed as a practical way to combine uncertain evidence, and the MYCIN book devotes a chapter to how it relates to probability theory.
What the 1979 evaluation showed and why MYCIN stayed in the lab
In a study in the Journal of the American Medical Association, eight evaluators with expertise in meningitis compared MYCIN's antimicrobial choices with those of nine human prescribers on 10 test cases. MYCIN received a 65 percent acceptability rating, while the five faculty specialists among the prescribers ranged from 42.5 to 62.5 percent. The system never failed to cover a treatable pathogen. The sample was small, so the result shows promise on a narrow task rather than general superiority.
The program still never entered routine practice. The developers wrote that they judged it likely to be unacceptable for reasons separate from its decision quality. They saw no strong felt need among individual physicians, found it hard to fit into daily work because a doctor had to find a terminal, log on, and type answers, and expected that a consultation on a heavily loaded shared computer could take 30 minutes to an hour. As of late 1978 MYCIN became a static system kept for demonstrations and student projects.
Where rule-based systems stand now
Rule-based programming did not disappear. NASA's Johnson Space Center developed CLIPS, the C Language Integrated Production System, from 1985 to 1996, and it has been public domain software since 1996, with documentation still published for version 6.4.2. The approach fits problems where the rules are known, stable, and need to be audited. It fits poorly where the rules cannot be written down, such as recognizing a face, which is why learning from data took over perception and language tasks.
Common misconceptions checklist
- An expert system is not a chatbot: it follows authored rules and cannot answer outside them.
- It does not learn from use: changing its behavior means editing rules or adding new ones.
- A high score on a narrow test is not a clinical approval and does not mean the tool is safe in a hospital.
- Rules are not always certain: certainty factors exist because the knowledge itself is uncertain.
- Older does not mean useless: transparency and auditability are real strengths of rule-based design.
FAQ
What is the difference between an expert system and machine learning?
An expert system applies rules written by people, while machine learning fits a model to examples. The first is easier to explain line by line, and the second handles tasks where the rules cannot be written out.
What is an inference engine?
It is the part of the program that selects which rule to apply next and combines the results into a conclusion. Forward and backward chaining are the two standard ways it can do that.
Was MYCIN ever used on real patients?
Its authors state that it was never used routinely in patient-care settings. It was tested against specialists on written test cases and kept for demonstrations and student work.
Are expert systems still built?
Rule engines and tools such as CLIPS remain available and documented. New AI products for open-ended language and image tasks mostly use learned models instead.
Related reading
- A beginner's learning path for AI
- AI decision support systems
- How computer vision learns from images
- A modern learned system compared: ChatGPT and Claude
More in AI Basics.
Last verified: October 2026
Sources
- Buchanan BG and Shortliffe EH (eds.), Rule-Based Expert Systems: The MYCIN Experiments of the Stanford Heuristic Programming Project, Chapter 1, The Context of the MYCIN Experiments, Addison-Wesley, 1984
- Shortliffe EH, Details of the Consultation System (Chapter 5), in the same volume, 1984
- Human Engineering of Medical Expert Systems (Chapter 32), in the same volume, 1984
- Yu VL et al., Antimicrobial selection by a computer: a blinded evaluation by infectious diseases experts, JAMA 242(12):1279-1282, September 21, 1979
- CLIPS: A Tool for Building Expert Systems, NASA Johnson Space Center project site, accessed October 2026