The surface-enhanced Raman scattering (SERS) based detection method is a promising new technique. Its excellent trace detection performance brings great convenience for detecting pharmacodynamic substances in traditional Chinese medicine(TCM). In this paper, a biosensor with excellent performance was successfully designed and prepared by magnetron sputtering technology, and trace detection of bitter amygdalin was carried out. According to the experimental data, the substrate has an experimental enhancement factor (EEF) of 5.71 × 105 when R6G was used as the probe molecule. The limit of detection (LOD) of bitter amygdalin was as low as 1 × 10−6 g/l. Therefore, the Ag/vanadium-titanium (V-Ti) substrate has excellent potential for the trace detection of the pharmacodynamic substances of traditional Chinese medicine. In the machine learning test, the R6G Raman spectra of different concentrations were distinguished by support vector machine (SVM) with a correct rate of 83%. The high accuracy rate also indicates that machine learning has excellent prospects in the field of SERS.