This paper describes the background surrounding the need for risk analysis of commercial business within the domain of bank lending and of the development of an expert system for that task. Previous attempts at constructing expert systems in this area have either proved unsuccessful, software difficulties often being cited as the cause; or have stopped short of encapsulating all the relevant expertise. This paper considers the relevance of knowledge engineering to successful expert system construction. It reports on the development and structure of COMPASS, the Bank of Scotland's commercial lending adviser expert system which, by appropriate application of knowledge engineering, has succeeded in capturing and modelling the inherent risk of the Bank of Scotland's commercial lending process. The stages of its development are outlined; the knowledge elicitation process is described; knowledge articulation is examined from the perspective of the expert; the architecture of the system is explained; and the consultation procedure is described. In addition, reference is made to major attempts elsewhere to produce lending adviser expert systems; and the advantages; by-products, and long-term benefits of COMPASS are summarized.