Knowledge representation is the branch of artificial intelligence that studies how facts, concepts, relationships and rules about the world can be encoded in a formal structure so that a computer program can store them, retrieve them and draw new conclusions from them. It is usually paired with reasoning, and the combined field is often called knowledge representation and reasoning (KR&R).
Among the AI fundamentals, knowledge representation sits at the boundary between what a system knows and how it thinks. A representation is never neutral: the choice of formalism decides which questions are easy to answer, which are expensive, and which cannot be expressed at all.
What a knowledge representation must provide
A knowledge representation is useful only when it supports storage, inference and communication at the same time. The classic analysis of the field describes a representation as a surrogate for the world, a set of ontological commitments about what exists, a fragment of a theory of intelligent reasoning, a medium for efficient computation and a medium of human expression.
In practice, every formalism combines three elements. The syntax defines which expressions are well formed, the semantics defines what those expressions mean in terms of the modeled world, and the inference procedure defines which new statements may be derived. A formalism with clear semantics lets engineers prove that a conclusion is correct rather than merely plausible.
The table below lists the core properties by which knowledge representation languages are evaluated.
| Property | Question it answers | Practical consequence |
|---|---|---|
| Expressiveness | What can be stated at all | Richer languages model more of the domain |
| Soundness | Are derived facts always true | Prevents false conclusions |
| Completeness | Are all true consequences derivable | Prevents missed answers |
| Decidability | Does reasoning always terminate | Guarantees an answer in finite time |
| Computational complexity | How cost grows with knowledge size | Limits the scale of real deployments |
| Readability | Can experts inspect and correct it | Supports maintenance and audit |
Main families of representation formalisms
Knowledge representation formalisms fall into a small number of families, each with a characteristic strength. Logic-based formalisms such as first-order logic and description logics offer precise semantics, while structured formalisms such as semantic networks and frames emphasize the organization of concepts into hierarchies.
Modern systems frequently combine several families. A knowledge graph may store facts as subject, predicate and object triples in RDF, describe its schema with an OWL ontology based on description logic, and attach production rules for business logic. The following table compares the main families.
| Formalism | Basic unit | Typical strength | Typical weakness |
|---|---|---|---|
| First-order logic | Predicates and quantifiers | High expressiveness | Undecidable in general |
| Description logics | Concepts, roles, individuals | Decidable classification | Limited rule expressiveness |
| Semantic networks | Nodes and labeled links | Intuitive concept maps | Vague semantics in early forms |
| Frames | Slots with default values | Inheritance of defaults | Weak formal inference |
| Production rules | If-then rules | Transparent decision logic | Rule conflicts at scale |
| Probabilistic models | Variables with distributions | Handles uncertainty | Costly exact inference |
Standards matter in this area. The W3C Semantic Web stack defines RDF for triples, RDFS and OWL for ontologies, and SPARQL for queries, which allows knowledge bases built by different organizations to be merged and queried consistently.
The expressiveness and tractability trade-off
The central tension in knowledge representation is that more expressive languages are harder to reason with. Full first-order logic can describe almost any domain, but checking whether a statement follows from a knowledge base is only semi-decidable, so a reasoner may run forever on some queries.
Description logics illustrate how designers manage this trade-off. The OWL 2 standard defines several profiles, each restricting the language to guarantee a better complexity class. The table shows how the choice of profile changes reasoning cost.
| Language or profile | Reasoning complexity | Typical use |
|---|---|---|
| OWL 2 DL | N2EXPTIME-complete | Rich domain ontologies |
| OWL 2 EL | Polynomial time | Large biomedical terminologies |
| OWL 2 QL | Rewritable to database queries | Ontology access over relational data |
| OWL 2 RL | Polynomial, rule-based | Rule engines and triple stores |
Worst-case complexity does not always predict real performance, because optimized reasoners handle many large ontologies quickly. Nevertheless, choosing the weakest language that covers the requirements remains the standard engineering recommendation.
Knowledge representation in symbolic and learned systems
Knowledge representation began as the foundation of symbolic AI, where expert systems stored human expertise as explicit rules interpreted by an inference engine. In that tradition, knowledge is explicit, inspectable and editable by domain experts working with knowledge engineers.
Machine learning shifted much of the field toward learned representations, in which knowledge is distributed across model weights and embeddings rather than written down. These representations capture statistical regularities extremely well but are difficult to inspect or correct directly. The table contrasts the two approaches.
| Aspect | Explicit representation | Learned representation |
|---|---|---|
| Source of knowledge | Experts and curated data | Patterns in training data |
| Transparency | Each fact can be inspected | Knowledge spread across weights |
| Updating a fact | Edit one statement | Retraining or model editing |
| Handling noise | Brittle without extensions | Robust to noisy input |
| Guarantees | Provable consequences | Statistical behavior only |
Neuro-symbolic AI and retrieval-augmented systems attempt to combine both. A language model can retrieve verified facts from a knowledge graph, which reduces unsupported statements while keeping the flexibility of natural language interaction.
Persistent problems and common mistakes
Several problems have accompanied knowledge representation since its origins. The frame problem concerns how to state efficiently what does not change after an action, and the qualification problem concerns the impossibility of listing every precondition of an action. Both motivate non-monotonic reasoning, in which conclusions can be withdrawn when new information arrives.
- Commonsense knowledge is vast and mostly implicit, so manual encoding efforts have struggled to reach adequate coverage.
- Ontology drift occurs when the meaning of a concept changes across teams or over time without the formal model being updated.
- Confusing classes with instances, such as modeling a specific product as a category, produces incorrect inferences.
- Overusing expressive constructs makes reasoning slow without improving the answers that users actually need.
- Ignoring uncertainty forces a crisp logic onto evidence that is only probable, which yields overconfident conclusions.
Experienced practitioners therefore start from concrete competency questions, the queries the system must answer, and design the representation backward from them rather than modeling the entire domain in advance.
A plain-language summary
Knowledge representation is about writing down what a computer should know in a form it can actually use. A person can read a sentence and understand it, but a program needs facts arranged in a strict format, such as a family tree or a set of if-then rules.
Think of it as the difference between a pile of notes and a well-organized library catalog. Both hold information, but only the catalog lets someone find a book quickly and see how topics relate. The chosen format decides what the computer can figure out on its own.
An example from practice
A hospital network wants clinical software to flag drug combinations that may be dangerous for a patient. Its informatics team builds an ontology in OWL 2 EL that describes about 40,000 drug concepts, their active ingredients, ingredient classes and known interaction classes, and links it to coded diagnoses in patient records.
Because the ontology encodes that a specific medicine contains an ingredient belonging to a class that interacts with anticoagulants, the reasoner can warn a prescriber even when that exact pair never appears in any interaction list. When pharmacists later add a new medicine, they enter only its ingredients, and the classification step places it automatically.
The outcome is fewer missed interaction alerts and a knowledge base that clinical pharmacists can review statement by statement, which supports the audit requirements that apply to clinical decision support software.