Existing expert systems have a high percentage agreement with experts in a particular field in many situations. However, in many ways their overall behavior is not like that of a human expert. These areas include the inability to give flexible, functional explanations of their reasoning processes, and the failure to degrade gracefully when dealing with problems at the periphery of their knowledge. These two important shortcomings can be improved when the right knowledge is available to the system. This paper presents an expert system design, called the integrated diagnostic model (IDM), that integrates two sources of knowledge, a shallow, reasoning-oriented, experiential knowledge base and a deep, functionally oriented, physical knowledge base. To demonstrate the IDM's usefulness in the problem area of diagnosis and repair, an implementation in the mechanical domain is described.