In this paper, we propose a novel semi-analytic physics informed neural network (PINN) method for solving singularly perturbed boundary value problems. The PINN is a scientific machine learning framework that shows great promise for finding approximate solutions to partial differential equations. PINNs have demonstrated impressive performance in solving a variety of differential equations, including time-dependent and multi-dimensional equations involving complex domain geometries. However, when it comes to stiff differential equations, neural networks in general struggle to capture the sharp transition of solutions, due to the spectral bias. To address this limitation, we develop a semi-analytic PINN approach, which is enriched by incorporating the so-called corrector functions obtained from boundary layer analysis. Our enriched PINN approach provides accurate predictions of solutions to singular perturbation problems. Our numerical experiments cover a wide range of singularly perturbed linear and nonlinear differential equations. Overall, our approach shows great potential for solving challenging problems in the field of partial differential equations and machine learning.