# The Performance of the LSTM-based Code Generated by Large Language Models (LLMs) in Forecasting Time Series Data

**Authors:** Saroj Gopali, Sima Siami-Namini, Faranak Abri, Akbar Siami Namin  
**arXiv:** [2411.18731](https://arxiv.org/abs/2411.18731)  
**Date:** 2024-11-27  
**Summary page:** https://www.summarizepaper.com/en/paper/2411.18731v1/

## Key points

- Comparison of four Large Language Models (LLMs) - ChatGPT, PaLM, LLama, and Falcon - in generating deep learning models for time series data analysis
- Importance of time series data in domains like finance and stock markets
- Controlled experiments using adjusted prompts based on various criteria
- LLMs' ability to generate executable codes for each dataset separately and perform comparably to manually crafted LSTM models
- ChatGPT identified as the top performer among tested LLMs
- Impact of "temperature" parameter on model quality
- Insights on Falcon's tailored tools and efficient data flow approach
- LLama-2's range of pretrained models with excellent discourse capabilities
- Potential of LLMs in generating accurate deep learning models for time series data analysis

## Summary

This paper compares the performance of four Large Language Models (LLMs) - ChatGPT, PaLM, LLama, and Falcon - in generating deep learning models for analyzing time series data. Time series data is crucial in various domains such as finance and stock markets. The study conducts controlled experiments using prompts adjusted based on criteria like clarity, specificity, objective, intent, contextual information, and format/style. Results show that LLMs can generate executable codes for each dataset separately and perform comparably to manually crafted LSTM models. ChatGPT emerges as the top performer among the tested LLMs. The study also highlights the impact of "temperature" parameter on model quality and provides insights on Falcon and LLama-2 LLMs. Falcon stands out for its tailored tools and efficient data flow approach while LLama-2 offers a range of pretrained models with excellent discourse capabilities. This research sheds light on LLMs' potential in generating accurate deep learning models for time series data analysis and can benefit data analysts seeking efficient prediction model development using generative AIs.
