A medical diagnosis system that dynamically integrates two types of problem-solving agents to solve large problems is presented. It integrates a deep/model-based/fundamental type of system with a shallow/compiled/empirical type system. A functional-representation model serves as a deep reasoner, giving causal credence to diagnostic conclusions and finding interactions between partial conclusions that greatly reduce searches.