In this study, SERS coupled with chemometric algorithms like PLS (partial least square), Si-PLS (synergy interval-PLS), GA-PLS (genetic algorithm-PLS) and UVE-PLS (uninformative variable elimination-PLS) were applied for the detection of 2,4-D and imidacloprid in milk. The fabricated gold and silver core-shell nanoflowers (Au@Ag NFs) were used as SERS nanosensor which exhibited strong signal over the concentration range of 1.0 × 10−3 to 1.0 × 102 ng/mL. Performances of the models were evaluated based on the attained correlation coefficients of the prediction (Rp) and calibration (Rc), root mean square error in calibration (RMSECV) and prediction (RMSEP), and the ratio of sample standard deviation to RMSEP (RPD). The models exhibited improved results in the order of PLS < Si-PLS < GA-PLS < UVE-PLS. The UVE-PLS model showed superior performance, yielded Rc = 0.9801 and Rp = 0.9878 with RPD = 6.32 for 2,4-D, and Rc = 0.9732 and Rp = 0.9726 with RPD = 4.30 for imidacloprid. The strategy could be employed for safety and quality monitoring of milk.