Expert System Architecture Part 1

Expert systems in artificial intelligence are computer systems that replicate the decision-making capabilities of human experts. They aim to solve complex problems using knowledge-based reasoning rather than following predetermined procedures. These systems emerged in the 1970s and became increasingly popular in the 1980s. The structure of an expert system differs from traditional programming in that it is composed of a fixed inference engine and a variable knowledge base. When running, the engine utilizes the knowledge base to reason like a human expert. Eventually, a third component was added in the 80s: a dialogue interface to allow for communication with users. This feature later became known as “conversational”.

13.1 Expert System Architecture

The usual components found in expert systems are the following four:

  • Knowledge-Acquisition Interface
  • User Interface
  • Knowledge Base
  • Inference Engine

Expert systems have several characteristics that result from their architecture, which is notably different from traditional computer programs.

Knowledge-Acquisition Interface

The interface for acquiring knowledge governs how the expert and knowledge engineer work with the program to integrate learning into the knowledge base. It provides tools to assist experts in expressing their knowledge in a format the computer can analyze. This process of representing knowledge in the knowledge base is called knowledge acquisition.

Acquiring knowledge can be difficult; some experts even call it a bottleneck in developing expert systems because of the time and effort it takes.

When debugging faulty knowledge bases, it can be helpful to use traces, lists of rules fired in order, and probes, which are commands used to find and edit specific rules and facts. Additionally, bookkeeping functions and indexes can be used to keep track of various knowledge base features, such as variables and regulations.

Some rule-based expert system shells designed for personal computers oversee data entry and verify the syntax of rules.

Regarding expert systems, it’s essential to validate their predictions by testing them against those of human experts. One way to do this is by using case facilities, which can help speed up the validation process by storing a file of claims and automatically evaluating them after the program is revised. User-friendly features like on-screen help and explanations are also beneficial for developers of expert systems and are often included in knowledge-acquisition interfaces. The literature on expert plans demonstrates a wide range of modes of knowledge acquisition, with expert system shells on microcomputers typically requiring users to enter rules explicitly or provide examples of cases with appropriate conclusions for the program to infer a direction.

User Interface

When using a program, the user interface is the component that communicates with the user. It will request the necessary information to solve a problem, present any findings, and justify its logic.

The user interface typically encompasses the following features:

  • Do not ask “dumb” questions
  • Explains its reasoning on request
  • Provides documentation and references
  • Defines technical terms
  • Permits sensitivity analyses, simulations, and what-if analyses
  • Detailed report of recommendations
  • Justifies recommendations
  • Online help
  • Graphical displays of information
  • Trace or step through reasoning

The effectiveness of a user interface can be evaluated based on how closely it mimics the interaction between a human expert and someone seeking their advice.

Knowledge Base

A knowledge base contains specific knowledge related to a particular subject matter and differs from a database in that it comprises both explicit and implicit learning. Though not stated directly, much of the knowledge in the knowledge base is deduced by the inference engine from the direct statements present in the knowledge base. This makes knowledge bases more efficient in data storage than databases, enabling them to represent all the knowledge implied by explicit learning statements comprehensively.

The types of knowledge they can contain are pretty varied regarding knowledge bases. The process of acquiring this knowledge, or knowledge acquisition as it’s called, can differ based on the type of knowledge being sought.

Types of Knowledge

I’ve found that expert systems take into account a variety of knowledge types. These knowledge types may be acquired differently depending on what is being sought. In particular, many dimensions of learning contrast with each other and are considered in expert systems.

  • Explicit knowledge
  • Implicit knowledge
  • Domain knowledge
  • Common sense or world knowledge
  • Heuristics
  • Algorithms
  • Procedural knowledge
  • Declarative or semantic knowledge
  • Public knowledge
  • Private knowledge
  • Shallow knowledge
  • Deep knowledge
  • Meta knowledge

Another View of Expert System Architecture

The figure below depicts the crucial modules that constitute a rule-based expert system. The system has an interface that enables users to interact via menus, natural language, or any other form of communication. An inference engine is then utilized to apply expert knowledge obtained from an expert and data about the problem at hand. This specialized knowledge is generally in the form of IF-THEN rules. The data specific to the case includes user-provided data and partial conclusions (with certainty measures) derived from this data. In a simple forward chaining rule-based system, the case-specific data comprises the elements in working memory.

Most expert systems come equipped with an explanation subsystem, allowing the program to clarify its reasoning to the user. Additionally, specific techniques may include a knowledge base editor, which aids the expert or knowledge engineer in efficiently updating and verifying the knowledge base.

Expert systems are designed to separate domain-specific knowledge from more general-purpose reasoning and representation techniques. The purpose bit, available in the expert system shell, is responsible for this separation. As shown in the figure, the body of the expert system provides an inference engine, a knowledge representation scheme, a user interface, an explanation system, and sometimes, a knowledge base editor. When faced with a new problem, such as car design, we can find a shell that provides the necessary support for the problem. All that is needed is to provide expert knowledge. Various commercial expert system shells are available, each suitable for a slightly different range of issues. Writing specialist system shells and developing expert systems using them are both part of the work involved in the industry.

Using shells to create expert systems is advisable as it significantly reduces the development cost and time compared to building the expert system from the ground up.

Self Assessment

Please indicate whether the statements that follow are accurate or inaccurate:

  1. Expert systems generally consist of two main components.
  2.  Using expert system shells on microcomputers.
  3.  The user interface is the component of the program that enables the user to interact with it.

13.2 Rule-based Systems

When solving complex problems, expert systems often use heuristics, processes that usually lead to the correct solution but may sometimes fail. Unlike conventional problem-solving computer programs, expert systems rely on human expert knowledge to solve real-world problems that typically require human intelligence. This knowledge is usually represented as rules or data within the computer and can be recalled to solve problems depending on the situation. Rule-based expert systems have become essential to modern intelligent systems and have numerous applications, including strategic goal setting, planning, design, scheduling, fault monitoring, and diagnosis. Recent technological advancements allow users to access dozens of commercial software packages with user-friendly interfaces (Ignizio, 1991).

Traditional computer programs rely on decision-making logic with limited knowledge beyond the basic algorithm to solve a problem. This basic understanding is typically included in the program’s code, which means that if the knowledge changes, the program must be rebuilt.

Do you know that knowledge-based expert systems gather small pieces of human expertise into a knowledge database to solve problems using appropriate knowledge?

One significant benefit of expert systems is their ability to solve different problems within the same knowledge base domain without additional programming efforts. In addition, these systems can explain their reasoning process and handle levels of confidence and uncertainty, which traditional algorithms do not account for (Giarratano & Riley, 1989). The following are some crucial advantages of expert systems:

  • The capability to record and conserve invaluable human experiences.
  • The capability to create a system that is more reliable than human experts.
  • Reduce the requirement for human expertise across multiple locations simultaneously, particularly in hazardous and hostile environments that pose a risk to human health.
  •  It is possible to create solutions faster with the help of technology than relying solely on human experts.

Here is a breakdown of the critical components of an expert system. The knowledge base is a repository of essential details, data, rules, cases, and connections that the professional system utilizes. Multiple human experts’ knowledge can be combined into a single knowledge base. A law is a conditional statement that connects specific conditions to actions or outcomes.

One way to store and organize knowledge in a knowledge base is through using frames. These frames connect an object or item to multiple pieces of information or values. This method of representation is beneficial for object-oriented programming. When expert systems use frames to store knowledge, they are known as frame-based expert systems.

The inference engine’s main objective is to gather information, establish connections from the knowledge base, and present them as answers, predictions, and suggestions similar to a human expert’s. To achieve this, the inference engine must accurately identify the relevant facts, interpretations, and rules and organize them accordingly.

There are two commonly used methods of inference. Backward chaining involves starting with the conclusions and working backwards to find the supporting facts. On the other hand, forward chaining consists of starting with the points and working towards the findings.

13.2.1 Forward Chaining (Data-driven Rule-based Expert Systems)

A rule-based system comprises if-then laws, facts, and an interpreter that controls the application of laws based on the points. The conditional statements of if-then rules formulate the complete knowledge base. A single if-then rule is ‘if x is A, then y is B’, where ‘x is A’ is the antecedent or premise, and ‘y is B’ is the consequent or conclusion. Rule-based systems use two inference engines: forward chaining and backward chaining. The forward chaining system processes initial facts first and uses rules to derive new findings based on those facts. In a backwards chaining system, we process the hypothesis or goal first and search for laws that allow us to reach that hypothesis. As processing progresses, new subgoals are set for validation. Data drives are forward chaining systems, while goal drives are backward chaining systems. For example, consider the following set of if-then rules.

Rule 1: Y will also be true if A and C are true.

Rule 2: Z will also be true when A and X are true.

Rule 3: If B is true, then X will follow.

Rule 4: If Z is true, then D must also be true.

We need to prove that D is true, given that A and B are true. To apply forward chaining, we begin with Rule 1 and continue downwards until we find a rule that triggers. In the first iteration, only Rule 3 triggers. We can then conclude that A, B, and X are true. In the second iteration, we use this information to our advantage. Rule 2 then triggers, and we add Z to the mix. This allows Rule 4 to start, and we have successfully proven that D is valid. The forward chaining strategy is beneficial when data is expensive to collect but there is only a tiny quantity. However, it’s essential to exercise caution when constructing these rules.

13.2.2 Backward Chaining (Goal-driven Rule-based Expert Systems)

A rule-based system comprises if-then rules, a set of facts, and an interpreter that controls the application of rules based on the given points. These if-then rule statements make up the conditional statements of the entire knowledge base. To create an if-then rule, it is essential to follow the specific format of “if x is A, then y is B.” The premise, also known as the antecedent, is the statement “x is A,” while the conclusion, or consequent, is “y is B.” To implement such rules, rule-based techniques rely heavily on two inference engines: forward chaining and backward chaining methods. These engines efficiently determine the appropriate conclusion based on the given premise, making them crucial in effectively utilizing if-then rules. In a forward chaining system, the initial facts are processed first, and new conclusions are drawn based on those facts using the laws. In a backward chaining system, the goal or solution we want to achieve is processed first, and we search for laws that would allow us to reach that goal. As the processing continues, new subgoals are set for verification. Forward-chaining systems are primarily data-driven, while backwards-chaining systems are goal-driven. To illustrate, consider the following set of if-then rules.

Rule 1: If A and C, then Y

Rule 2: Z must also be true if A and X are true.

Rule 3: If B is true, then X will follow.

Rule 4: If Z is true, then D must also be true.

We must prove that D is true, assuming A and B are true. To do this using forward chaining, we start with Rule 1 and move down the list until we find a rule that applies. In this case, only Rule 3 applies on the first try. After this iteration, we know that A, B, and X are true. We use this information in the second iteration, where Rule 2 applies. This allows us to add Z, which triggers Rule 4 and proves that D is valid. Forward chaining is a good strategy when data is complex but there is a small amount of it. However, it’s essential to be careful when creating these rules.

Self Assessment

Please indicate whether the statements provided are accurate or inaccurate.

  • Specialist knowledge is frequently expressed through rules or data outside of the computer.
  •  Rule-based expert systems have a limited role in modern intelligent systems and their applications.
  •  The role of the inference engine is to retrieve information and connections from the knowledge base.
Picture of Hoa

Leave a Comment