Third edition of Artificial Intelligence: foundations of computational agents, Cambridge University Press, 2023 is now available (including the full text).

13.4 Querying Users and Other Knowledge Sources

As discussed in Section 5.3.2, users are not experts in the domain of the knowledge base; however, they often know details about a particular case and so provide one source of knowledge. Users, typically, do not know what is relevant or what vocabulary to use and so they cannot be expected to tell the system what they know. One aspect of the problem of knowledge acquisition is how to most effectively extract knowledge from a user.

The simplest form of a question is the yes-or-no question presented in Section 5.3.2. When variables and function symbols are involved, more sophisticated questions can be asked of the user.

Example 13.17: Consider the knowledge base of Example 12.11, but without the rules for up or down. Suppose the user can observe the positions of the switches. To enable the user to be asked the position of switches, up(S) and down(S) can be askable. The following is a possible dialog for a top-down proof procedure for the query ?lit(L), where the user is asked the askable goals. User responses are in bold:
Is up(s2) true? yes.
Is up(s1) true? no.
Is down(s2) true? no.
Is up(s3) true? yes.
Answer: L = l2.

In this example, up and down are not explicitly related, and so the system asks both.

In this example, the ontology was simple; we assumed that the user can understand the questions. In general, asking users is not as simple; the questions have to be framed in such a way that the user can understand what the question means and what answer is expected.