This paper presents a machining error compensation methodology using an Artificial Neural Network (ANN) model trained by an inspection database of the On-Machine-Measurement (OMM) system. This is an application of the CAD/CAM/CAI integration concept. First, to improve machining and inspection accuracies, the geometric errors of a three-axis CNC machining centre and the probing errors are compensated using a closed-loop configuration. Then, a workpiece is machined using the machining centre, and the error distributions of the machined surface are inspected using OMM. In order to analyse efficiently the machining errors, two characteristic error parameters, Werr and Derr, are defined. Subsequently, these parameters are modelled using a Radial Basis Function (RBF) network approach as an ANN model. Based on the RBF network model, the tool path is corrected to effectively reduce the errors using an iterative algorithm. In the iterative algorithm, the changes of the cutting conditions can be identified according to the corrected tool path. In order to validate the approaches proposed in this paper, an experimental machining process is performed, and the results are evaluated. As a result, about 90% of machining error reduction can be achieved through the proposed approaches.