Knowledge Representation and Reasoning (KRR) is the subfield of artificial intelligence concerned with how an intelligent system can encode information about the world in a form that a computer can manipulate, and how it can use that encoded information to draw conclusions, answer questions, and make decisions. At its core, KRR addresses a fundamental tension: the world is rich, ambiguous, and constantly changing, while a computational system is finite, precise, and static. The field is therefore not merely about storing facts, but about designing formal languages with well-defined meanings, and developing inference procedures that allow new, implicit knowledge to be derived from what is explicitly stated.
The central questions of KRR are enduring. What is the right way to represent a particular kind of knowledge—about objects, properties, time, space, actions, beliefs, or uncertainty? How can a representation be expressive enough to capture what we know, yet tractable enough that reasoning with it does not become computationally infeasible? How can a system handle incomplete, inconsistent, or changing information? And how can the meaning of a representation be made precise enough that different systems, or different parts of the same system, can share and combine knowledge reliably? These questions tie KRR closely to logic, but also to linguistics, cognitive science, and database theory.
The modern history of KRR begins with the insight that formal logic provides a rigorous basis for representing knowledge. In the 1950s and 1960s, researchers working on early AI, such as John McCarthy, argued that a computer could be given a declarative description of a domain—a set of logical sentences—and then use a general-purpose theorem prover to deduce consequences. This approach, often called the declarative or logical approach, had a powerful appeal: the representation was separate from the reasoning mechanism, and the meaning of a representation was given by the standard semantics of first-order logic.
The central assumption of this tradition is that knowledge can be expressed as a set of true statements, and that reasoning is a matter of logical entailment: a conclusion is valid if it is true in every model in which the premises are true. This gives KRR a clear standard of correctness. However, pure first-order logic proved difficult to use directly. General theorem proving is computationally undecidable, meaning no algorithm can determine in all cases whether a conclusion follows from a set of premises. Moreover, the logic is monotonic: adding new information can only increase the set of conclusions, never retract an old one. This is a poor fit for human reasoning, which routinely jumps to conclusions that are later withdrawn in the face of new evidence.
Partly in response to the limitations of pure logic, and partly from a desire to model human cognition, a family of structured representation formalisms emerged in the 1970s. These went by various names—semantic networks, frames, and scripts—but shared a common idea: knowledge is organized around concepts and their relationships, rather than as a flat set of logical sentences.
A semantic network represents knowledge as a graph of nodes (concepts or individuals) connected by labeled edges (relations such as is-a or part-of). A frame is a more elaborate structure, a description of a typical object or situation with slots for attributes and values, often including default values and procedural attachments. These formalisms were intuitive and computationally convenient, and they supported a style of reasoning based on inheritance: a penguin is a bird, so it inherits the property of flying, unless a more specific rule overrides that default.
The problem with these early structured representations was their lack of a precise semantics. What exactly does it mean for one node to be connected to another? When is inheritance valid? Different systems gave different answers, and the same diagram could be interpreted in incompatible ways. This ambiguity led to a crisis in the field, and to a crucial development: the realization that structured representations could be given a rigorous meaning by translating them into logic. A semantic network, it turned out, could be viewed as a restricted set of first-order sentences; a frame could be viewed as a collection of definitions and defaults. This insight, developed in the late 1970s and 1980s, did not eliminate structured representations but rather placed them on a firmer foundation. It also revealed their limits: the intuitive power of a diagram often depended on subtle assumptions that were not captured by the logical translation.
Out of this convergence of logic and structured representations came description logics, a family of formal languages designed to capture the essential features of semantic networks and frames while retaining a clear, logical semantics. A description logic represents knowledge in terms of concepts (classes of individuals), roles (binary relations between individuals), and individuals. It allows one to state, for example, that Parent is a concept, hasChild is a role, and that Every parent has at least one child is an axiom.
The key contribution of description logics is a systematic study of the trade-off between expressiveness and computational complexity. By carefully restricting the allowed constructs—for example, allowing conjunction but not disjunction, or allowing some forms of quantification but not others—researchers could design languages for which reasoning is decidable and, in many cases, tractable. This made description logics the first family of KRR formalisms to offer both a rigorous semantics and practical algorithms. They became the basis for the Web Ontology Language (OWL), a standard for representing knowledge on the World Wide Web, and for the notion of an ontology: an explicit specification of the concepts and relationships in a domain, shared by a community of users.
The success of description logics illustrates a central lesson of KRR: there is no single best representation, only a space of designs with different trade-offs. A more expressive language can say more, but reasoning with it is harder. A less expressive language is computationally easier but may be unable to capture distinctions that matter. The field's history is in large part a history of mapping this space and finding useful points within it.
A separate line of research, also emerging in the late 1970s and 1980s, tackled the problem of default reasoning head-on. The issue is that human knowledge is full of general rules with exceptions: birds fly, but penguins do not; people typically have two legs, but some do not. In classical logic, a single exception invalidates a universal statement, so one cannot simply write "All birds fly" if penguins exist. Yet we routinely use such generalizations in reasoning.
Non-monotonic reasoning is the umbrella term for formalisms that allow conclusions to be drawn tentatively and retracted when new information arrives. Several distinct approaches were developed. Default logic adds default rules of the form "If P is true and it is consistent to assume Q, then conclude Q." Circumscription proposes that we should minimize the set of abnormal individuals: assume that things are normal unless there is evidence to the contrary. Autoepistemic logic models reasoning about one's own knowledge and ignorance: if I do not know that something is true, I may assume it is false.
These formalisms were mathematically sophisticated and captured important aspects of commonsense reasoning. However, they also revealed deep problems. The meaning of a non-monotonic system is often subtle: a set of defaults can have multiple, sometimes incompatible, sets of conclusions, and there is no universally agreed criterion for choosing among them. Moreover, these systems are generally more computationally complex than classical logic. While non-monotonic reasoning remains an active research area, it has not produced a single dominant formalism. Instead, it has influenced other parts of KRR, such as the treatment of exceptions in description logics and the design of logic programming languages.
A parallel tradition grew out of logic programming, particularly the language Prolog, developed in the early 1970s. In logic programming, a program is a set of Horn clauses—a restricted form of first-order logic—and computation is a form of logical deduction. The key innovation was the use of negation as failure: a query is answered by attempting to prove it, and a negated goal is considered true if the positive goal cannot be proven. This is a form of non-monotonic reasoning, since adding a new fact can cause a previously derived negation to fail.
Logic programming was initially developed as a programming paradigm, but it became deeply intertwined with KRR. The closed-world assumption—that everything not known to be true is false—is a natural fit for database and commonsense reasoning. In the 1990s, a more general formalism called answer set programming (ASP) emerged, extending logic programming with a richer semantics based on stable models. In ASP, a problem is encoded as a set of rules, and a solver computes the stable models of that program, each of which represents a possible set of conclusions consistent with the rules. ASP has proven useful for combinatorial problems, planning, and configuration, where it offers a declarative alternative to imperative programming.
The relationship between logic programming and the rest of KRR is complex. On one hand, ASP and related formalisms are clearly part of the KRR toolkit, offering a practical way to encode and solve reasoning problems. On the other hand, they are also general-purpose programming languages, and their use in AI has waxed and waned. What remains influential is the idea that reasoning can be understood as the computation of models of a logical theory, and that a well-chosen restriction of logic can yield both expressive power and computational feasibility.
A more recent development, beginning in the 2000s, is the rise of knowledge graphs. A knowledge graph is a large, graph-structured database of facts, typically represented as triples of the form (subject, predicate, object)—for example, (Paris, capitalOf, France). Major technology companies built such graphs to power search engines, question answering, and recommendation systems, and they have become a central practical artifact of KRR.
Knowledge graphs are, in a sense, a return to the semantic networks of the 1970s, but at an industrial scale and with a crucial difference: they are typically built not by hand-crafting a logical theory but by extracting facts from text, integrating databases, and crowdsourcing. This raises new challenges. The facts in a knowledge graph are often incomplete, noisy, and inconsistent. The schema—the set of types and relations—may be loose or absent. Reasoning over a knowledge graph therefore often means not logical deduction but link prediction: inferring that a relation is likely to hold based on patterns in the graph, using statistical or machine-learning methods.
This development has created a productive tension within KRR. On one side are the logical traditions, which emphasize precision, soundness, and a clear semantics. On the other side are the statistical and graph-based approaches, which emphasize scale, robustness, and the ability to learn from data. Some researchers seek to combine the two, using logical rules to constrain or explain statistical predictions, or using machine learning to refine a logical ontology. The field has not resolved this tension, and it is unlikely to do so: it reflects a genuine trade-off between the rigor of logic and the flexibility of data-driven methods.
The present landscape of KRR is best understood not as a single dominant paradigm but as a set of coexisting traditions, each with its own strengths and limitations. Description logics and ontologies remain the standard for formal, shared conceptualizations, particularly in domains like biomedicine and the Semantic Web. Non-monotonic formalisms and answer set programming continue to provide tools for commonsense and default reasoning, though they remain more specialized. Knowledge graphs have brought KRR into the mainstream of industrial AI, but at the cost of a looser connection to logical semantics.
Several cross-cutting concerns unify these traditions. One is the problem of knowledge acquisition: how to get knowledge into a system in the first place. Hand-engineering is expensive and error-prone, so much current research focuses on learning representations from data, whether by extracting facts from text or by learning embeddings that capture semantic similarity. Another is the problem of uncertainty: much real-world knowledge is not certain, and probabilistic and fuzzy logics have been developed to extend KRR to handle degrees of belief. A third is the problem of explanation: as AI systems are deployed in high-stakes settings, there is growing demand for systems that can explain why they reached a conclusion, which in turn requires representations that support such explanations.
KRR is sometimes described as the part of AI that asks what it means to know something, as opposed to merely processing data. That characterization is apt, but it should be qualified. The field does not aim to model human cognition in general, nor to solve the philosophical problem of knowledge. It aims, more modestly, to design computational artifacts—languages, data structures, and algorithms—that allow machines to store, combine, and use information in ways that are useful and, ideally, principled. The field's history shows that this goal is best served by a pluralistic approach: different problems call for different representations, and the art of KRR lies in choosing the right tool for the task, understanding its limits, and knowing how to combine it with others.