## What Is A Context?

E-Mail Comments to: opencyc-doc@cyc.com
Copyright© 1996-2002 Cycorp. All rights reserved.

| Contexts in Cyc®
| The Hierarchy of Contexts in Cyc®

An important idea in Cyc is the context. A context (or "microtheory" in Cyc®) is a set of assertions, representing a particular set of surrounding circumstances, relevant facts, IF-THEN rules, and background assumptions. Cyc's enormous knowledge base of assertions (including its IF-THEN rules) is divided into many different contexts; every fact or rule is in some particular context. (It could also be in more than one context.)

Whenever Cyc is asked a question, or has to do some reasoning, the task is always done in some particular context. Being in a context confines Cyc® to relevant facts and rules. For example, if you just want to ask Cyc® about brushing your teeth, Cyc® doesn't need to know every kind of fact in the Cyc® Knowledge Base, such as how much a toothbrush costs. In the ManualHumanActivitiesMt context for typical human activities (like tooth-brushing) there is no fact about this, although in a different context, ShoppingGMt, the cost is there because it's relevant to shopping.

In Cyc, a context is a way of talking about a group of related assertions by representing this grouping explicitly as a Cyc object. Each context should therefore be designed as a coherent set of relevant material.

Why We Have Contexts
- (a) In general, naming a theory (i.e., a set of sentences) will allow us to make statements about it --e.g., perhaps we want to state explicitly that for answering a certain kind of question, a certain theory is more relevant. For example, we can call the group of assertions dealing with ailments the #$AilmentMt, and the set of statements about jobs the #$JobMt, and state that the former group is more relevant to answering questions about illnesses than the latter.
- (b) Cyc's "Microtheories" provide a mechanism for focusing on relevant information during problem solving. For example, if we have a question about heart attacks, the system can find all the information about heart attacks in the #$AnimalPhysiologyMt, the #$HumanAilmentMt, and the #$AilmentMt, and group all of this information into a single, temporary, "problem-solving" bundle created for the sole purpose of answering the question.
- (c) Contexts allow us to create limited domains that rest on certain assumptions. This allows the statement of the theory to be simplified, since we can state the assumptions once for the entire theory, rather than having to repeat them for every assertion in the domain. For instance, the #$JobMt as a whole assumes that every employed person mentioned in that microtheory has just one job. (Having two jobs is an exception.) Therefore, we can omit prefacing every sentence in that microtheory with, "Assuming the person has only one job at a time ..."
- (d) By keeping different theories based on different assumptions distinct, contexts allow the same phenomenon to be represented in different ways without inconsistency. For example, two different microtheories may take two different perspectives on the same event (e.g. viewing an earthquake as a human catastrophe versus an overdue tectonic adjustment), or may make different approximations or allow for different margins of error (e.g., by using Newtonian as opposed to relativistic mechanics). Knowledge entry is made easier since the knowledge enterer doesn't have to worry about creating "the" single correct representation.

There are several kinds of context in Cyc -- two main kinds are: General Microtheories and Problem Solving Contexts (abbreviated as GMts and PSCs).

Problem Solving Contexts are specialized contexts created to solve a particular problem; these are usually created "on the fly" and they evaporate after use. We'll mostly talk about General Microtheories.

A General Microtheory (GMt) is a generally useful context that is not application- or problem-specific. For example, whenever you talk about shopping for food, you assume various things, such as that the food items are for sale in a store, that they have prices in money, etc. These assumptions hold throughout our modern culture. Axioms (assertions in Cyc) about shopping that rest on those assumptions are collected in in the microtheory called #$RetailBuyingMt. This general microtheory is useful in a number of applications (like directed marketing, automatic personal assistants, simulation games, etc.).

You can also introduce new Microtheories for fictional situations like those in fairy tales, books, television shows, etc. Various things (like the time, place and culture, and the existence and features of the characters, etc.) are assumed in a #$FictionalMt. A story character like Paddington Bear has certain definite characteristics, for example: he wears a yellow hat. This is true in the #$PaddingtonBearMt (an instance of #$FictionalMt) even though in the real world Paddington Bear never existed.

Similarly, a treaty, agreement or law code has a microtheory for the way things are supposed to be (as opposed to how they actually are). For this, Cyc has a kind of Microtheory called a #$SupposedToBeMt -- an #$Agreement is one example that contains the facts needed to represent this situation, namely the facts recited, anticipated and agreed-to in the agreement.

Microtheories are also used to represent information about "information-bearing things" like articles, movies, messages, etc. If we were to represent this course module in Cyc, itsinformation content would be in a microtheory; the assertions of the microtheory would convey the content about the article.

Most Microtheories have assumptions about space and time. If you ask about travelling a long distance, the likely means of travel depends on the historical period that is assumed. Cyc will not make the mistake of assuming that Abraham Lincoln travelled to Washington by airplane or car, but it will assume that a modern businessman could use one of these means. The vast majority of Microtheories assume that human events occur on or near the surface of the Earth and a lot of common-sense assumptions depend on that. You can imagine how difficult it would be for two astronauts to attempti to play pool in space, with the balls floating all over the place and the table starting to rotate.

A Microtheory has a set of relevant assertions (including simple facts and IF-THEN rules) and it may have a set of Domain Assumptions that always apply within the Microtheory. In addition, it has a certain set of other Microtheories to which it has access; if Cyc is in that Microtheory, Cyc® can access all of the assertions in those other Microtheories, and it is subject to all of the Domain Assumptions in those other Microtheories. (Special pages describing these features are coming next.) Frequently, the microtheory makes basic assumptions which simplify the axioms within it.

A Microtheory is linked to its other, accessible Microtheories by using an explicit predicate asserted about the microtheories: #$genlMt. If there are two microtheories ?MT1 and ?MT2, we assert

    (#$genlMt ?MT1 ?MT2)

to say that Microtheory ?MT2 is accessible from Microtheory ?MT1. All assertions and Domain Assumptions in ?MT2 then become available to Cyc if it is operating in ?MT1.

Microtheories allow two different parts of the Knowledge Base to contain conflicting information without causing trouble. It is no problem for Cyc if #$TeethCleaning normally happens one to three times a year according to the #$JobMt, but one to three times a day according to the #$PersonalActivitiesMt. (Professional teeth cleaning versus personal teeth cleaning). In Cyc®, Knowledge Entry (putting assertions into the Cyc® knowledge base) usually aims for logical consistency within a Microtheory, but not consistency throughout the whole Cyc® Knowledge Base.

> [Add: DIFFERENT POINTS OF VIEW?]

Because a Microtheory in Cyc is treated as an object in its own right, you can assert things about it directly and you can relate it to other objects and Microtheories using Cyc's logical language CycL.

## Questions:

These are the first, most basic, questions about contexts:

Is every fact in Cyc stated in some particular context?

The general idea of context covers several kinds. What are two commonly used kinds (types or collections) of context we've mentioned?

Typically, when Cyc is reasoning (drawing inferences based on its facts and rules) does it have access to its entire Knowledge Base, in all subject-areas?

A microtheory may contain assertions about many things -- but is the microtheory itself treated as a thing, something we can qualify and talk about?

Last Update: 03/21/2002