Water quality is critical to human health and the environment, especially in arid and semi-arid regions. Hence, the objectives of this study were to assess drinking water quality, identify critical parameters, investigate spatial patterns, and investigate accurate predictive models for the water quality index (WQI) in the Kazerun county in southwest Iran. To address this issue using deterministic and probabilistic WQI, correlation matrix, fuzzy C-Means (FCM) clustering, geostatistics, and adaptive network-based fuzzy inference system (ANFIS) with FIS generation by fuzzy C-Means (FCM-ANFIS) and sub-clustering (SC-ANFIS).Various software tools, including Excel, MATLAB, Python, and GIS were used to analyze groundwater data collected from 25 sampling sites. Water parameters, including pH, Cl−, SO4−2, EC, NO3−, NO2−, Ca2+, Mg2+, and F−, were examined. The results showed that F− levels were within acceptable limits set by the US EPA, but about one-third of sites posed potential health risks based on WHO guidelines. In one-third of regions, the levels of Mg2+ exceeded the recommended guidelines. In deterministic and probabilistic approaches, water quality was excellent in 68% and 81.3% of sites, respectively. Sobol sensitivity analysis identified SO4−2> Mg2+>Cl− > EC > F− > NO3− as significant WQI variables. Spearman correlation matrix shows substantial positive correlations between WQI and EC, F−, SO4−2, Mg2+, and Cl− were shown by the Spearman correlation matrix. Based on the FCM results, the southeast and central sites (56% of sites) have similar water quality. In comparison, the northern and four central sites (28% of sites) have distinct regional features, and the southern sites (16% of sites) had unique water quality characteristics. Geostatistical analyses showed that pH had the most substantial local clustering, while SO4−2 had significant high-value clustering. Furthermore, hot spot research revealed specific sites with high pH, F−, NO3−, and Cl− levels. The FCM-ANFIS model outperformed the SC-ANFIS model, emphasizing FCM clustering's importance in water quality forecasting accuracy.