Rule-Based Expert Systems

A rule-based expert system applies explicit rules to facts about a particular case to produce a conclusion or recommendation. You encounter these systems when a business needs consistent decisions within a defined domain, such as routing warranty claims or checking purchasing exceptions. Their usefulness depends on how well the rules represent the relevant expertise and how accurately the case facts describe the situation.

Components and rule structure

A knowledge base stores domain knowledge, commonly as IF–THEN rules. Each rule connects conditions to a conclusion or action. For example: IF a purchase exceeds the department's approval limit AND manager approval is absent, THEN refer the purchase for review. When conditions are joined by AND, every condition needs support before the rule applies.


The inference engine matches rules against available facts and applies eligible rules. Applying a rule is often called firing it. A rule may produce an intermediate fact that enables another rule, rather than immediately producing a final recommendation.


Working memory holds the facts for the current case, including facts supplied by a user or business system and conclusions derived during reasoning. Keeping case facts separate from general rules lets the same knowledge base handle different cases.


A rule base and case facts feed an inference engine that produces a recommendation and an explanation.


An explanation facility can report which facts and rules supported a recommendation. This makes the reasoning inspectable, but it does not establish that the underlying rules or inputs are correct.

Two ways to reason with rules

Forward chaining starts with known facts. The engine finds applicable rules, derives conclusions, and continues until a stopping condition is reached. Depending on the implementation, it may stop when it reaches a target or when no further relevant conclusions follow.


Backward chaining starts with a proposed conclusion. The engine identifies rules that could establish it, then checks their conditions. Those conditions may become subgoals requiring other rules or additional information.


Reasoning method

Starting point

Direction of investigation

Business example

Forward chaining

Available case facts

Determine what follows

Route a submitted service request

Backward chaining

A proposed conclusion

Determine what would support it

Check whether an order qualifies for expedited handling


Neither method makes a weak rule more reliable. They organize how the system searches through the available knowledge.



Missing information, conflicts, and maintenance

A missing fact is not automatically false. For example, an unrecorded inspection result does not establish that an inspection failed. In a system that treats missing information as unknown, a rule requiring a passed inspection remains unsupported until that fact is established.



Several rules may be applicable at once. This is harmless when their conclusions are compatible, but competing actions require a defined conflict-resolution policy. A business might give a safety-related rule priority over a routine-processing rule. Rule order, specificity, or priority should influence the result only when the implementation explicitly defines that behavior.


Rules need maintenance as policies and operating conditions change. Domain specialists help formulate the knowledge, while system developers translate it into precise conditions and conclusions. Testing should include ordinary cases, exceptions, threshold cases, missing information, and competing rules. A policy update should trigger checks of existing rules as well as newly added ones.


A rule-based expert system does not automatically acquire expertise simply because more cases pass through it. Its recommendations remain bounded by its encoded knowledge, input quality, and defined handling of exceptions. Where those boundaries are reached, referral to a person can be an appropriate designed outcome.

What to remember

  • The knowledge base stores rules; the inference engine applies them to case facts.
  • Forward chaining starts with facts; backward chaining starts with a goal.
  • Unknown facts need explicit handling, and competing actions need a resolution policy.
  • Explanations support inspection; validation and maintenance support dependable use.

Example: Routing a Return with Competing Rules

A retailer uses a rule-based expert system to recommend a return-processing route. Its rules are:

  • R1: IF the return is within 30 days of purchase AND the receipt is verified, THEN the return is policy-eligible.
  • R2: IF the return is policy-eligible AND the package is unopened, THEN recommend routine processing.
  • R3: IF the return is policy-eligible AND product damage is reported, THEN recommend specialist review.

If R2 and R3 both apply, the system selects R3's recommendation. Unknown facts do not satisfy rule conditions. These are the only relevant rules.


A customer brings an unopened product back 18 days after purchase. The receipt is verified, and the customer reports product damage.


a) Identify the supplied facts and determine whether R1 can fire.


The supplied facts are that the return occurs 18 days after purchase, the receipt is verified, the package is unopened, and product damage is reported. Policy eligibility is not a supplied fact; it must be derived.


First compare the elapsed time with the rule's limit: 18≤3018 \leq 30 days. The return is therefore within the permitted window. Receipt verification is also established. Both conditions of R1 are satisfied, so R1 fires and adds policy-eligible to working memory.


b) Continue the rule trace and determine the final recommendation. Explain the result to the customer-service employee.


After R1 fires, policy eligibility is available as a derived fact. R2 requires ________ and an ________; both are established, so it recommends routine processing. R3 requires policy eligibility and ________; both are also established, so it recommends specialist review.


The two routing rules therefore compete. The stated priority gives R3 precedence over R2, making specialist review the final recommendation.


An appropriate explanation is: the verified receipt and return within 30 days established policy eligibility. Although the unopened package supported routine processing, reported damage triggered the higher-priority specialist-review rule. This trace explains the route; it does not itself establish whether the reported damage is genuine.


c) Consider a new evaluation of the same return in which receipt verification is unknown. Clear the previous derived facts before reasoning again. What can the system conclude, and what information should it seek?


Start again with only the revised supplied facts. The return is within 30 days, the package is unopened, and damage is reported, but receipt verification is unknown.


R1 requires both a return within the time window and a verified receipt. Its receipt condition is unsupported, so R1 cannot establish policy eligibility. R2 and R3 each require policy eligibility, so neither routing rule can fire.


The result is no supported processing route under the supplied rules. The system should seek receipt verification or refer the case for information gathering under a separately defined procedure. Unknown verification does not establish that the receipt is invalid or that the return is ineligible. Clearing the earlier derived eligibility fact prevents an outdated conclusion from influencing the new evaluation.

A retailer uses a rule-based expert system to route product returns. One component stores general return rules, another holds the current customer's facts, and another selects and applies rules whose conditions are satisfied. What is the component that selects and applies the rules?

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

A retailer is developing an expert system to help employees assess warranty claims. Match each project role to its primary contribution. One person may perform more than one role.

Match each term
A.

Enters details of individual claims and uses the resulting recommendations during everyday work

B.

Supplies specialist judgment about warranty decisions, including exceptions and practical rules of thumb

C.

Elicits specialist reasoning and translates it into explicit conditions and conclusions the software can apply

Domain expert

End user

Knowledge engineer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

A distributor's rule-based expert system has these rules:

  • R1: IF a customer's delivery address is verified, THEN dispatch details are complete.
  • R2: IF dispatch details are complete AND stock is available, THEN the order is ready for dispatch.
  • R3: IF the order is ready for dispatch AND the carrier is booked, THEN release the order.

The address is verified and stock is available. Whether the carrier is booked is unknown. No other rules or facts apply. Which conclusion does forward chaining support?

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

Extra Practice