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.
Knowledge base plus inference engine that emulates a human specialist; the architecture behind MYCIN, XCON and modern decision services.
IF-THEN production rules, forward and backward chaining, conflict resolution and the Rete match algorithm.
Ontologies, frames, description logics and case-based reasoning: richer representations than flat rules.
Propositional and first-order logic, entailment, resolution, unification, SAT solvers and Datalog.
Directed graphical models that factor a joint distribution; exact and approximate inference under uncertainty.
Degrees of truth, membership functions and Mamdani/Sugeno controllers for vague, graded concepts.
Entities and typed relations as a graph (RDF, property graphs), queried with SPARQL or Cypher and used to ground LLMs.
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.
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.
| Need | Start with |
|---|---|
| Codify explicit policies and regulations | Rule-based systems / decision tables |
| Shared vocabulary, class hierarchies, consistency checking | Ontologies (OWL, description logic) |
| Connected entity data, multi-hop questions | Knowledge graphs |
| Provable correctness, configuration, verification | Logic, SAT/SMT, Datalog |
| Diagnosis with noisy, missing evidence | Bayesian networks |
| Smooth control from vague linguistic rules | Fuzzy logic |
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.