We study the inspection scheduling decisions for a production process that goes through a hidden defective state before its failure. The production process is equipped with a predictive model, generating alert and no-alert signals. An alert signal indicates that production process is in the defective state, while a no-alert signal indicates it is in the healthy state. The signals are imperfect, meaning that an alert signal can be generated for a healthy process and a no-alert signal can be generated for a defective process. Only a costly inspection can detect the true condition. We introduce a new inspection policy, which generalizes the age-based inspection policy that performs planned inspections at predetermined intervals, by considering that an inspection can also be triggered by a certain number of alerts from the predictive model. To optimize the proposed inspection policy, a stochastic dynamic programming model is formulated with the objective of minimizing the long-run expected cost rate. The performance improvement achieved by the optimal policy is quantified by comparing it to practically relevant benchmark policies. Numerical experiments with a set of realistic problem instances show that adding alert-triggered inspections to traditional age-based inspection scheduling brings up to 44% reduction in the expected cost rate when the predictive model is sufficiently accurate. Characterizing the performance of the optimal policy at a given level of imperfectness is especially useful in practice as it allows making an assessment on how much can be invested to justify a certain level of improvement in the predictive model.