Building an expert system is a project with stages, much like other software, but with special attention to knowledge.
Stage 1: Problem Selection
The first task is to choose a problem that suits an expert system. It should need expertise that is scarce or costly, be narrow and well bounded, be solved by an expert in a few minutes to a few hours, have cooperative experts, and give real benefit. Problems that need common sense, or that have no agreed correct answer, are not suited. A feasibility study compares cost and benefit and sets the scope.
Stage 2: Prototype Construction
A small prototype is built quickly with a few dozen rules, to test whether the approach will work. The knowledge engineer picks a tool or shell, such as CLIPS or a Prolog system, interviews the expert, and enters the first knowledge. The prototype shows the expert and the users what the system will be, and so draws out corrections early.
Stage 3: Formalization
The knowledge is then analysed and organised. The engineer defines the concepts and their relations, selects the representation, such as rules or frames, and designs the control strategy. Doubtful knowledge is checked again with the expert. The result is a clear design for the full system.
Stage 4: Implementation
The design is built into the full knowledge base and the system. Rules are added, the user interface is completed, explanations are added, and the system is linked to other programs and data. It is tested as it grows.
Stage 5: Evaluation
The system is tested against real cases and compared with the experts. Verification checks that the system was built correctly, with no conflicting, redundant or missing rules, and validation checks that it gives the right advice. Users judge it for usefulness and ease of use. Then comes maintenance, because knowledge changes and the system must be updated. The life cycle is iterative, since evaluation often sends the team back to earlier stages.
Definition: Expert system life cycle. The sequence of stages for building an expert system: problem selection, prototype construction, formalization, implementation and evaluation, repeated as needed.
Table 3.2: Stages of the life cycle
| Stage | Main activity | Output |
|---|---|---|
| Problem selection | Choose a suitable problem | Feasibility report |
| Prototype | Build a small version | Working prototype |
| Formalization | Organise the knowledge | Design |
| Implementation | Build the full system | Complete system |
| Evaluation | Test against real cases | Test report |
Example 3.2: Is the problem suitable?
Problem: Which problem is better suited for an expert system: (a) diagnosing faults in a photocopier from the error codes, (b) writing a poem?
Solution:
- The photocopier problem has narrow, well-defined knowledge, experts exist, and answers can be checked.
- Poetry has no fixed rules or correct answer.
Result: (a) is well suited, (b) is not.
Common mistakes
- Choosing a problem that is too broad or has no agreed correct answer.
- Skipping the prototype and building the full system before checking the approach.
- Not planning for maintenance as the knowledge changes.
Key takeaways
- The stages are problem selection, prototype, formalization, implementation and evaluation.
- A suitable problem is narrow and needs scarce expertise.
- Verification checks the build, validation checks the advice.
- The life cycle is iterative.
Practice questions
- Name the stages of the expert system life cycle.
- What is the purpose of a prototype?
- Distinguish verification and validation.
Answers to the practice questions
- Problem selection, prototype construction, formalization, implementation and evaluation.
- To test the approach quickly with a small version and draw out early corrections.
- Verification checks that the system is built correctly, validation checks that it gives the right advice.
Sources
- Official BCA syllabus Artificial Intelligence and Expert Systems, course code 25BCA405DS02, Unit III
