Download presentation
Presentation is loading. Please wait.
Published byEric O’Brien’ Modified over 9 years ago
1
Knowledge Model Basics Challenges in knowledge modeling Basic knowledge-modeling constructs Comparison to general software analysis
2
Knowledge-modelling basics2 Knowledge model n specialized tool for specification of knowledge- intensive tasks n abstracts from communication aspects n real-world oriented n reuse is central theme
3
Knowledge-modelling basics3 Relation to other models organization model task model agent model knowledge- intensive task communication model knowledge model design model requirements specification for interaction functions requirements specification for reasoning functions task selected in feasibility study and further detailed in Task and Agent Models
4
Knowledge-modelling basics4 The term “knowledge” n “information about information” n example: sub-class hierarchy of object types n no hard borderline between information and knowledge ä knowledge is “just“ semantically rich information n target: “knowledge-intensive” systems ä large bulk of meaningful information is present ä scope is broader than traditional KBS
5
Knowledge-modelling basics5 Challenges in specifying knowledge
6
Knowledge-modelling basics6 Structuring a knowledge base
7
Knowledge-modelling basics7 Knowledge categories n Task knowledge ä goal-oriented ä functional decomposition n Domain knowledge ä relevant domain knowledge and information ä static n Inference knowledge ä basic reasoning steps that can be made in the domain knowledge and are applied by tasks
8
Knowledge-modelling basics8 Knowledge model overview
9
Knowledge-modelling basics9 Example domain: car diagnosis
10
Knowledge-modelling basics10 Domain knowledge n domain schema ä schematic description of knowledge and information types ä comparable to data model ä defined through domain constructs n knowledge base ä set of knowledge instances ä comparable to database content ä but; static nature
11
Knowledge-modelling basics11 Constructs for domain schema n Concept ä cf. object class (without operations) n Relation ä cf. association n Attribute ä primitive value n Rule type ä introduces expressions => no SE equivalent
12
Knowledge-modelling basics12 Concept & attribute n “Concept” describes a set of objects or instances n multiple concept hierarchies ä along distinct dimensions n can have any number of attributes n Am attribute refers to a value n values are atomic and are defined through a value type n attribute may not refer to another concept ä use relation construct
13
Knowledge-modelling basics13 Example: car concepts
14
Knowledge-modelling basics14 Example: apple concept
15
Knowledge-modelling basics15 Example: car subtypes
16
Knowledge-modelling basics16 Example: house sub-types
17
Knowledge-modelling basics17 Relation n typically between concepts, any arity n cardinality specification n special construct for binary relations n relations can have subtypes as well as attributes n reification of a relation is allowed ä relation functions as a concept ä cf. Association class in UML ä a form of higher order relations
18
Knowledge-modelling basics18 Example: car relation
19
Knowledge-modelling basics19 N-ary relation
20
Knowledge-modelling basics20 Modelling rules n “rules” are a common form for symbolic knowledge n do not need to be formal n knowledge analysis is focused on finding rules with a common structure ä a rule as an instance of a rule type
21
Knowledge-modelling basics21 Rule type n models a relation between expressions about feature values (e.g. attribute values) gas-dial.value = zero -> fuel-tank.status = empty n models set of real-world “rules” with a similar structure n dependency is usually not strictly logical (= implication) ä specify connection symbol
22
Knowledge-modelling basics22 Example rule type
23
Knowledge-modelling basics23 Rule type structure n n example rule: fuel-supply.status = blocked CAUSES gas-in-engine.status = false; n flexible use for almost any type of dependency ä multiple types for antecedent and consequent
24
Knowledge-modelling basics24 Rule types for car diagnosis
25
Knowledge-modelling basics25 Knowledge base n = conceptual knowledge-base partition n contains instances of knowledge types n rule-type instances = “rules” n structure: ä USES: from ä EXPRESSIONS: n instance representation: ä intuitive natural language –connection symbol ä formal expression language (appendix of book)
26
Knowledge-modelling basics26 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;
27
Knowledge-modelling basics27 Inference knowledge n describes the lowest level of functional decomposition n basic information-processing units: ä inference => reasoning ä transfer function => communication with other agents n why special status? ä indirectly related to domain knowledge ä enables reuse of inference
28
Knowledge-modelling basics28 Example inference: cover
29
Knowledge-modelling basics29 Inference n fully described through a declarative specification of properties of its I/O n internal process of the inference is a black box ä not of interest for knowledge modeling. n I/O described using “role names” ä functional names, not part of the domain knowledge schema / data model n guideline to stop decomposition: explanation
30
Knowledge-modelling basics30 Knowledge role n Functional name for data/knowledge elements n Name captures the “role” of the element in the reasoning process n Explicit mapping onto domain types n Dynamic role: variant input/output n Static role: invariant input ä cf. a knowledge basel
31
Knowledge-modelling basics31 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;
32
Knowledge-modelling basics32 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;
33
Knowledge-modelling basics33 Example static knowledge role KNOWLEDGE-ROLE causal-model; TYPE: STATIC; DOMAIN-MAPPING: state-dependency FROM car-network; END KNOWLEDGE-ROLE causal-model;
34
Knowledge-modelling basics34 Transfer functions n transfers an information item between the reasoning agent and another agent n from the knowledge-model point of view black box: only its name and I/O n detailed specification of transfer functions is part of communication model n standard names
35
Knowledge-modelling basics35 Types of transfer functions
36
Knowledge-modelling basics36 Inference structure n combined set of inferences specifies the basic inference capability of the target system n graphical representation: inference structure n provides constraints for control flow
37
Knowledge-modelling basics37 Example: car inferences
38
Knowledge-modelling basics38 Using inference structures n Important communication vehicle during development process n Often provisional inference structures n Can be difficult to understand because of “vague” (non domain-specific terms) n Often useful to annotate with domain-specific examples
39
Knowledge-modelling basics39 Annotated inference structure
40
Knowledge-modelling basics40 Reusing inferences n Standard set of inferences?! ä difficult subject n See catalog in Ch. 13 n Use as much as possible standard names
41
Knowledge-modelling basics41 Task knowledge n describes goals ä assess a mortgage application in order to minimize the risk of losing money ä find the cause of a malfunction of a photocopier in order to restore service. ä design an elevator for a new building. n describes strategies that can be employed for realizing goals. n typically described in a hierarchical fashion:
42
Knowledge-modelling basics42 Task decomposition for car diagnosis diagnosis through generate-and-test obtain cover predict task task method compare decomposition inferences transfer function
43
Knowledge-modelling basics43 Task n Description of the input/output n Main distinction with traditional functions is that the data manipulated by the task are (also) described in a domain-independent way. ä example, the output of a medical diagnosis task would not be a “disease” but an abstract name such as “fault category”
44
Knowledge-modelling basics44 Example task TASK car-fault-category; GOAL: "Find a likely cause for the complaint of the user"; ROLES: INPUT: complaint: "Complaint about the behavior of the car"; OUTPUT: fault-category: "A hypothesis explained by the evidence"; evidence: "Set of observations obtained during the diagnostic process"; SPEC: "Find an initial state that explains the complaint and is consistent with the evidence obtained"; END TASK car-diagnosis;
45
Knowledge-modelling basics45 Task method n describes how a task is realized through a decomposition into sub-functions n sub-functions: another task, inference, transfer function n core part of a method: “control structure” ä describes ordering of sub-functions small program, captured reasoning strategy n additional task roles ä to store intermediate reasoning results
46
Knowledge-modelling basics46 Example task method TASK-METHOD diagnosis-through-generate-and-test; DECOMPOSITION: INFERENCES: cover, predict, compare; TRANSFER-FUNCTIONS: obtain; ROLES: INTERMEDIATE: expected-finding: "The finding predicted, in case the hypothesis is true"; actual-finding: "The finding actually observed";
47
Knowledge-modelling basics47 Example method control CONTROL-STRUCTURE: REPEAT cover(complaint -> hypothesis); predict(hypothesis -> expected-finding); obtain(expected-finding -> actual-finding); evidence := evidence ADD actual-finding; compare(expected-finding + actual-finding -> result); UNTIL "result = equal or no more solutions of over"; END REPEAT IF result == equal THEN fault-category := hypothesis; ELSE "no solution found"; END IF
48
Knowledge-modelling basics48 UML activity diagram for method control
49
Knowledge-modelling basics49 Control structure elements n “procedure” calls: ä tasks, transfer functions, inferences n role operations ä assign, add/append, delete/subtract, retrieve,.. n control primitives ä repeat-until, while-do, foreach-do, if-then-else
50
Knowledge-modelling basics50 Control structures (cont.) Conditions: n logical expressions about roles: ä until differential = empty n two special conditions ä has-solution –invocation of inference that can fail ä new solution –invocation of inference that can succeed multiple times, e.g. the cover inference in the car-diagnosis model
51
Knowledge-modelling basics51 Inference or task? “If the internal behavior of a function are important for explaining the behavior of the system as a whole, then one needs to define this function as a task ” n During development: provisional inference structures n Function = task or inference (or transfer function)
52
Knowledge-modelling basics52 Knowledge model vs. SE analysis model n “Data model” contains “data about data” ä = knowledge n Functions are described data-model independent ä enables reuse of reasoning functions n Emphasis on “internal control” ä strategy of reasoning process n Knowledge model abstracts from communication aspects
53
Knowledge-modelling basics53 The data-function debate
Similar presentations
© 2025 SlidePlayer.com Inc.
All rights reserved.