foundations of computational agents
The third edition of Artificial Intelligence: foundations of computational agents, Cambridge University Press, 2023 is now available (including full text).
The explicit use of semantics allows explanation and debugging at the knowledge level. To make a system usable by people, the system cannot just give an answer and expect the user to believe it. Consider the case of a system advising doctors who are legally responsible for the treatment that they carry out based on the diagnosis. The doctors must be convinced that the diagnosis is appropriate. The system must be able to justify that its answer is correct. The same mechanism can be used to explain how the system found a result and to debug the knowledge base.
Three complementary means of interrogation are used to explain the relevant knowledge: (1) a how question is used to explain how an answer was proved, (2) a why question is used to ask the system why it is asking the user a question, and (3) a whynot question is used to ask why an atom was not proven.
To explain how an answer was proved, a “how” question can be asked by a user when the system has returned the answer. The system provides the definite clause used to deduce the answer. For any atom in the body of the definite clause, the user can ask how the system proved that atom.
The user can ask “why” in response to being asked a question. The system replies by giving the rule that produced the question. The user can then ask why the head of that rule was being proved. Together these rules allow the user to traverse a proof or a partial proof of the top-level query.
A “whynot” question can be used to ask why a particular atom was not proven.
The first explanation procedure allows the user to ask “how” an atom was proved. If there is a proof for , either must be an atomic clause or there must be a rule
such that each has been proved.
If the system has proved , and the user asks how in response, the system can display the clause that was used to prove . If this clause was a rule, the user could then ask
how .
which will give the rule that was used to prove . The user can continue using the how command to explore how was proved.
In the axiomatization of Example 5.7, the user can ask the query . In response to the system proving this query, the user can ask how. The system would reply:
This is the top-level rule used to prove . To find out how was proved, the user can ask
how 2.
The system can return the rule used to prove , namely,
To find how was proved, the user can ask
how 1.
The system presents the rule
To find how first atom in the body was proved, the user can ask
how 1.
The first atom, , was proved using the following rule:
To find how the second atom in the body was proved, the user can ask
how 2.
The system will report that is explicitly given.
Notice that the explanation here was only in terms of the knowledge level, and it only gave the relevant definite clauses it has been told. The user does not have to know anything about the proof procedure or the actual computation.
A method to implement how questions is presented in Section 14.4.5.
Another useful explanation is for why a question was asked. This is useful for a number of reasons:
We want the system to appear intelligent, transparent and trustworthy. Knowing why a question was asked will increase a user’s confidence that the system is working sensibly.
One of the main measures of complexity of an interactive system is the number of questions asked of a user, which should be kept to a minimum. Knowing why a question was asked will help the knowledge designer reduce this complexity.
An irrelevant question is usually a symptom of a deeper problem.
The user may learn something from the system by knowing why the system is doing something. This learning is much like an apprentice asking a master why the master is doing something.
When the system asks the user a question (), there must be a rule used by the system that contains in the body. The user can ask
This is read as “Why did you ask me that question?” The answer can be the rule that contains in the body. If the user asks why again, the system should explain why the atom at the head of the rule was asked, and so forth. Repeatedly asking why will eventually give the path of subgoals to the top-level query. If all of these rules are reasonable, this justifies why the system’s question to the user is reasonable.
Consider the dialog of Example 5.13. The following shows how repeated use of why can repeatedly find higher-level subgoals. The following dialog is for the query , with user asking the initial query, and responding with “why”.
ailog: ask .
Is true? why.
is used in the rule : why.
is used in the rule : why.
is used in the rule : why.
is used in the rule : why.
Because that is what you asked me!
Typically, how and why are used together; how moves from higher-level to lower-level subgoals, and why moves from lower-level to higher-level subgoals. Together they let the user traverse a proof tree, where nodes are atoms, and a node together with its children corresponds to a clause in the knowledge base.
As an example of the need to combine how and why, consider the previous example where the user asked why . The system gave the following rule:
This means that was asked because the system wants to know and is using this rule to try to prove . The user may think it is reasonable that the system wants to know but may think it is inappropriate that be asked because the user may doubt that should have succeeded. In this case it is useful for the user to ask how was derived.