KBS : Knowledge-Based System Design

  KBS Design 1 KBS : Knowledge-Based System Design

  Chapter 3: Software processes ‹ waterfall model

  ‹

  Chapter 17: Implementing the Expert System

  ‹

  Chapter 18: Organizational and Managerial Impact [Durkin 1994] ‹

  Chapter: 8: Designing Backward-Chaining Rule-Based Systems ‹

  Chapter 10: Designing Forward-Chaining Rule-Based Systems ‹ Chapter

  15 : Designing Frame-Based Expert Systems

  ‹

  Chapter 18: Knowledge Engineering KBS Design 3 Material [Sommerville 2001]

  ‹

  ‹ evolutionary development ™

  ‹

  spiral model

  ‹ formal methods ‹ reuse-based methods

  ‹

  Chapter 8: Software prototyping ‹ rapid prototyping techniques

  [Jackson 1999]

  ‹

  Chapter 14, 15: Constructive Problem Solving

  ‹

  Chapter 16: Designing for Explanation KBS Design 4 Motivation ‹ reasons to study the concepts and methods in the chapter

  ‹ main advantages ‹ potential benefits

  Chapter 15: Verification and Validation

  Chapter 5: Expert System Development Life Cycle

  ‹ Motivation ‹

  ‹ Software Engineering and

  Objectives

  ‹

  Chapter Introduction ‹ Review of relevant concepts ‹

  Overview new topics ‹ Terminology

  ‹

  ES Development Life Cycle ‹ Feasibility Study ‹

  Rapid Prototype ‹

  Refined System ‹ Field Testable ‹

  Commercial Quality ‹

  Maintenance and Evolution

  ES Design ‹ Software Development Life

  ‹

  Cycle

  ‹ Linear Model ES Life Cycle

  ‹ Planning

  ‹ Knowledge Definition ‹ Knowledge Design

  ‹ Knowledge Verification

  ‹ Important Concepts and

  Terms

  ‹ Chapter Summary

  KBS Design 2 Material

  [Awad 1996]

  ‹ understanding of the concepts and methods

‹

relationships to other topics in the same or related courses

  KBS Design 5 Objectives

  ‹ planning, scheduling, chronicling, analysis

  experts/expertise

  ‹

  hardware/software

  ‹ users ‹

  sponsors/funds KBS Design 8

  Project Management ‹ activity planning

  ‹ product configuration management

  ‹ availability of resources for the development

  ‹

  product management

  ‹

  change management

‹

resource management

  ‹ need determination ‹

  acquisition resources

  ‹

  ‹ not all problems are amenable to ES-based solutions

  ‹ regurgitate

  evaluate ‹ application of methods to scenarios or tasks

  ‹ basic facts and concepts

  ‹ understand

  ‹ elementary methods ‹ more advanced methods

  ‹ scenarios and applications for those methods

  ‹ important characteristics ™

  differences between methods, advantages, disadvantages, performance, typical scenarios ‹

  ‹

  ‹ it should be verified that expert systems are the right paradigm to solve that type of problem

  apply ‹ methods to simple problems

  KBS Design 6 ES Development Methods

  

‹

commercial quality systems require a systematic development approach

  ‹ ad hoc approaches may be suitable for research

  prototypes or personal use, but not for widely used or critical systems ‹ some software engineering methods are suitable for the development of expert systems

  KBS Design 7 Problem Selection

  ‹ the development of an expert system should be based on a specific problem to be addressed by the system

  ‹ assignment of responsibilities ‹ identification of critical resources

  KBS Design 9 ES Development Stages

  KBS Design 11 Knowledge Errors

  incorrect knowledge, inappropriate solutions, solutions not found ‹ remedy

  ‹

  expert misinterprets questions from the knowledge engineer ‹ consequences

  ‹

  the domain expert stated

  ‹ knowledge engineer encodes rules that do not reflect what

  Semantic Errors

‹

problem: the meaning of knowledge is not properly communicated

  ™ may be expensive KBS Design 12

  ‹ validation and verification of the knowledge

  wrong conclusions ‹ remedy

  ‹ existing solution not found ‹

  inadequate formulation of the knowledge by the expert ‹ consequences

  ‹ reflection of expert’s genuine belief ‹ omission of important aspects ‹

  ‹ problem: knowledge provided by the expert is incorrect or incomplete

  ‹ syntax errors ‹ inference engine errors ‹ inference chain errors ‹ limits of ignorance errors

  ‹ feasibility study

  ‹ system tested by selected end users

  ‹ paper-based explanation of the main idea(s) ‹ no implementation

  ‹

  rapid prototype ‹ quick and dirty implementation of the main idea(s)

  ‹

  refined system ‹ in-house verification by knowledge engineers, experts

  ‹ field test

  ‹ commercial quality system

  ‹ semantic errors

  ‹ deployed to a large set of end users

  ‹ maintenance and evolution

  ‹ elimination of bugs

  ‹ additional functionalities

  KBS Design 10 Error Sources in ES Development

  ‹ knowledge errors

  ‹ formalized protocol for knowledge elicitation ‹ validation of the knowledge base by domain experts

  KBS Design 13 Syntax Errors

  validation and verification of the tools used KBS Design 15

  ‹

  ‹ remedy

  ‹ inappropriate confidence in conclusions ‹ incorrect conclusions

  expertise ‹ consequences

  ‹ human experts usually are aware of the limits of their

  ‹ problem: the expert system doesn’t know what it doesn’t know

  KBS Design 16 Limits of Ignorance Errors

  ‹ formal validation and verification ‹ use of a different inference method

  inappropriate conclusions ‹ remedy

  ‹

  rules, interactions between rules, uncertainty, non- monotonicity ‹ consequences

  ‹ causes: errors listed above; inappropriate priorities of

  Inference Chain Errors ‹ problem: although each individual inference step may be correct, the overall conclusion is incorrect or inappropriate

  ‹

  ‹ problem: rules or facts do not follow the syntax required by the tool used

  ‹ remedy

  ‹ incorrect solutions ‹ existing solutions not found

  system crash

  ‹

  ‹ consequences

  resource limitations ™ e.g. memory

  ‹ bugs ‹

  Inference Engine Errors

‹

problem: malfunctions in the inference component of the expert system

  syntax checking and debugging tools in the ES development environment KBS Design 14

  ‹

  ‹ solutions

  ‹ knowledge can’t be used

  ‹ consequences

  ‹ knowledge engineer is not familiar with the method/tool ‹ syntax not clearly specified

  meta-reasoning methods that explore the limits of the knowledge available to the ES KBS and Software Engineering Generic Software Process Models ‹ software process models ‹ waterfall model

  ‹ waterfall ‹ separate and distinct phases of specification and

  ‹

  spiral development

  ‹ use of SE models for ES development

  

‹

evolutionary development

  ‹ ES development models

  ‹ specification and development are interleaved ‹ evolutionary model

  ‹ formal systems development

  ‹

  incremental model

  ‹

  a mathematical system model is formally transformed to an

  ‹ spiral model

  implementation ‹ reuse-based development

  ‹

  the system is assembled from existing components KBS Design 17 [Sommerville 2001] KBS Design 18

  Suitability of Software Models for Waterfall Model ES Development

  Requirements definition

  ‹ the following worksheets help with the evaluation of software

  models for use in the development of expert systems System and

  ‹ identify the key differences between conventional software software design development and ES development

  ™

  with respect to a specific model

  Implementation and unit testing ‹ what are the positive and negative aspects of the model for ES development

  Integration and ‹ evaluate the above issues, and give the model a score system testing ™

  10 for perfectly suited, 0 for completely unsuitable

  ‹ determine the overall suitability Operation and

  ™

  high, medium low

  maintenance ™

  explanation

  [Sommerville 2001] KBS Design 19 KBS Design 20

  Evolutionary Development Evolutionary Development Concurrent

  ‹ exploratory development activities

  ‹ objective is to work with customers and to evolve a final

  system from an initial outline specification. should start Initial Specification version with well-understood requirements

  ‹ throw-away prototyping Outline Intermediate

  ‹

  objective is to understand the system requirements. should Development description versions start with poorly understood requirements

  Final Validation version

  [Sommerville 2001] KBS Design 21 [Sommerville 2001] KBS Design 22 Incremental Development Incremental Development

  ‹ development and delivery is broken down into increments

  ‹ each increment delivers part of the required functionality

  Design system Define outline Assign requirements requirements to increments architecture

  ‹ user requirements are prioritised

  ‹

  the highest priority requirements are included in early Integrate Validate

  Develop system Validate increments increment system increment increment Final

  ‹ once the development of an increment is started, the system System incomplete requirements are frozen

  ‹

  requirements for later increments can continue to evolve [Sommerville 2001] KBS Design 23 [Sommerville 2001] KBS Design 24

  Spiral Development Spiral Model Sectors ‹

  

‹

process is represented as a spiral rather than as a for quadrants in the coordinate system represent sequence of activities with backtracking specific aspects

  ‹ each loop in the spiral represents a phase in the process. ‹ objective setting

  ™ specific objectives for the phase are identified

  ‹ no fixed phases such as specification or design

  ™ loops in the spiral are chosen depending on what is required ‹ risk assessment and reduction

  ™ risks are assessed and activities put in place to reduce the key risks

  ‹ risks are explicitly assessed and resolved throughout the ‹

  process development and validation

  ™ a development model for the system is chosen which can be any of ‹ similar to incremental development the generic models

  ‹ planning

  ™ the project is reviewed and the next phase of the spiral is planned [Sommerville 2001] KBS Design 25 [Sommerville 2001] KBS Design 26 Spiral Model

  Formal systems development Determine objectives Evaluate alternatives alternatives and identify, resolve risks constraints Risk

  ‹ based on the transformation of a mathematical analysis Risk specification through different representations to an analysis Risk

  Opera- executable program analysis Prototype 3 tional

  Prototype 2 protoype

‹

transformations are ‘correctness-preserving’

  Risk analysis Proto- REVIEW type 1

  ‹ it is straightforward to show that the program conforms to

  Requirements plan Simulations, models, benchmarks Life-cycle plan its specification Concept of Operation

  S/W Product requirements ‹ embodied in the ‘cleanroom’ approach to software

  Detailed design design Requirement

  Development development validation plan

  Code Unit test Design Integration

  V&V Integration and test plan Plan next phase test Acceptance test Develop, verify Service next-level product

  [Sommerville 2001] KBS Design 27 [Sommerville 2001] KBS Design 28

  KBS Design 29 Formal Transformation Model

  ‹ this approach is becoming more important but still limited experience with it

  overall suitability: high medium low ‹ explanation

  ‹

  Score Evaluation Aspect Model Worksheets

  [Sommerville 2001] KBS Design 32 negative positive key differences

  Requirements modification System validation

  Development and integration System design with reuse

  Requirements specification Component analysis

  [Sommerville 2001] KBS Design 31

  ‹ development and integration

  R2 Formal specification R3

  system design with reuse

  ‹ component analysis ‹ requirements modification ‹

  (commercial-off-the-shelf) systems

‹

process stages

  ‹ systems are integrated from existing components or COTS

  Reuse-Oriented Development

‹

based on systematic reuse

  [Sommerville 2001] KBS Design 30

  Proofs of transformation correctness Formal transformations R1 P1

  Executable program P2 P3 P4 T1 T2 T3 T4

Reuse-oriented development

Generic System Design Process

System Evolution

  KBS Design 33

  Architectural design Abstract specification

  Interface design Component design

  Data structure design Algorithm design System architecture Software specification Interface specification Component specification Data structure specification

  Algorithm specification Requirements specification

  Design activities Design products [Sommerville 2001]

  KBS Design 34

  Assess existing systems Define system requirements

  Propose system changes Modify systems

  New system Existing systems

  [Sommerville 2001] KBS Design 35

  Linear Model of ES Development ‹ the life cycle repeats a sequence of stages

  Knowledge Baseline Design Baseline

  Linear Model Diagram

Product Baseline

Planning Sour ce Id en tif ica tio n & S ele ctio n Ac qui si ti on Anal y si s & E x tra c tio n De fi ni ti on De ta il ed De si gn Code & Checkout Form al Te st Te st Anal y si s Syste m E val uati on Knowledge Definition Knowledge Design Knowledge Verification

  ‹ knowledge design ‹ code & checkout ‹

  Review Fina

  ‹ variation of the incremental model ‹ once iteration of the sequence roughly corresponds to one

  circuit in the spiral model ‹ stages

  Readiness Review

  Review Test

  Interm Revie Prelim. Data

  Test Audit

  ‹

  System Design Review

  Knowledge Review Knowl.

  Work Plan

  ‹ planning ‹

  knowledge definition

  system evaluation KBS Design 36

  knowledge verification

  

Planning Knowledge Definition

  ‹ knowledge source ‹ knowledge acquisition,

  ‹ feasibility assessment identification and selection analysis and extraction

  ‹ resource management

  ‹ source identification ‹ acquisition strategy ‹ ‹ ‹ task phasing source importance knowledge element identification

  ‹ source availability ‹ schedules

  ‹ knowledge classification

  ‹ source selection system

  ‹ high-level requirements ‹ detailed functional layout

  ‹ preliminary functional layout

  ‹ preliminary control flow

  ‹ preliminary user’s manual ‹ requirements specifications

  ‹ knowledge baseline KBS Design 37

  KBS Design 38 Knowledge Design Knowledge Verification

  ‹ knowledge definition ‹ detailed design ‹ ‹

  ‹ knowledge representation ‹ design structure formal tests test analysis ‹ ‹ ‹ ‹ test procedures results evaluation detailed control structure implementation strategy

  ‹ ‹ test reports recommendations

  ‹ internal fact structure ‹ detailed user interface ‹ preliminary user interface ‹ design specifications and report

  ‹ initial test plan

  System Evaluation ‹ detailed test plan

  ‹

  results evaluation ‹ summarized version of the activity from the previous stage

  Code & Checkout

  ‹

  recommendations ‹ as above

  ‹ ‹ coding user manuals

  ‹ validation

  ‹ tests ‹ installation and operations guide

  ‹ system conforms to user requirements and user needs

  ‹ source listings ‹ system description document

  ‹ interim or final report

  KBS Design 39 KBS Design 40

  KBS Design 41 Linear Model Exercise

  ‹

  knowledge representation

  ‹

  knowledge verification

  ‹ limits of ignorance ‹

  linear model ES life cycle

  ‹

  maintenance

  ‹

  rapid prototyping

  reasoning

  knowledge design

  ‹

  rule

  ‹ semantic error ‹

  software development life cycle

  ‹

  spiral development

  ‹

  syntactic error

  ‹

  ‹

  ‹

  ‹ apply the linear model to your team project

  ‹ knowledge and limits of knowledge errors ‹

  ‹ map activities, tasks, milestones and deliverables that you

  have identified to the respective stages in the linear model

  ‹

  use the linear model to sketch a rough timeline that involves two iterations ™ first prototype ™ final system

  ‹ estimate the overhead needed for the application of the

  linear model in our context KBS Design 42

  Summary Expert System Design

‹

the design and development of knowledge-based systems uses similar methods and techniques as software engineering

  ‹ some modifications are necessary ‹ the linear model of ES development is an adaptation of the

  incremental SE model

‹

possible sources of errors are

  syntactical and semantical errors

  knowledge definition

  ‹ inference engine and inference chain errors

  KBS Design 43 Important Concepts and Terms

  ‹ evolutionary development ‹ expert system (ES)

  ‹ expert system shell ‹ explanation ‹ feasibility study

  ‹ inference ‹ inference mechanism ‹

  If-Then rules ‹ incremental development ‹ knowledge

  ‹ knowledge acquisition

  ‹ knowledge base ‹ knowledge-based system

  ‹

  waterfall model