The objective of this investigation is to predict the necessary flow to satisfy the demand in order to guarantee the generation of energy in a hydropower, for which the artificial neural network LMST (Long Short-Term Memory) was used. In this context, in this article, historical data from the years 2010 to 2019 of flow and power of the plant was used, which were provided by it, in the first instance the data was purified to group them and graph the heat diagram with which the variables of interest were determined, then the training was carried out with which the network was structured with 10 neurons, 2 hidden layers, 2 freezing layers and 1 output layer. In addition, the RMSprop optimizer was selected with 10 numbers of delays with which an absolute error of 5.12% was obtained, finally tests were made comparing the results obtained in the training with data from one day after those that were used in the training and testing database. It is worth mentioning that by predicting the flow for the production of electrical energy, it contributes to the National Development Plan “Toda una Vida” of Ecuador, which is why it focuses on optimizing the use of water resources for required production levels.