An RF model predicted survival status with high accuracy (AUC = 0.93), with sphingomyelin, apolipoprotein A2, and glycoprotein acetyls B among the top contributors.<h4>Conclusion</h4>Serum metabolomic profiles are closely linked to clinical outcomes in advanced NSCLC treated with pembrolizumab plus chemotherapy. The gene discussed is APOA2; the disease is non-small cell lung carcinoma.