Recent increases in global food demand have made this research and, therefore, the prediction of agricultural commodity prices, almost imperative. The aim of this paper is to build efficient artificial intelligence methods to effectively forecast commodity prices in light of these global events. Using three separate, well-structured models, the commodity prices of eleven major agricultural commodities that have recently caused crises around the world have been predicted. In achieving its objective, this paper proposes a novel forecasting model for agricultural commodity prices using the extreme learning machine technique optimized with the genetic algorithm. In predicting the eleven commodities, the proposed model, the extreme learning machine with the genetic algorithm, outperforms the model formed by the combination of long short-term memory with the genetic algorithm and the autoregressive integrated moving average model. Despite the fluctuations and changes in agricultural commodity prices in 2022, the extreme learning machine with the genetic algorithm model described in this study successfully predicts both qualitative and quantitative behavior in such a large number of commodities and over such a long period of time for the first time. It is expected that these predictions will provide benefits for the effective management, direction and, if necessary, restructuring of agricultural policies by providing food requirements that adapt to the dynamic structure of the countries.