An expert system is a program that uses specialized knowledge to solve problems at a level similar to a human expert. It consists of a knowledge base that stores facts, rules and relationships about a problem domain. An inference engine applies reasoning techniques to the knowledge base to provide solutions, explanations and advice. Expert systems are used in a variety of fields including medicine, engineering and business to assist or replace human experts when their knowledge is needed but they are unavailable.