Knowledge representation and reasoning (KR&R)

Knowledge representation and reasoning is the branch of AI that stores knowledge about the world in a structured, machine-readable form and uses logical inference to draw new conclusions from it.

Knowledge representation and reasoning, or KR&R, deals with two linked questions: how to write down what a system knows so a computer can use it, and how to reason with it to reach conclusions nobody wrote down. Typical uses include medical diagnosis and question answering. Given the facts that amoxicillin is a penicillin and that every penicillin is an antibiotic, a reasoner can conclude that amoxicillin is an antibiotic, and it can show exactly which facts it used.

The field has produced many formats. Semantic networks link concepts with labelled relationships, much like today's knowledge graphs. Frames, developed by Marvin Minsky in the mid-1970s, describe a type of thing with slots for its properties. Rules take the form IF this THEN that. Logic programming languages such as Prolog treat logical statements as programs. Ontologies define the concepts of a domain and how they relate; OWL, built on RDF, is the ontology language of the Semantic Web.

The ambition goes back to AI's beginnings. In 1959 Allen Newell and Herbert Simon's General Problem Solver aimed at general problem-solving, and John McCarthy proposed using predicate logic to give programs common sense. Expert systems in the 1970s and 1980s separated a knowledge base of facts and rules from an inference engine that applied them. Doug Lenat's Cyc project set out to encode everyday common-sense knowledge by hand.

In a 1993 AI Magazine article, Randall Davis, Howard Shrobe and Peter Szolovits described five roles a representation plays: a stand-in for things in the world, a set of commitments about what to pay attention to, a partial theory of reasoning, a medium for efficient computation, and a way for people to express knowledge. The field also faces a lasting trade-off. The more a language can express, the harder it is to reason with efficiently, so designers often choose restricted languages that a computer can reason with quickly.

Large language models take the opposite route, absorbing knowledge implicitly into billions of parameters rather than storing it as explicit facts and rules. That makes them flexible but hard to inspect or correct. KR&R ideas are returning in systems that pair language models with knowledge graphs and ontologies, and in neurosymbolic AI, because explicit knowledge can be checked, updated and explained in ways a model's weights cannot.

Common questions

What is knowledge representation and reasoning in AI?

It is the part of AI concerned with storing knowledge in a structured form a computer can use, such as facts, rules or ontologies, and with reasoning over that knowledge to draw conclusions. It underpins expert systems, knowledge graphs and the Semantic Web.

What are examples of knowledge representation?

Common examples are semantic networks, frames, IF-THEN rules, logic, ontologies and knowledge graphs. Each offers a different balance between how much it can express and how easily a computer can reason with it.

What is the difference between knowledge representation and a knowledge graph?

Knowledge representation is the whole field of methods for encoding knowledge for computers. A knowledge graph is one particular representation, storing facts as entities connected by labelled relationships. Knowledge graphs descend from the semantic networks of early AI research.

Do large language models use knowledge representation?

Not in the classic explicit sense. A language model stores what it has learned implicitly across its parameters rather than as readable facts and rules, though some researchers regard such networks as a kind of representation in their own right. Many systems now connect language models to explicit knowledge sources such as knowledge graphs to make answers easier to check.

Finding more

Search for "knowledge representation and reasoning", "description logic ontology" or "knowledge graphs and large language models" to explore the field. AI textbooks, the proceedings of the KR conference and the 1993 Davis, Shrobe and Szolovits article are dependable sources. Treat claims that a product 'understands' a domain because it uses an ontology with care, since the quality depends entirely on how well the knowledge was modelled.

Working out what this means for your business?

Aileron Shift builds the systems behind this site: AI newsrooms that research, write and publish on their own, marketing automation and WordPress hosting for companies that need to move faster than their competitors.