Exergy analysis is essential for evaluating the second law of thermodynamics efficiency in solar thermal applications such as parabolic trough collectors (PTCs). This study creates ML models to tackle complex challenges in renewable energy systems and components. Six prediction models were developed such as Adaptive Boosting (AdaBoost), Multivariate adaptive regression splines (MARS), Stochastic Gradient Descent (SGD), Tweedie Regressor, voting, and stacking ensemble learning, were developed to predict the exergy efficiency of PTCs. The base fluids were three molten salts (Solar Salt, Hitec, and Hitec XL). Three nanoparticle types (Al2O3, CuO, and SiO2) were mixed homogeneously in a single-phase approach to prepare nine nanofluids. The output was predicted based on different input parameters such as molten salts, nanoparticle types, input temperature, volume fraction, Reynolds number (Re), Nusselt number (Nu), and friction factor (f). The results indicated that the stacking regressor efficiently predicted the exergy efficiency using (3-5) input parameters with a coefficient of determination (R2 = 0.963), followed by the AdaBoost algorithm with R2 = 0.947 using the fifth input combination over the testing phase. Further, AdaBoost and Stacking Regressors models were compared with the previously published study and showed an overall accuracy of R2 = 0.9472 and R2 = 0.9634, respectively.