This study aimed to evaluate the groundwater quality index (GWQI) to evaluate the impact of land use change in northern Iran and the risk of non-carcinogenicity in Babol drinking water. Changes in the concentration of fluoride (F) were predicted by the LightGBM algorithm. Using data collected between 2016 and 2021, the research utilized. In total, 228 water samples were collected from 38 wells between 2016 and 2021 analyzed for various chemical parameters to determine the GWQI. The results from the deterministic approach showed that 74.6% of water sources show good quality with the range of GWQI from 49.91 to 107.38. However, the probabilistic approach showed that only 0.01% of the water samples showed excellent quality, while the majority (98.37%) were classified as having good quality. Principal component analysis on parameters of chemicals showed three factors that account for 71.55% of the total variance in the groundwater quality dataset. The land use results showed that in residential areas where the population is dense, a higher concentration of NO3 is observed. The study also found that the noncarcinogenic risk caused by F and NO3 was below the risk limit (HQ < 1) for all age groups, except for infants in the wet season.

  • The study focused on the groundwater quality index (GWQI) and AI's role in land use impact.

  • Dense residential zones correlated with elevated NO3 concentrations.

  • LightGBM effectively predicted F concentrations, emphasizing SO4, Ca, and Cl's roles.

  • The HI95 in the age groups of infants and children was more than the threshold of 1.

  • Principal component analysis revealed geology, construction, and population density as key GWQI factors.

This is an Open Access article distributed under the terms of the Creative Commons Attribution Licence (CC BY 4.0), which permits copying, adaptation and redistribution, provided the original work is properly cited (http://creativecommons.org/licenses/by/4.0/).