RESEARCH INTO THE CONSTRUCTION AND APPLICATION OF INTELLIGENT KNOWLEDGE BASED SYSTEMS THAT AID COMPUTER USERS Dr. Peter Ross, Department of Artificial Intelligence, University of Edinburgh. INTRODUCTION Intelligent knowledge-based (IKB) systems, sometimes referred to as 'expert systems', are computer programs or sets of programs which contain explicit knowledge concerning some particular area of human expertise, organised in such a way that they can function as an expert consultant in that area. Some existing examples are MECHO (which solves problems in mechanics - [Bundy79]), MYCIN (which diagnoses bacterial infections and recommends treatments - [Shortliffe76]), MOLGEN (which designs molecular genetic experiments - [Stefik81]) and EL (which analyses analogue electric circuits [Stallman77]). They contain the factual knowledge of their subject as sets of rules - for example, one of MYCIN's rules is If (a) the infection is primary-bacteremia, and (b) the site of the culture is one of the sterile sites, and (c) the suspected entry point is the gastro-intestinal tract, Then there is suggestive evidence (prob. 0.7) that the organism is bacteroides. MYCIN has four tasks: deciding whether an infection is associated with significant disease, deciding the identity of the organism, deciding which drugs are usable, and selecting the best drug to use. It functions by questioning a physician to obtain as much relevent information as is available, and using the information to form hypotheses about the infection. It takes acount of the probabilities it has given to the hypotheses in order to recommend treatments that are most likely to help, or in other cases least likely to be harmful. At any stage in the dialogue, the physician can ask MYCIN to explain its reasoning or to describe the particular rule that prompted a question; MYCIN uses clinical language rather than some artificial computer language for its questions and responses. At present it contains about 200 rules, and has provision for an expert to add to or modify the current set. An important point to note is that MYCIN's rules are explicit; it can not only use them for decision-making, but also for generating explanations. Much of the current research into intelligent knowledge-based systems is concerned with two questions. The first is, how does one represent and structure the various necessary sorts of knowledge so as to be usable by a computer program? The second question is, how can a program use the various sorts of knowledge and yet avoid a combinatorial explosion of the number of possibilities that need to be considered? Certain useful principles are already emerging (e.g. see [Hayes-Roth82]), but usually the solutions are tailored to fit the area of knowledge in question. One option that is open to almost all existing IKB systems is to ask the user some pertinent questions when there is difficulty deciding what to pursue next, on the assumption that all the user lacks is the expertise to make the best use of his own information. Little work has been done on the problems that arise when an IKB system is being used as a training or teaching tool. In this case it can only ask the user questions that are meaningful to him, and for which he is likely to be able to formulate a reply. The system has therefore to be able to form a model of what the user knows and can do at his current level of competence, and use the model to find the right level at which to communicate with the user. Such a model would have to include not only details of his factual knowledge but also details of his higher-level knowledge of how to apply that knowledge. There are probably two reasons why not much work has yet been done in this area. One is that the system would have to begin by being a relatively passive observer of the user's efforts, since it would be unable to assess whether particular questions would be meaningful to him; however there are major linguistic difficulties in extracting the meaning from a user's utterances if he is allowed to use even a small subset of English. The other is that in almost all subject areas the vocabulary needed by the system to represent the higher- level knowledge is too large for the problem to be tractable. PROPOSED RESEARCH The research I wish to do is to investigate the problem of an IKB system forming and using a model of the user's knowledge and competence. To avoid the difficulties mentioned above, I propose to use as subject area the topic of how to use a computer operating system, in particular the UNIX system now coming into widespread use. This restricts the user's utterances to the range of commands meaningful to the operating system and these have well-defined syntax and semantics, neither impossibly large. Moreover, the function of an operating system is to allow users to accomplish certain kinds of tasks by making certain kinds of operations easy to perform. This set of operations provides a natural vocabulary for representing the user's intentions, and it is a vocabulary which the user himself has to acquire in learning how to use the computer. Specifically, I propose to design and construct an IKB system that is normally a silent observer of the sequence of commands that the user gives to the operating system. It will catch semantic and syntactic errors, and attempt to model not only what the user knows but also what his medium- term intentions are, so that it is usable as a training aid and as a tool to assist experts. The following diagram shows what the necessary components are: Static knowledge of the Time- and user-dependent of the system knowledge of the system Control program that monitors commands and Current model of the draws on the other components to form and user's knowledge and maintain the model intentions Rules defining features of any user's strategies and Advice and comment generator intentions Inferencing and pattern-recognition mechanisms for the sequence of commands The following example suggests what the system might do. The '%' is the operating system prompt indicating that the user should type a command. Numbers in square brackets refer to the notes below. Unless otherwise mentioned, the comments are generated by the system outlined above. [1] % edit test.c The standard editor is called 'em'. Your command has been amended to 'em test.c' [2] Editor > ... ... [3] % cc test You don't have a file called 'test' to compile, but you have one called 'test.c'. Modify your command. [4] % cc test.c [5] % a.out Bus error - core dumped [this is an operating system message] [6] % em test.c Editor > ... ... If you want to compile 'test.c' and try running the result, type 'y': y [7] % cc test.c [8] % a.out Notes: [1] on UNIX the standard editor is called 'em', and source files ending in '.c' are usually C language files to be compiled by the 'cc' command. The comment shows that the IKB system doesn't expect this user to use a non-standard editor (because he hasn't before). [2] this and the next two lines symbolise using the editor [3] the user calls the C compiler but with the name of a non-existant file. The comment shows that the IKB system knows that there are other files that the user might want to compile instead; it doesn't go so far as to fabricate the command for him in this case. [4] the user amends his command ... [5] ... and tries the result (by default called 'a.out' on UNIX), but it fails. The IKB system can detect this failure. [6] the user re-edits his file. The IKB system notes that he is now aware of 'em', and also deduces that he will probably want to repeat the compilation and the trying of the result. Thus, at the end of editing, it offers to do this for the user. [7] the IKB system generates this command. The compilation succeeds ... [8] ... so it also generates this command. Volunteers from the (large) community of computer users in the Department of Artificial Intelligence, some of whom are highly experienced and some of whom are novices, will be asked to use the programs so that I can assess progress and get useful fundamental information for directing the work. The most suitable tool for the work is PROLOG, a very high level computer language based on a particular formulation of predicate logic. The Department of Artificial Intelligence wrote and now distribute a UNIX PROLOG system; moreover, the department has an international reputation both in the area of IKB systems and in the area of using computers in education. BENEFITS OF THE RESEARCH In addition to furthering research into IKB systems and the use of computers in education, the proposed research should also be useful to those working on problems of cognitive modelling and of man-machine communications. It should also provide a practical tool for those people needing to learn to use UNIX.