A knowledge-based system (KBS) is a computer program that reasons and uses a knowledge base to solve complex problems. The term is broad and is used to refer to many different kinds of systems; the one common theme that unites all knowledge based systems is an attempt to represent knowledge explicitly via tools such as ontologies and rules rather than implicitly via code the way a conventional computer program does. A knowledge based system has three types of sub-systems: a knowledge base, an user interface and an inference engine. The knowledge base represents facts about the world, often in some form of subsumption ontology. The inference engine represents logical assertions and conditions about the world, usually represented via IF-THEN rules.
Knowledge-based systems were first developed by artificial intelligence researchers. These early knowledge-based systems were primarily expert systems – in fact, the term is often used synonymously with expert systems. The difference is in the view taken to describe the system: "expert system" refers to the type of task the system is trying to assist with – to replace or aid a human expert in a complex task; "knowledge-based system" refers to the architecture of the system – that it represents knowledge explicitly (rather than as procedural code). While the earliest knowledge-based systems were almost all expert systems, the same tools and architectures can and have since been used for a whole host of other types of systems – i.e., virtually all expert systems are knowledge-based systems, but many knowledge-based systems are not expert systems.
The first knowledge-based systems were rule based expert systems. One of the most famous was Mycin a program for medical diagnosis. These early expert systems represented facts about the world as simple assertions in a flat database and used rules to reason about and as a result add to these assertions. Representing knowledge explicitly via rules had several advantages: