Taken together, the spatial relationship among CD8+ T cells, CSCs, and TB within the TME on a single tissue section provided novel strategies to predict prognosis of patients with PDAC through an AI-based comprehensive analysis and machine learning workflow. This evidence concerns the gene CD8A and tuberculosis.