Our model outperformed the standard of care (tuberculin skin test and interferon-gamma release assay) in identifying high-risk patients, demonstrated by a lower number needed to diagnose (1.96 vs. 4).<h4>Conclusions</h4>Models based on machine learning offer considerable promise for improving care for PWH, requiring n additional data collection and incurring minimal additional costs while enhancing the identification of PWH that could benefit from preventive TB treatment. This evidence concerns the gene IFNG and tuberculosis.