Forecasting agricultural production in India is highly challenging due to non-stationary dynamics driven by policy factors and climate volatility. This study investigates the effectiveness of the fractal interpolation function (FIF) (with both variable and constant scaling factors) as a data augmentation technique to improve the prediction accuracy of long short-term memory (LSTM) and bidirectional LSTM (Bi-LSTM) models. These models were used to predict the annual production of four major crops in India (Millet, Maize (corn), Wheat, and Rice) from 1961 to 2023. The FIF with a variable scaling factor produced a lower Hurst exponent (ranging from 0.777 to 0.875) and a correspondingly higher fractal dimension (ranging from 1.153 to 1.574) than the FIF with a constant scaling factor. This resulted in a rougher interpolation that more effectively captured the non-smooth features and local volatility of the time series. The experimental results demonstrate that models trained on fractal-interpolated data significantly outperformed those trained on the original data. The LSTM integrated with variable-scaling FIF achieved the best overall performance for three crops, recording the highest $$R^{2}$$ values and the lowest error metrics. Notably, it achieved MAPE values of $$5.06\%$$ (Millet), $$1.95\%$$ (Maize), and $$1.70\%$$ (Wheat). However, for Rice, the Bi-LSTM integrated with variable-scaling FIF delivered the best performance, yielding MAPE = $$1.39\%$$ on the test set (2011–2023). These improvements were further confirmed by the Wilcoxon and Diebold–Mariano tests. The findings of this study highlight that capturing the long-memory and self-similar characteristics of agricultural time series through fractal interpolation substantially improves the learning capabilities of recurrent neural networks. The choice of scaling approach proved to be a more dominant factor for performance than the choice between LSTM and Bi-LSTM. This framework underscores the importance of adaptive fractal interpolation for handling irregular agricultural time series and offers a promising tool for enhanced yield forecasting, especially for rain-dependent and climate-sensitive crops in India. Forecasting agricultural production in India is highly challenging due to non-stationary dynamics driven by policy factors and climate volatility. This study investigates the effectiveness of the fractal interpolation function (FIF) (with both variab... [1954 chars]