Back to Study Material Artificial Intelligence

Knowledge representation

For an AI system to reason about the world, it must have some way of storing and structuring what it knows. Knowledge representation is the study of how to...

Knowledge representation

Why Representation Matters

For an AI system to reason about the world, it must have some way of storing and structuring what it knows. Knowledge representation is the study of how to encode facts, relationships, and rules inside a computer in a form that supports efficient inference and reasoning. The choice of representation profoundly affects what conclusions a system can draw and how quickly it can draw them.

Propositional logic represents knowledge as simple true-or-false statements connected by logical operators. It is computationally tractable but lacks the expressive power to represent relationships between objects. First-order predicate logic, also called first-order logic or FOL, extends this by introducing variables, quantifiers, and predicates, allowing statements like "every bird can fly" or "Tweety is a bird" to be encoded formally. From those two statements, a reasoner can derive that Tweety can fly.

Semantic networks represent knowledge as graphs where nodes are concepts and edges are labelled relationships. For example, a node for "dog" might connect to a node for "animal" via an "is-a" edge, and to a node for "bone" via a "likes" edge. Frames are structured representations similar to objects in programming, grouping related attributes about a concept into a single data structure. An ontology goes further by defining a formal vocabulary for a domain along with axioms that govern valid relationships, enabling shared understanding across different systems.

Production Rules

Production rule systems encode knowledge as condition-action pairs: if a certain condition is true, then fire the associated action. Expert systems like MYCIN, which diagnosed bacterial infections, used hundreds of such rules. The advantage is modularity: new rules can be added without rewriting existing ones.

Interview Tip

Interviewers in AI roles often ask which representation is most appropriate for a given domain. A good answer weighs expressiveness against computational cost. First-order logic is expressive but inference can be undecidable. Semantic networks are intuitive but less precise. Mention that modern systems often combine representations, using neural networks for perception and symbolic logic for reasoning.