Knowledge Model Basics Challenges in knowledge modeling Basic knowledge-modeling constructs Comparison to general software analysis
Knowledge model � specialized tool for specification of knowledge- intensive tasks � abstracts from communication aspects � real-world oriented � reuse is central theme Knowledge-modelling basics 2
Relation to other models task selected in feasibility study requirements communication and further detailed in specification model Task and Agent Models for interaction functions organization model knowledge- task model design intensive agent model model task requirements specification knowledge for reasoning functions model Knowledge-modelling basics 3
Knowledge categories � Task knowledge � goal-oriented � functional decomposition � Domain knowledge � relevant domain knowledge and information � static � Inference knowledge � basic reasoning steps that can be made in the domain knowledge and are applied by tasks Knowledge-modelling basics 4
Knowledge model overview Task knowledge task goals DIAGNOSIS (task) task decomposition task control Inference knowledge basic inferences hypothesize verify roles (inference) (inference) Domain knowledge domain types Symptom Disease Test (type) (type) (type) domain rules domain facts Knowledge-modelling basics 5
Example domain: car diagnosis fuse battery fuel tank blown low empty 1 4 5 2 3 6 fuse inspection battery dial gas dial broken zero zero gas in engine false power off 7 8 9 engine behavior engine behavior does not start stops Knowledge-modelling basics 6
Domain knowledge � domain schema � schematic description of knowledge and information types � comparable to data model � defined through domain constructs � knowledge base � set of knowledge instances � comparable to database content � but; static nature Knowledge-modelling basics 7
Constructs for domain schema � Concept � cf. object class (without operations) � Relation � cf. association � Attribute � primitive value � Rule type � introduces expressions => no SE equivalent Knowledge-modelling basics 8
Concept & attribute � “Concept” describes a set of objects or instances � multiple concept hierarchies � along distinct dimensions � can have any number of attributes � Am attribute refers to a value � values are atomic and are defined through a value type � attribute may not refer to another concept � use relation construct Knowledge-modelling basics 9
Example: car concepts fuel tank gas dial status: {full, value: dial-value almost-empty, empty} CONCEPT gas dial; ATTRIBUTES: value: dial-value; CONCEPT fuel-tank; END CONCEPT gas-dial; ATTRIBUTES status: {full, almost-empty, empty}; END CONCEPT fuel-tank; VALUE-TYPE dial-value; VALUE-LIST: {zero, low, normal}; TYPE: ORDINAL; END VALUE-TYPE dial-value; Knowledge-modelling basics 10
Example: apple concept apple has class color: {yellow, yellow-green, green} apple class rusty-surface: boolean greasy-surface: boolean form: {flat, high} Granny Smith: Golden Delicious: apple class apple class Present of England: Grey Reinet: apple class apple class Knowledge-modelling basics 11
Example: car subtypes car observable car state value: universal status: universal observable: boolean visible invisible car state car state observable: {true} observable: {false} gas dial battery dial fuse value: dial value value: dial-value status: {normal, blown} fuse power battery inspection status: {on, engine behavior status: {normal, value: {normal, off} low} broken} status: {normal, does-not-start, fuel tank stops} gas in engine status: {full, status: boolean almost-empty, empty} Knowledge-modelling basics 12
Example: house sub-types residence CONCEPT apartment; CONCEPT house; DESCRIPTION: DESCRIPTION: house apartment "part of of a larger estate"; "a residence with its own territory"; SUB-TYPE-OF: residence; SUB-TYPE-OF: residence; square-meters: natural entrance-floor: natural ATTRIBUTES: ATTRIBUTES: lift-available: boolean entrance-floor: NATURAL; square-meters: NATURAL; lift-available: BOOLEAN; END CONCEPT house; END CONCEPT apartment; Knowledge-modelling basics 13
Relation � typically between concepts, any arity � cardinality specification � special construct for binary relations � relations can have subtypes as well as attributes � reification of a relation is allowed � relation functions as a concept � cf. Association class in UML � a form of higher order relations Knowledge-modelling basics 14
Example: car relation a) car person 0+ 0-1 ownership b) car person owned-by c) car person ownership purchase date: date; Knowledge-modelling basics 15
N-ary relation agent patient name name position diagnosis location observable department type hospital observation value date time Knowledge-modelling basics 16
Modelling rules � “rules” are a common form for symbolic knowledge � do not need to be formal � knowledge analysis is focused on finding rules with a common structure � a rule as an instance of a rule type Knowledge-modelling basics 17
Rule type � models a relation between expressions about feature values (e.g. attribute values) gas-dial.value = zero -> fuel-tank.status = empty � models set of real-world “rules” with a similar structure � dependency is usually not strictly logical (= implication) � specify connection symbol Knowledge-modelling basics 18
Example rule type person loan 1+ restricts name: string amount: integer income: integer interest-rate: number loan constraint person.income <= 10,000 RESTRICTS loan.amount <= 2,000 person.income > 10,000 AND person.income <= 20,000 RESTRICTS loan.amount <= 3,000 Knowledge-modelling basics 19
Rule type structure � <antecedent> <connection-symbol> <consequent> � example rule: fuel-supply.status = blocked CAUSES gas-in-engine.status = false; � flexible use for almost any type of dependency � multiple types for antecedent and consequent Knowledge-modelling basics 20
Rule types for car diagnosis 1 invisible 1 causes car state car state state dependency 1 1 has invisible car manifestation car state observable manifestation rule Knowledge-modelling basics 21
Knowledge base � = conceptual knowledge-base partition � contains instances of knowledge types � rule-type instances = “rules” � structure: � USES: <types used> from <schema> � EXPRESSIONS: <instances> � instance representation: � intuitive natural language – connection symbol � formal expression language (appendix of book) Knowledge-modelling basics 22
Example knowledge base KNOWLEDGE-BASE car-network; USES: state-dependency FROM car-diagnosis-schema, manifestation-rule FROM car-diagnosis-schema; EXPRESSIONS: /* state dependencies */ fuse.status = blown CAUSES power.status = off; battery.status = low CAUSES power.status = off; …. /* manifestation rules */ fuse.status = blown HAS-MANIFESTATION fuse-inspection.value = broken; battery.status = low HAS-MANIFESTATION battery-dial.value = zero; ….. END KNOWLEDGE-BASE car-network; Knowledge-modelling basics 23
Inference knowledge � describes the lowest level of functional decomposition � basic information-processing units: � inference => reasoning � transfer function => communication with other agents � why special status? � indirectly related to domain knowledge � enables reuse of inference Knowledge-modelling basics 24
Example inference: cover dynamic input role inference dynamic output role complaint cover hypothesis my car does not start fuel tank is empty causal static role model fuel tank is empty leads to lack of gas in engine if there is no gas in the engine, then the car does not start Knowledge-modelling basics 25
Inference � fully described through a declarative specification of properties of its I/O � internal process of the inference is a black box � not of interest for knowledge modeling. � I/O described using “role names” Knowledge-modelling basics 26
Knowledge role � Functional name for data/knowledge elements � Name captures the “role” of the element in the reasoning process � Explicit mapping onto domain types � Dynamic role: variant input/output � Static role: invariant input � cf. a knowledge base Knowledge-modelling basics 27
Example inference INFERENCE cover; ROLES: INPUT: complaint; OUTPUT: hypothesis; STATIC: causal-model; SPECIFICATION: "Each time this inference is invoked, it generates a candidate solution that could have caused the complaint. The output thus should be an initial state in the state dependency network which causally ``covers'' the input complaint."; END INFERENCE cover; Knowledge-modelling basics 28
Example dynamic knowledge roles KNOWLEDGE-ROLE complaint; TYPE: DYNAMIC; DOMAIN-MAPPING: visible-state; END KNOWLEDGE-ROLE complaint; KNOWLEDGE-ROLE hypothesis; TYPE: DYNAMIC; DOMAIN-MAPPING: invisible-state; END KNOWLEDGE-ROLE hypothesis; Knowledge-modelling basics 29
Recommend
More recommend