4.2 Kelly grids

One of the most useful knowledge engineering techniques for eliciting objects and their structure is that of Kelly, or repertory (repertoire), grids. These grids were introduced originally in the context of clinical psychiatry (Kelly, 1955). They are devices for helping analysts elicit 'personal constructs'; concepts which people use in dealing with and constructing their world. Constructs are pairs of opposites, such as slow/fast, and usually correspond to either classes or attribute values in object-oriented analysis. The second dimension of a grid is its 'elements' which correspond to objects. Elements are rated on a scale from 1 to 5, say, according to which pole of the construct they correspond to most closely. These values can then be used to 'focus' the grid; a mathematical procedure which clarifies relationships among elements and constructs. In particular, focusing ranks the elements in order of the clarity with which they are perceived, and the constructs in order of their importance as classifiers of elements. The details can be found in any decent book on knowledge acquisition; e.g. (Hart, 1989; Graham and Jones, 1988).

To illustrate the usefulness of Kelly grids, suppose we need to interview a user. The technique involves first identifying some 'elements' in the application. These might be real things or concepts, but should be organized into coherent sets. For example, the set {Porsche, Jaguar, Rolls Royce, Mini, Driver} has an obvious odd man out: Driver.

The use of the Kelly grid technique in its full form is not recommended. However, questioning techniques based on Kelly grids are immensely powerful in eliciting new classes and attributes and extending and refining classification structures. There are three principal techniques:

Considering Figure 38, we might have discovered that SportyCars was a key class. Asking for the opposite produced not 'Unsporty' but 'Family' cars; not the logical opposite but a totally new class. Thus, asking for the opposite of a class can reveal new classes.

In laddering, users are asked to give names for higher level concepts: 'Can you think of a word that describes all the concepts {speed, luxury, economy}?' might produce a concept of 'value for money'. This technique is known as laddering, and elicits both composition and classification structures. It generally produces more general concepts. Asking for a term that sums up both Fast and Sporty we might discover the class of 'ego massaging' cars for example.

Elicitation by triads is not a reference to Chinese torture but to a technique whereby, given a coherent set of elements, the user is asked to take any three and specify a concept that applies to two of them but not to the third. For example, with {Porsche, Jaguar, Mini}, top speed might emerge as an important concept. Similarly, the triad {Mini, Jaguar, Trabant} might reveal the attribute CountryOfManufacture: or the classes BritishCar and GermanCar. As a variant of this technique, users may be asked to divide elements into two or more groups and then name the groups. This is known as card sorting.

All these techniques are first-rate ways of getting at the conceptual structure of the problem space, if used with care and sensitivity. Exhaustive listing of all triads, for example, can be extremely tedious and easily alienate users.


--------------- ELEMENTS -------------



CONCEPT
Rolls Royce Porsche Jaguar Mini Trabant

OPPOSITE
Economical

5

4

4

2

2

Costly
Comfortable

1

4

2

4

5

Basic
Sporty

5

1

3

5

5

Family
Cheap

5

4

4

2

1

Expensive
Fast

3

1

2

4

5

Slow

Figure 38 A Kelly grid. Scores are between 1 and 5. The left-hand pole of the concept corresponds to a low score for the element and the right (its opposite) to a high one. The grid is not focused.

There are several computer systems which automate the construction and focusing of these grids, such as ETS (Boose, 1986) and its commercial descendant AQUINAS (Boose and Bradshaw, 1988). These systems convert the grids into sets of rules. It is curious that these automated tools throw so much of what is captured by the repertory grid analysis away. It is clear that laddering and sorting produce classification structures, for example. These are then disguised as production rules with a consequent loss of information. We predicted in 1991 that tools would evolve which would capture such structural information directly. That this did begin to happen was illustrated by the work of Gaines and Shaw (Gaines and Shaw, 1992; Shaw and Gaines, 1992) but the work is not yet commercialized to the best of our knowledge. In the interim the technique must be used manually, and preferably informally, for object-oriented analysis.

Object templates have been used in knowledge acquisition for expert systems. Filling in the templates is a structured method for gathering semantic information which is of general applicability. The knowledge engineering approach emphasizes that classes should correspond to concepts held by users and experts. High level classes represent abstractions that may be reusable across several similar domains. The abstraction 'object' is universal in all domains, but 'account' is usable across most financial and accounting applications. Mortgage account is more specialized and therefore reusable across a narrow set of applications. The key skill for analysts seeking the benefit of reuse is to pitch the abstractions at the right level. Prototyping and interaction with users and domain experts all help to elicit knowledge about objects.

Thus, ontology and epistemology help us find objects and structures. They should also help us know how to recognize a good object when we meet one, either in a library or as a result of our own efforts. The third requisite tool for this purpose is, of course, common sense. A few common-sense guidelines for object identification are worth including at this point.

Measuring the quality of an abstraction is very difficult. Guidelines can be taken from an analogy with the design of machinery. As with a machine, there should be a minimum number of interchangeable parts and the parts should be as general as possible. Suggested criteria, with their corresponding metrics, include several that we have already met in the context of object-oriented programming.

Similar guidelines apply to methods. Methods too should be simple and generative. For example, the method 'add 1' generates a method 'add n' for all n. Look for such commonalities. They should be relevant; that is, methods must be applicable to the concept, neither more specific nor more general. Methods should depend on the encapsulated state of the containing object, as mentioned above. A very important principle of object-orientation is the principle of loose coupling or the 'Law of Demeter' which states that 'the methods of a class should not depend in any way on the structure of any class, except the immediate (top level) structure of their own class. Furthermore, each method should send messages to objects belonging to a very limited set of classes only' (Sakkinen, 1988). This helps classes to be understood in isolation and therefore reused.

Recall that analysts should avoid objects arising solely from normalization or the removal of many-to-many relationships. The rule is: if it's not a real-world entity then it's not an object. For example, the many-to-many relationship between ORDERS and INVOICES may be removed by introducing a new class ORDER-LINE. This is fine, the lines are real things; they get printed on the invoice. On the contrary there seems to be no such natural object that would remove the many-to-many relationship between cars and the colours they may be painted.

The last point we wish to make is that analysts should not be expected to get it right first time. They never do. This is the mistake of the waterfall model, and we know all too well that the costs of maintaining incorrectly specified systems are high. Prototyping and task-centred design, if properly managed, allow the analyst to get it right; but third time round.