© Charles L. Robb 1984

-7- AN AI PDSS WORKSTATION IMPLEMENTED IN LISP

-7.1- THE MENU

The purposes of this program, which is named MENTOR, are: 1. to provide you with specialized knowledge which you may not possess and 2. to allow the non programmer to access the computational capabilities of the computer.

The specialized knowledge in MENTOR is a taxonomy of decision making. The decision as to which method of analysis to use is arrived at by asking a series of questions about the characteristics of the problem that you are facing. MENTOR makes its recommendation based on your responses. MENTOR can also explain terms used and how variables are computed when requested by the user.

Statistical operations can be performed by simply asking that they be performed on a given series of numbers. In this application of MENTOR, the numbers correspond to the financial statement items of a company over several years. These figures are loaded from a disk file into MENTOR using the action "R"; you can load similar information from other companies. These items are related just as they are in an accounting system. You can compute items that are sums or differences of other items on the financial statements by simply referring to the other variables by name and specifying the relationships among those variables. Thus, a requested item is recomputed if any change has been made to any of the items used to compute the requested item. Similarly, MENTOR can compute financial ratios and plot the trends in these ratios, explore correlations of changes in these ratios with other data series, and compare financial items to industry averages.

The necessary hardware and software were chosen on the ground that they are relatively inexpensive and widely available. There are many microcomputers on the market which are inexpensive. Additional advantages of the IBM-PC microcomputer are that several versions of LISP have been written for it, MS- DOS has become the defacto standard operating system for microcomputers, and network software for this machine is becoming available. The software was chosen because it is based on McCarthy's LISP 1.5 which can be modified more easily than other versions to operate on larger computers. Interpreters for LISP 1.5 are also available on other popular microcomputers such as Apple and the TRS-80. The compatibility of this version of LISP with other computers is important because it increases the portability of the program.

To demonstrate the flexibility of MENTOR, this paper provides a quick look at all of the modes of operation--the development menu, the expert system, and the natural language help facility are shown--rather than giving a comprehensive review of only one mode of operation. MENTOR can be operated from any of these modes. Since the menu format is probably the most familiar, this is used as the starting point for explaining the program.

Figure 7-1 shows the program menu. This menu appears at the completion of each action on the menu. This serves as a prompt for the next action. Actions are accessed by entering one of the letters from the phrase "MENTOR CAN FISH." The action that will be carried out is the action defined to the right of the letter. Explanations of the individual actions that can be selected will follow shortly.

The phrase "give a man a fish and he is fed for one day, teach a man to fish and he has food for a lifetime" is a reminder of the role that MENTOR is to perform. MENTOR is to teach the skills needed to perform work, not to passively provide rote rules to be followed. How the knowledge that MENTOR supplies is used is the real measure of success. "MENTOR CAN FISH" is intended as both a mnemonic with which to remember the actions that can be taken through MENTOR and as a reminder that MENTOR has some knowledge and experience to impart to you.

The action "M" engages the method analysis expert system. This allows the expert system to be updated by a human expert. The changes made using this action are reflected in the answers you obtain though using action "H," the help and explanations.

The action "E" allows individual functions and variables to be used and tested outside of the natural language interface. This function is most useful to the developers of the functions that will reside in MENTOR. This function can be used to test the functions and variables for correctness before passing the new functions to you. From this evaluating action, modifications can be made just as they are using action "F," but the editing process is more cumbersome. Pressing (exit> and (return> will cause the action to be completed and will return you to the main menu and the prompt for the next action. Figure 7-2 shows how the prompts from the menu are used to redefine the library function "q" as "linear-regression-forecast." This function is later called in Figure 7-3 to perform a computation.

Action "N" is used to rename a function. Again, any function in MENTOR can be renamed. The prompt for the name of the function to be renamed is followed by a prompt for the new name you want to use. After the second is entered, the main menu reappears. The new function name has been stored on the list which is stored using the action "S" (described later). One caution should be noted. A change in a function name does not change references to that name in other functions if those functions were user- created. Changes to the names of standard library functions, on the other hand, will not have this difficulty. The standard library functions will continue to be referenced by both the new and the old names. Changes to the standard library can be accomplished by reforming the entire programming environment. This should only be done with the aid of a programmer and only after you have decided that the changes are important to you and you have used them for an extended period of time.

Action "T" is used to end the session with MENTOR and allow you to perform tasks such as backing up disks from the operating system. You are prompted to save all new functions and variables to a new file before exiting to the operating system. Caution in exiting is necessary because once MENTOR has been exited, all the changes made during the session are lost unless saved to a new file, or unless the entire programming environment is saved, which permanently changes the environment (this type of save is done using the LISP command SAVE and is best handled by a programmer).

Action "O" is similar to action "N" except that it changes the names of variables. This method of renaming a variable, such as "net-earnings" to "net- income," is more convenient than using the action "C," which requires more steps to complete the renaming of a variable. The distinction between what is a variable and what is a function can become fuzzy. The essential characteristic of a variable in MENTOR is that it represents a number or a series of numbers which other functions are to manipulate. It is a "fuzzy" distinction because a variable may contain functions and references to itself and/or other variables. The same note of caution that was given for the action "N" applies here. Renaming variables that you have created will not change the references to that variable in other variables or functions.

Action "R" is used to read a file created with the action "S." This is used to read in datafiles or to load the functions and variables created by the user. The only files that can be loaded using this command end in ".NEW." This extension, however, is not supplied in response to the action request for the name of the file to be loaded. Thus, a file labeled "DATAFILE.NEW" on the directory of the operating system can be requested from MENTOR using the action "R" and the filename "DATAFILE." Files listed on the file directory that do not have the extension ".NEW" cannot be accessed through the menu. Files with extensions of the name of the file other than ".NEW" can be accessed using the LISP RDS function with the action "E" on the menu. For example, entering (RDS DATAFILE OLD) will read the file named "datafile.old" into MENTOR's memory. However, when similar files are read, variables and functions of the same name will be overwritten by the file most recently read by MENTOR; so care should be used in reading files into MENTOR's memory which do not have the ".NEW" extension on the name.

Action "C" is used to change a variable. This action is similar to the action "F" (which will be described later) except that the action "F" is for changing variables. The action "C" displays the LISP format of a variable which was entered in response to the prompt for the name of the variable. Any changes can be made to the variable, e.g., changing the data in the series, the other variables called by this variable, and any functions which this variable may call. The complexity allowed in the creation of variables is useful for creating data series which contain the historical data and the forecast. The forecast can be maintained in an algorithm format which becomes a permanent record of how the forecast was computed. The new variable is placed on the list to be saved by entering . The variables, when called by MENTOR, will provide the data series based on the new definition of the variable. It is important to remember that the variable is intended to represent a numerical value or a series of numerical values and a function is intended to perform some operation on the variable.

Action "A" allows properties to be altered in much the same manner as variables. However, the property has both a name and an indicator and is defined in the same way as a function or a variable. This action is not necessary for you to master because its primary function is to alter certain properties of MENTOR that are not directly accessible through functions. The executive properties of the control menu can be altered using this action. Changes to properties are best handled by a programmer.

Action "F" is used to make changes to a function or to create new functions. This action is similar to action "0" on variables. By entering the name of the function you wish to change, such as "linear-regression," you call up a display of the entire function in LISP. Changes to the function are made using the cursor movements. When the corrected version is complete, the entire function is saved by entering . This places the function in its new form on a list that is saved in a disk file specified by action "S." Unless the function is saved before the session with MENTOR is ended, the new function is lost. Modified functions that are not saved when the session with MENTOR is ended will be restored to their original form at the next session with MENTOR. Once the modified or new functions are entered onto the list of available functions, the function may be used by any part of MENTOR.

Action "I" is used to change the drive that MENTOR will access to read any files requested when you use the action "R," or to which it will write any files when you use the action "S." The LISP functions SAVE, RDS, and WRS can specify the drive for the input/output operation. This action is intended to be a convenience so that the active drive can be changed without leaving the menu.

Action "S" is for saving newly created functions and variables in a disk file which can be loaded at a later session. Functions and variables which are frequently entered should be made a permanent part of the programming environment using the LISP function SAVE. The procedure for this involves programming in LISP and should be performed by a programmer. Action "S" prompts for the name of the file to be saved. It is recommended that the file name be chosen to reflect the date created and the purpose of the functions. The limit on the name of the file is that it cannot total more than 8 letters and digits. Only letters and digits should be used in the file name. All file names saved using this function will have ".NEW" added to the end of the name. This is to distinguish them from other files which may be on the disk on which the MENTOR file is saved.

Action "H" is used to interact with MENTOR using more natural language. The purpose of the menu described in detail in this section is for tailoring MENTOR to the individual manager, developing new functions, and for creating new expert systems. The consultant function, action "H," is intended to be operated by the individual manager. This action is used by the manager to use the natural language interface and the expert system to work on problems he is facing. These facilities are described in more detail in the following sections.

-7.2- THE EXPERT SYSTEM

The expert system in MENTOR can be accessed from the menu using the action "M." The expert system is based on a taxonomy of methods of analysis for decision making. The characteristics of the problem are explored by MENTOR is it asks you a series of yes or no questions about the particular problem which you are facing. You respond to MENTOR's questions by entering a "Y" or "N" from the keyboard. Both the sequence and number of questions MENTOR will ask you are determined by your responses. MENTOR makes a recommendation as to the appropriate method of analysis for your particular problem. For example, the decision to use linear-regression can be arrived at with fewer questions than the decision to use linear-programming because the class of problems which linear-regression can solve is more easily specified than the class of problems which linear-programming can solve. The advantages and disadvantages of each method of analysis are reflected in the taxonomy. The knowledge of the human expert on which this expert system is based is reflected in the questions MENTOR asks and the sequence in which they are asked. The situation-specific knowledge must be supplied by you in answering the questions.

Thus, the expert system combines the specialized expert knowledge, which can supply very specialized solutions to narrow classes of problems, and your expert knowledge of the problem you are facing. No expert system can work alone --it requires a human interface; however, it is capable of greatly expanding the range of decisions one individual is capable of making.

In MENTOR, the knowledge base (the taxonomy) can be expanded directly. The expert effects this by changing the knowledge base function in MENTOR using the action "F" or interactively using the action "M" and supplying new yes/no questions which MENTOR can use in future sessions with you. Since changes only need to be made once to the knowledge base and can be cloned as needed, a single human expert can keep the expert system current and any user of MENTOR will be guided by the updated questions and the most expert opinion on the subject.

The notes and reminders at the beginning of the session with the expert system are intended to make you more comfortable with the questions and answers which follow. The entry of your name serves two purposes. It appears on the surface to make the program friendly and more familiar to you, but more importantly, it records who made the changes to the expert system if changes are made.

In some cases MENTOR will have several methods it can recommend. These are maintained on a list and only the first method on this list is shown to you. However, the human expert can change the order of the list if a different method should have a higher priority or is easier to implement.

If two methods on a recommended list become distinguishable by the expert or some other taxonomy appears appropriate for distinguishing between the alternative methods, another set of yes/no questions can be added by the human expert to the expert system. The new information is reflected in the new version of MENTOR without extensive reprogramming because the knowledge base can be simply read into MENTOR's memory using action "R." When the session with the expert system is complete, you are returned to the main menu.

-7.3- THE NATURAL LANGUAGE FACILITY

The NL system is activated using action "H" from the menu. The purpose of this function is to provide you with access to the capabilities of MENTOR without requiring a knowledge of programming. This action is the most important part of MENTOR because this is intended to become the primary action mode used by the individual manager after MENTOR has been tailored to him. From this point, all other functions in MENTOR can be tied into the needs of the individual manager. Every action and function available in MENTOR can be made to respond to a keyword or a list of keywords chosen by you.

Figures 7-3 & 7-4 show how this action operates. The program introduces itself and gives some brief instructions to explain how it operates. You can return to the main menu by entering the word "exit" followed by a period. In this mode, MENTOR refers to itself as "Consultant" and to you as "Client." This is simply a reminder to you of the intended relationship between MENTOR and you.

When MENTOR gives you the prompt, "Client," you enter requests and ask for information by entering complete sentences. MENTOR examines the sentences you enter for words which you have defined and which are defined in its files. If MENTOR cannot understand your request, it will provide hints on how to make your statements more recognizable to it and provide examples of acceptable requests and questions. MENTOR's response is made in the form of English sentences. Your request and MENTOR's response remain on the screen in case you need to refer to your previous questions or wish to copy the information which MENTOR has provided into another request. Requests using pronouns are not acceptable because MENTOR cannot determine to what the pronouns refer.

All the functions in MENTOR can be accessed from this mode of operation. Standard functions, such as linear-regression, can be renamed using the action "N," and variables can be renamed using the action "0." Redefinitions of functions and variables made from the menu are recognized by MENTOR in this mode. The name of the functions and variables should be tailored to the individual manager.

The definitions of keywords and synonyms are created and saved by using the action "E" or are created outside of the MENTOR environment. These keywords and phrases can be tailored to the natural speech and set of concepts with which the particular user is comfortable. Additions to the dictionary of terms which can be explained, including frequent misspellings, can be made outside of MENTOR using a text editor. When MENTOR finds these words in a phrase you enter, MENTOR will translate them into instructions for the computer. Al 1 of the functions on the menu can be defined in terms of keywords so that they can be used from the consultant without going through the menu. Figure 7-4 shows the expert system being called in response to the key word "problem" in the phrase entered by the client just as though action "M" were entered from the menu.

Figure 7-3 shows how explanations and definitions can be obtained using the key word, "explain," or synonyms for explain. MENTOR searches its list of words defined by the user and also the variables which have been read into MENTOR's memory during the session. If a match is found, the definition of the term or the composition of the variable is explained. References to other words or phrases which might be related are contained in the explanation in case you need more information. The words recognizable to MENTOR can be extended directly by renaming variables from MENTOR or by creating new definitions and lists of synonyms outside of MENTOR. Changes which are made outside of MENTOR with a text editor should be done by the human expert with the aid of a programmer.

The list of synonyms are created using a text editor, outside of MENTOR. If new definitions or redefinitions of words are frequently necessary after MENTOR has been tailored to you, a facility for creating new definitions can be made from the menu or from the consultant function. In the current example, definitions of terms are not modifiable by you and must be accomplished with the aid of a programmer.

MENTOR derives the explanation of the variable, "net-earnings," given in Figure 7-3, from how the variable is computed in LISP. The value of the variable series, "net-earnings," is obtained by subtracting the "income-taxes- currently-payable" from the "ebit." "Income-taxes-currently-payable" and "ebit" are variables which are also defined in terms of other variables and explanations of these terms can also be requested.

The next action shown in Figure 7-3 is a request for a computation. The keyword "compute" and its defined synonyms call the function "compute," which examines the sentence for the presence of a function, a variable or a number to evaluate. If it finds the necessary information, the computation is performed. In Figure 7-3, the function requested is a "linear-regression-forecast" (defined in Figure 7-2), the variable series is "net-earnings," and the number of years into the future to forecast is "5." This information is sufficient for MENTOR to arrive at a value, which is displayed by the consultant.

The next line that the client enters in Figure 7-3 is a request for the present value of the term previously computed. One of the major problems in processing natural language is the ambiguity of pronouns. MENTOR does not allow the use of pronouns. You must copy previously obtained values into your new request in order for MENTOR to act upon your request.

If MENTOR cannot arrive at a value because either you have not given it enough information or you have entered text which it does not understand, MENTOR will prompt you with suggestions of how to change your instructions into a form that it can digest. If this condition occurs frequently, it might be a sign that new definitions and functions need to be defined for MENTOR.

MENTOR can also correct for some misspelled words. Frequent misspellings can be placed on the synonym list of the correctly spelled word. If MENTOR encounters the misspelled version, it is replaced by the correctly spelled synonym which MENTOR then attempts to understand. This correction is made internally in MENTOR and the misspelled word will remain on the screen.

Other types of financial analysis can be performed with MENTOR beyond the example analysis shown in Figure 7-3. Some examples are computing the "current-ratio-in-percentage," the "linear-regression-coefficients" of "working-capital," and the "coefficient-determination" of the "net-earnings" and "GNP." Since these functions can be accessed by you without your being concerned with the programming details, analysis can be greatly facilitated.

-7.4- SUMMARY OF THE IMPLEMENTATION

This is only intended as an illustration of how this type of system can be modified and used by individuals in organizations. The emphasis here is on the fact that the technology for this type of system is currently available. As more specialized hardware and software appear that are oriented to the processing of symbols rather than numbers, these workstations can be expanded and integrated to form an integrated planning model for the corporation. One intermediate step that this program does not attempt to incorporate is a relational database system for maintaining the data series and storing interesting relationships discovered in the use of this type of station. Several relational databases for microcomputers are available and several are currently being expanded to include natural language interfaces.

This PDSS can be placed in contact with other workstations with the aid of a ring communications network. The network approach is a necessary technological step towards the fully distributed processing system. The network approach is cost effective for corporations with mainframe computers because the communications channel can exchange information with a network at a rate 50 times faster than with an individual station. The more frequent querying of the databases increases the volume of traffic and causes the service from the mainframe to be degraded. The degradation of the service results in pressure to expand the processing capacity of the mainframe. The expansion of the mainframe is very expensive and can only be done in large segments. The increased cost of querying the central corporate database will motivate data processing managers to supply a database system which is locally available to the network and is periodically updated by the mainframe to avoid incurring the high cost of expanding the mainframe.

New networking software will make the operation of the network more autonomous. Processing tasks within the network will be allocated to memory that is not in current use by the network users. Only when the processing requirements exceed the capacity of the network will a processing request be made to the mainframe. The corporate mainframe will become similar to external databases from the point of view of the PDSS user. Data for planning will come from the corporate database in summary formats and passed to you in spreadsheet formats. External databases will be accessed to obtain data on products which are "similar" or for data series which historically are highly related to factors that are critical to the success of the plans.

As the cost of memory continues to decrease, and the flexibility of processing increases, excess memory capacity will be reallocated to the network by the mainframe. With the advent of automatic programming the function of the information manager will become less distinct from other members of the network and the function of the information manager might become combined with other functions within the organization, such as finance and accounting. This scenario may take over thirty years to come about, but this appears to be the likely path.

MENTOR is intended to show what facets of the fifth generation technology can be useful now and serve as a bridge to the applications of the future. This paper has endeavored to indicate a likely sequence of development in which workstations similar to MENTOR will become a major force in the development of the modern corporation. It is hoped that this paper will give those in control of the long range plans of the large corporations in the U. S. some insight into the likely developments.