The utilization of geopolymer concrete (GPC) has become a promising replacement for cement-based concrete due to its incorporation of industrial residues and remarkable improvements in mechanical strength and durability properties. However, accurately forecasting this green concrete's compressive strength properties is challenging owing to the complex relationships between its constituents and the curing conditions. In this study, a comparative analysis of ensemble machine learning (AdaBoost regression and random forest regression) and individual machine learning (support vector regression and artificial neural network) based approaches were adopted to build a predictive model for forecasting the compressive strength of GPC from fly ash incorporating a wide range of key parameters. Moreover, the model's accuracy and predictive capacity have been assessed compared to linear regression models. The models were trained, tested, and validated by employing a comprehensive dataset of 309 data points collected from published literature contributed by various researchers. The models were created using twelve influential input parameters, encompassing the constituents of GPC, mix proportions, curing days, and curing temperature. Statistical evaluation measures, such as coefficient of determination (R2), mean square error (MSE), root mean square error (RMSE), and mean absolute error (MAE), were employed to evaluate the effectiveness of the constructed models. Statistical evaluation tools show that the ensemble machine learning technique (random forest model) outperforms the individual machine learning models and the other studied ensemble technique in predicting the compressive strength with R2 = 0.96, MAE = 1.3 MPa, RMSE = 2.18 MPa, and MSE = 4.73 MPa. The age of the specimens, molarity of NaOH, and curing temperature were found to have the greatest impact on compressive strength according to the sensitivity analysis conducted on the RF-based prediction model. The findings of this study will contribute to optimize GPC proportions, thereby reducing the cost and time associated with laboratory experiments during the design phase. © The Author(s), under exclusive licence to Springer Nature Switzerland AG 2024.