Geopolymers are inorganic polymers produced by the alkali activation of alumina-silicate minerals. Geopolymer is an alternative cementitious binder to traditional Ordinary Portland Cement (OPC) leading to economical and sustainable construction technique by the utilisation of alumina-silicate waste materials. The strength development in fly ash-slag geopolymer mortar is dependent on the chemical composition of the raw materials. An effective way to study the effect of chemical components in geopolymer is through the evaluation of molar ratios. In this study, an Artificial Neural Network (ANN) model has been applied to predict the effect of molar ratios on the 28-day compressive strength of fly ash-slag geopolymer mortar. For this purpose, geopolymer mortar samples were prepared with different fly ash-slag composition, activator concentration, and alkaline solution ratios. The molar ratios of the geopolymer mortar samples were evaluated and given as input to ANN, and the compressive strength was obtained as the output. The accuracy of the assessed model was investigated by statistical parameters; the mean, median, and mode values of the ratio between actual and predicted strength are equal to 0.991, 0.973, and 0.991, respectively, with a 14% coefficient of variation and a correlation coefficient of 89%. Based on the mentioned findings, the proposed novel model seems reliable enough and could be used for the prediction of compressive strength of fly ash-slag geopolymer. In addition, the influence of molar compositions on the compressive strength was further investigated through parametric studies utilizing the proposed model. The percentages of Na2O and SiO2 of the source materials were observed as the dominant chemical compounds in the mix affecting the compressive strength. The influence of CaO was significant when combined with a high amount of SiO2 in alkaline solution.