In this paper, we propose and study a risk model with two types of claims in which the insurer may invest into a prevention plan which decreases the intensity of large claims without impacting the small claims. We identify a necessary and sufficient condition for insurers to use prevention if there is no surplus. If, in addition, the severity of large claims dominates that of small claims by the harmonic mean residual life (HMRL) order, insurers invest more in prevention in the presence of a surplus.Finally, we characterize the asymptotic optimal prevention strategy when the initial surplus tends to infinity in the two main cases where both claim types