IntroductionCompared to other types of breast cancer, triple-negative breast cancer (TNBC) does not effectively respond to hormone therapy and HER2 targeted therapy, showing a poor prognosis. There are currently a limited number of immunotherapeutic drugs available for TNBC, a field that requires additional development.MethodsCo-expressing genes with M2 macrophages were analyzed based on the infiltration of M2 macrophages in TNBC and the sequencing data in The Cancer Genome Atlas (TCGA) database. Consequently, the influence of these genes on the prognoses of TNBC patients was analyzed. GO analysis and KEGG analysis were performed for exploring potential signal pathways. Lasso regression analysis was conducted for model construction. The TNBC patients were scored by the model, and patients were divided into high- and low-risk groups. Subsequently, the accuracy of model was further verified using GEO database and patients information from the Cancer Center of Sun Yat-sen University. On this basis, we analyzed the accuracy of prognosis prediction, correlation with immune checkpoint, and immunotherapy drug sensitivity in different groups.ResultsOur findings revealed that OLFML2B, MS4A7, SPARC, POSTN, THY1, and CD300C genes significantly influenced the prognosis of TNBC. Moreover, MS4A7, SPARC, and CD300C were finally determined for model construction, and the model showed good accuracy in prognosis prediction. And 50 immunotherapy drugs with therapeutic significance in different groups were screened, which were assessed possible immunotherapeutics that have potential application and demonstrated the high precision of our prognostic model for predictive analysis.ConclusionMS4A7, SPARC, and CD300C, the three main genes used in our prognostic model, offer good precision and clinical application potential. Fifty immune medications were assessed for their ability to predict immunotherapy drugs, providing a novel approach to immunotherapy for TNBC patients and a more reliable foundation for applying drugs in subsequent treatments.