In development of an expert system, there is a problem that when sufficient knowledge is provided for solving a problem, the amount of information to be processed is increased thereby retarding the processing operation, and furthermore descriptive information is not used practically when descriptive information is insufficient and the problem cannot be analyzed sufficiently. In order to solve this problem, there is provided a function of extracting knowledge required to solve problems within a certain range from detailed knowledge automatically. The expert system includes a first knowledge base for storing detailed knowledge, a second knowledge base for storing compiled knowledge, an inference mechanism for solving a problem by using the second knowledge base, and an analysis mechanism for extracting knowledge having high utilization from the first knowledge base and storing the extracted knowledge in the second knowledge base. The analysis mechanism analyzes a problem solving process example and stores a combination of knowledge which is frequently used as one compiled knowledge and knowledge which is frequently used independently as one compiled knowledge from the first knowledge base into the second knowledge base.