Knowledge representation and reasoning (KRR) stores facts in a form AI can reason over. How it works, the main techniques, types of reasoning, and its limits.

Updated September 2026
Knowledge representation and reasoning (KRR) is the field of AI that encodes facts about the world in a structured form a computer can process, such as rules, logic, ontologies, or knowledge graphs. An inference engine then draws new conclusions from those facts. The representation decides what the system can express. The reasoning decides what it can conclude, and how fast.
Every conclusion a KRR system reaches can be traced back to the exact facts and rules that produced it. Expert systems were built this way, and the approach now returns as a way to supply large language models with checked facts.
Knowledge representation and reasoning (KRR) involves structuring information in a way that a computer can understand and use to make decisions with human-like reasoning.
Knowledge representation refers to structuring information using methods such as ontologies, knowledge graphs, semantic networks, frames, and logic programs. These methods enable the representation of relationships and hierarchies within data, making it easier to model complex knowledge.
Reasoning is the process of drawing conclusions, making inferences, and solving problems based on the represented knowledge. Reasoning engines perform logical operations on the knowledge to derive new information.
A KRR system has two core components: a knowledge base that holds what the system knows, and an inference engine that works out what follows from it.
This content was generated with the assistance of AI. Our AI prompt chain workflow is carefully grounded and preferences .gov and .edu citations when available. All content is reviewed by a Telnyx employee to ensure accuracy, relevance, and a high standard of quality.
A KRR system works by applying the rules in its knowledge base to known facts until it reaches a conclusion. Along the way, it records which facts and rules it used. Take a knowledge base with one fact, "a dolphin is a mammal," and one rule, "every mammal breathes air." The inference engine matches the fact to the rule and derives a new fact: a dolphin breathes air.
That new fact goes back into the knowledge base, where later rules can build on it. Ask the system why it concluded that dolphins breathe air, and it points to the exact fact and rule. That traceability makes KRR systems a natural fit for explainable AI.

The main knowledge representation techniques are logic, rules, semantic networks, frames, ontologies, and knowledge graphs. They differ in how much they can express and how efficiently a machine can reason over them.
| Technique | How it stores knowledge | Example |
|---|---|---|
| Logic | Statements that are true or false, with quantifiers such as "every" and "some" | Every mammal breathes air |
| Rules | If-then statements an engine can fire | If an invoice is unpaid after 30 days, flag it |
| Semantic networks | Concepts as nodes, relationships as labeled links | Dolphin is-a mammal |
| Frames | Records with slots for an object's attributes | A car frame with slots for make, model, and owner |
| Ontologies | Classes, properties, and constraints with formally defined meaning | An OWL ontology of diseases and their symptoms |
| Knowledge graphs | Entities and typed relationships at large scale | A graph linking companies, people, and products |
Many of these arrange concepts in a tree, from general to specific, so a property set on "mammal" passes down to "dolphin." Semantic networks and frames both work this way. A decision tree can be read the same way, as a set of if-then rules with one rule per path from root to leaf. Rule-based AI systems encode decisions in that form.
Neural networks store knowledge differently. What they learn is spread across numeric weights rather than written down as statements. That puts them outside knowledge representation in the KRR sense, and it makes their conclusions hard to trace.
The three core types of reasoning in AI are deductive, inductive, and abductive. They differ in how certain their conclusions are.
Deductive reasoning draws specific conclusions from general rules. The dolphin example is deduction: if every mammal breathes air and a dolphin is a mammal, a dolphin must breathe air. In a valid deductive argument, the Internet Encyclopedia of Philosophy notes, "if the premises are true, the conclusion must be true." Expert systems rely on this kind of reasoning. Knowledge-based reasoning in AI usually means deduction over an explicit knowledge base.
Inductive reasoning moves the other way, from specific observations to a general rule. A model that sees thousands of labeled emails and learns what spam looks like reasons inductively. Supervised learning, including training a neural network, works this way. The conclusion is probable, not guaranteed.
Abductive reasoning picks the most likely explanation for what it observes. A diagnostic system that sees a set of symptoms and proposes the disease that best fits them reasons abductively. Its answer can change as new evidence arrives.
Real systems often need to reason under uncertainty, which classical true-or-false logic cannot express. Probabilistic models attach likelihoods to facts, and statistical relational learning combines logic with probability.
Knowledge representation and reasoning is used wherever a system must reach conclusions it can justify: expert systems, the Semantic Web, knowledge graphs, and automated planning.
Expert systems are the classic case: they encode a specialist's knowledge as rules and apply them to each new case. The Semantic Web gives the same idea a standard format. The W3C defines OWL 2 as "an ontology language for the Semantic Web with formally defined meaning." Ontologies written in it describe domains as large as clinical medicine.
Knowledge graphs store facts about entities and their relationships at scale. Planning systems reason about actions and their effects to find a sequence of steps that reaches a goal.
The main challenges of knowledge representation and reasoning are the trade-off between expressive power and speed, the frame problem, the symbol grounding problem, and the cost of building and maintaining the knowledge itself.
The more a representation can express, the harder it becomes to reason over quickly. The W3C's OWL 2 profiles exist for this reason: each one is a trimmed-down version of OWL 2 that "trades some expressive power for the efficiency of reasoning." The OWL 2 EL profile, for example, answers its basic reasoning questions in polynomial time and can still express SNOMED CT, a very large clinical terminology.
The frame problem is the challenge of describing what an action changes without also listing everything it leaves unchanged. The Stanford Encyclopedia of Philosophy traces it to McCarthy and Hayes in 1969. Their problem was representing the effects of an action in logic without writing out "a large number of intuitively obvious non-effects."
The symbol grounding problem asks how a system's symbols can mean anything on their own. Stevan Harnad's classic paper compares a symbol system to learning Chinese from a Chinese-to-Chinese dictionary. Every definition points only to more symbols, so meaning has to connect to something outside the system.
A knowledge base is only as good as the facts people put into it, and those facts go stale. Pan and colleagues note that knowledge graphs are difficult to construct and evolving by nature, which makes keeping them complete and current a standing cost.

The future of knowledge representation and reasoning lies in combining it with neural networks, so each covers the other's weakness. Pan and colleagues describe large language models as black-box models that "often fall short of capturing and accessing factual knowledge," while knowledge graphs "explicitly store rich factual knowledge." Their roadmap argues for unifying the two.
In practice, a knowledge graph can supply a large language model with verified facts at the moment it answers. That technique is covered under grounding in AI, and it helps reduce AI hallucinations. The language model, in turn, can help construct and complete the graph, a direction the same roadmap calls LLM-augmented knowledge graphs. The combined approach is called neuro-symbolic AI, and Garcez and Lamb describe it as an active area of research that brings together learning in neural networks with reasoning and explainability from symbolic representations.
To check whether a system reasons in the KRR sense, ask it why it reached a conclusion and look up each fact and rule it names in its knowledge base. A KRR trace points to stored entries you can inspect. A language model's explanation is generated text, and Turpin and colleagues found that such explanations can systematically misrepresent the true reason for a model's answer.
KRR stands for knowledge representation and reasoning, the branch of artificial intelligence that encodes facts in a structured form and draws conclusions from them by logic. The acronym covers both halves: the representation that stores knowledge, and the reasoning that uses it.
Knowledge and reasoning in AI refers to how a system stores what it knows and how it uses that store to reach new conclusions. The knowledge sits in rules, ontologies, or knowledge graphs, and an inference engine reasons over it.
A common example of knowledge representation is a semantic network that links "dolphin" to "mammal" with an is-a relationship, so the system knows every property of mammals also applies to dolphins. Other examples include if-then rules in an expert system and an OWL ontology describing diseases and their symptoms.
A neural network stores knowledge, but not as knowledge representation in the KRR sense. Its knowledge is spread across learned weights rather than written as statements a person can read. That is why neural networks reason inductively, and why their conclusions are hard to trace.
The key issues in knowledge representation are the trade-off between expressive power and reasoning speed, the frame problem, and the symbol grounding problem. Building and updating the knowledge base adds an ongoing cost.