Knowledge & Reasoning

Knowledge representation and reasoning (KR&R) is the branch of AI concerned with writing down what is known about a domain in a form a machine can manipulate, then deriving new conclusions from it. Where machine learning fits functions to data, KR&R encodes facts, rules and uncertainty explicitly, which makes conclusions inspectable, auditable and correctable by editing knowledge instead of retraining. The two traditions increasingly meet: LLM agents call knowledge graphs and rule engines as tools, and retrieval systems ground generation in curated facts.


1. Topics

Expert Systems

Knowledge base plus inference engine that emulates a human specialist; the architecture behind MYCIN, XCON and modern decision services.

Rule-based Systems

IF-THEN production rules, forward and backward chaining, conflict resolution and the Rete match algorithm.

Knowledge-based Systems

Ontologies, frames, description logics and case-based reasoning: richer representations than flat rules.

Logic & Inference

Propositional and first-order logic, entailment, resolution, unification, SAT solvers and Datalog.

Bayesian Networks

Directed graphical models that factor a joint distribution; exact and approximate inference under uncertainty.

Fuzzy Logic

Degrees of truth, membership functions and Mamdani/Sugeno controllers for vague, graded concepts.

Knowledge Graphs

Entities and typed relations as a graph (RDF, property graphs), queried with SPARQL or Cypher and used to ground LLMs.

2. The Landscape: Certainty vs Structure

Reasoning Formalisms at a Glance handling of uncertainty / vagueness → expressive structure → Propositional logic true / false facts Rules / expert systems IF-THEN, chaining First-order / ontologies objects, relations, ∀ ∃ Fuzzy logic degrees of truth Bayesian networks probabilities + DAG Knowledge graphs typed edges, embeddings Statistical ML / LLMs implicit knowledge in weights; strong on noise, weak on audit and guarantees

A useful way to place the subtopics is along two axes. Moving up adds representational structure: from atomic propositions, to rules over attributes, to objects and relations with quantifiers. Moving right adds tolerance for uncertainty: crisp logic, then graded membership (fuzzy), then calibrated probability (Bayesian networks), then statistical learners whose knowledge is implicit. Positions are qualitative, but they explain why real systems often combine two or three of these.

3. Anatomy of a Reasoning System

Separate the Knowledge From the Engine Facts / evidence sensors, users, DBs Knowledge base rules, ontology, CPTs Inference engine chaining, resolution Conclusions decisions, beliefs Explanation why / how trace Domain experts edit the knowledge base; the generic engine stays unchanged.

Almost every system on this page shares one design principle: keep declarative knowledge separate from the generic procedure that reasons over it. The same inference engine serves many knowledge bases, domain experts can review the knowledge in their own terms, and every conclusion can be traced back to the facts and rules that produced it. That traceability is the main reason these techniques persist in regulated domains such as credit, insurance, clinical decision support and compliance.

4. Which Formalism When

NeedStart with
Codify explicit policies and regulationsRule-based systems / decision tables
Shared vocabulary, class hierarchies, consistency checkingOntologies (OWL, description logic)
Connected entity data, multi-hop questionsKnowledge graphs
Provable correctness, configuration, verificationLogic, SAT/SMT, Datalog
Diagnosis with noisy, missing evidenceBayesian networks
Smooth control from vague linguistic rulesFuzzy logic

5. KR&R in the LLM Era

LLMs hold a great deal of world knowledge implicitly, but they cannot guarantee consistency, cite the exact rule they applied, or be patched with a one-line fix. Practical architectures therefore use symbolic components as tools: an LLM translates a question into SPARQL, Cypher, SQL or a solver call; a knowledge graph or rule engine produces the answer; and the LLM explains it. Graph-RAG retrieves subgraphs instead of text chunks, and policy engines check LLM actions before they execute. See Agents & Tool Use (MCP) for the tool-calling side.