For process modelling of complex and dynamic industrial processes, it has been proven that just-in-time learning (JITL) method has some advantages. The key to success of JITL modelling is how to select appropriate relevant samples for modelling. However, the size of most relevant samples selected by using traditional similarity indexes is difficult to be determined and still needs further research. To handle the problem, a novel relevant sample selection method is proposed in this work by constructing a similarity index based on Gaussian kernel function. In the method, confidence value is used to replace traditional error limit as a threshold value for relevant sample selection. Meanwhile, the bagging strategy is used to resample samples from selected samples to avoid setting the size of selected samples. In this work, the common modelling method on industrial processes, partial least square (PLS), is used to build regression models. To verify the proposed method, a mathematical model of a nonlinear system and the benchmark of a Penicillin fermentation process simulation were both studied. Results show that compared to traditional JITL methods, the proposed method has significant advantages in terms of the robustness and prediction precision of the model.