Public budgeting is at the core of any government, since decisions about how to use resources affect all areas of public policy and government programs. With emerging technologies like artificial intelligence, new opportunities may exist to improve the public budgeting process. Although recent research has focused on many topics related to public budgeting, there is still a gap in terms of our knowledge about the potential role of artificial intelligence techniques. While the potential advantages of using intelligent algorithms for optimization in the private sector have been studied, there are also potential benefits that are unique to the public sector, particularly in terms of improved decision-making. This study proposes a methodology based on artificial intelligence to explore the optimization of the Mexican federal government’s public budget distribution. The main outcomes explored are related to social development, economic development, government, and non-programmed budget items. The findings indicate that investment in social development in Mexico should be increased and the non-program-based budget should be reduced. We acknowledge that many other factors influence the allocation of public budgets to different policy domains and specific government programs, including political and environmental variables, but think it is useful to have a proposed “optimal” solution to better understand the differences between policy priorities and budget allocations and the causes of those differences.