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

5.1.2.1 Humans' View of Semantics

The description of semantics does not tell us why semantics is interesting or how it can be used as a basis to build intelligent systems. The basic idea behind the use of logic is that, when a knowledge base designer has a particular world to characterize, the designer can choose that world as an intended interpretation, choose meaning for the symbols with respect to that world, and write propositions about what is true in that world. When the system computes a logical consequence of a knowledge base, the designer can interpret this answer with respect to the intended interpretation. A designer should communicate this meaning to other designers and users so that they can also interpret the answer with respect to the meaning of the symbols.

The logical entailment "KB  |= g" is a semantic relation between a set of propositions (KB) and a proposition it entails, g. Both KB and g are symbolic, and so they can be represented in the computer. The meaning may be with reference to the world, which need not be syntactic. The  |= relation is not about computation or proofs; it simply provides the specification of what follows from some statements about what is true.

The methodology used by a knowledge base designer to represent a world can be expressed as follows:

Step 1
A knowledge base designer chooses a task domain or world to represent, which is the intended interpretation. This could be some aspect of the real world (for example, the structure of courses and students at a university, or a laboratory environment at a particular point in time), some imaginary world (such as the world of Alice in Wonderland, or the state of the electrical environment if a switch breaks), or an abstract world (for example, the world of numbers and sets). The designer also must choose which propositions are of interest.
Step 2
The knowledge base designer selects atoms to represent some aspects of the world. Each atom has a precise meaning with respect to the intended interpretation.
Step 3
The knowledge base designer tells the system propositions that are true in the intended interpretation. This is often called axiomatizing the domain, where the given propositions are the axioms of the domain.
Step 4
The KB designer can now ask questions about the intended interpretation. The system can answer these questions. The designer is able to interpret the answers using the meaning assigned to the symbols.

Within this methodology, the designer does not actually tell the computer anything until step 3. The first two steps are carried out in the head of the designer.

Designers should document the meanings of the symbols so that they can make their representations understandable to other people, so that they remember what each symbol means, and so that they can check the truth of the given propositions. A specification of meaning of the symbols is called an ontology. Ontologies can be informally specified in comments, but they are increasingly specified in formal languages to enable semantic interoperability - the ability to use symbols from different knowledge bases together so the same symbol means the same thing. Ontologies are discussed in detail in Chapter 13.

Step 4 can be carried out by other people as long as they understand the ontology. Other people who know the meaning of the symbols in the question and the answer, and who trust the knowledge base designer to have told the truth, can interpret answers to their questions as being true in the world under consideration.