Knowledge representation approaches in AI are the different ways a system can store facts, rules and relationships about the world so it can use them to answer questions and draw conclusions. Researchers call this work knowledge representation, or KR for short. A system that needs to know that a bus is a kind of vehicle, or that a bird usually flies, has to encode that information somehow before it can reason with it.
How knowledge is represented shapes what a system can express, how easily it combines facts, how it handles things it doesn’t know, and how well a person can check its reasoning. No single approach suits every problem, so most AI work involves choosing a representation that fits the task.
Symbolic approaches
Symbolic approaches store knowledge as explicit symbols, such as words, labels and logical formulas, along with rules for combining them. Much of this work came out of the early decades of AI research, and many of its ideas are still in use.
Logic
Logic is the most formal of these approaches. Propositional logic works with statements that are either true or false, such as “it is raining.” First-order predicate logic adds objects, properties, relations and quantifiers such as “for all” and “there exists.” Given the statements “all humans are mortal” and “Socrates is human,” a system can conclude that “Socrates is mortal.”
Logic has a precise meaning and well-studied rules for drawing conclusions. Its limits show up with real-world knowledge, which is often uncertain or full of exceptions, and classical logic handles those cases awkwardly. For worked examples, see first order predicate logic in artificial intelligence examples.
Semantic networks
A semantic network stores knowledge as a graph. Nodes stand for concepts or objects, and labeled links stand for relationships between them. A common link is “is a,” which lets a system pass properties down a hierarchy. If a canary is a bird, and birds generally fly, the system can infer that a canary flies unless something overrides that default.
Semantic networks date back to the 1960s and remain a clear way to show how concepts connect. For small, concrete graphs, see semantic network in artificial intelligence examples.
Frames
Marvin Minsky proposed frames in the 1970s as a way to organize knowledge about typical situations. A frame is a structure with named slots, and each slot holds a value or a default. A restaurant frame, for example, might have slots for a menu, a server and a way to pay. When the system meets a new situation, it fills in the slots it can observe and falls back on defaults for the rest. Frames can also attach small procedures that run when a slot is read or changed.
Many programmers find frames familiar, since they resemble objects with properties. For a worked look at the idea, see frame based system in artificial intelligence examples.
Production rules
Production rules, also called if-then rules, store knowledge as conditions and actions. An example is “if the engine won’t start and the battery light is on, then check the battery connections.” A rule-based system keeps a set of known facts, finds the rules whose conditions match, and applies them. It can reason forward from facts toward conclusions, or backward from a goal toward the facts needed to support it.
Early expert systems leaned heavily on rules. MYCIN, developed at Stanford in the 1970s, used rules to help identify bacterial infections and suggest treatments. Rules are easy to read and explain, which is useful when a person needs to understand a decision. Large rule sets can become hard to maintain, though, because rules interact in ways that are easy to miss. For how systems draw conclusions from stored rules and facts, see types of inference in artificial intelligence.
Ontologies and knowledge graphs
An ontology is a formal description of a domain. It names the kinds of things in the domain, the relationships that can hold between them, and constraints on how those relationships may be used.
Knowledge graphs store facts as subject, predicate and object triples, such as (Paris, capital of, France). Standards such as RDF and the Web Ontology Language (OWL) provide shared ways to write these down, so different systems can read the same data. Knowledge graphs are used in many search and question-answering systems.
Approaches that handle uncertainty
Classical logic treats a statement as true or false. Much of what people know is uncertain, though. A weather forecast or a medical guess comes with degrees of confidence, not certainty.
Bayesian networks address this. They are graphs in which each node is a variable, and arrows show which variables directly influence others. Each node holds a table of probabilities that depends on the nodes pointing into it. Rain and a sprinkler can both make the grass wet, so a network might link both to a “wet grass” node. The network can then answer questions such as how likely it is that it rained, given that the grass is wet. Readers who want the mechanics can start with explain bayesian network in detail.
Combining logic with probability is an active area of study, and symbolic reasoning under uncertainty in artificial intelligence looks at how systems try to do both.
Learned representations
Neural networks take a different route. Instead of writing knowledge down as explicit symbols, a neural network learns numerical patterns from data. What it knows is held in the values of its weights, spread across many numbers rather than stored as one readable fact.
Word embeddings show the idea in a simple form. Each word becomes a list of numbers called a vector, and words that appear in similar contexts tend to get similar vectors. Large language models store a great deal of information this way, learned from very large amounts of text.
The trade-off is that learned knowledge is hard to inspect. You cannot read one fact from a set of weights the way you can read a rule, and a model can give a confident answer that is wrong. Checking outputs still matters. Learning general rules from specific examples is the idea behind inductive learning in artificial intelligence example.
Comparing the approaches
The table gives a quick side-by-side view. The entries are general, and real systems often mix several of these methods.
| Approach | How knowledge is stored | Main strength | Main limitation |
|---|---|---|---|
| Logic | Formal statements | Precise meaning and clear inference | Rigid, and awkward with uncertainty and exceptions |
| Semantic networks | Labeled graph of concepts | Shows relationships and inheritance | The meaning of links can be loosely defined |
| Frames | Structures with slots and defaults | Fits typical situations | Defaults can be wrong for unusual cases |
| Production rules | If-then rules | Easy to read and explain | Large rule sets get hard to maintain |
| Ontologies and knowledge graphs | Classes and triples | Shareable across systems | Building and keeping them current takes effort |
| Bayesian networks | Graph with probability tables | Handles uncertainty | Probability tables grow large as connections increase |
| Learned representations | Weights and vectors | Learns patterns from large datasets | Hard to inspect, and can be confidently wrong |
Hybrid approaches
Many modern systems combine methods. Neuro-symbolic AI is the name for work that pairs neural networks with symbolic reasoning. A learned model might read text and extract candidate facts, while a logic-based or rule-based component checks those facts against known constraints. A knowledge graph can also supply facts that a language model then uses in its answer. This is an active research area, and there is no agreed best combination.
Which approach to study first
A reasonable order for learners is to start with logic and semantic networks, since they make the basic ideas of symbols, relationships and inference easy to see. Rules and frames come next, followed by probabilistic models such as Bayesian networks. Learned representations are often studied last, because they build on statistics and neural networks.
A useful question to ask of any method is what it stores, how it reasons, and how a person can check the result.