## 6 Complex Task: Generating Code for an LSTM Model
The two bottom graphs focus on specific time intervals, namely between 100 and 200 10 min intervals (**bottom left**) and 4100 and 4200 10 min intervals (**bottom right**). This is implemented in order to better visualize the difference between the different predictions. As observed in Figures 4-6 and the corresponding MAPE and R\({}^{2}\) Tables, the predictions of all models are practically indistinguishable and remarkably close to ground truth. When comparing the three OpenAI frameworks (GPT, OAI1, and OAI3), we observe that the GPT framework provides, even if marginally, better accuracy. It seems that GPT, at present, overtakes in accuracy the other two frameworks for scientific coding tasks. This is further discussed in the following subsection. ### InI Calculation

We then applied the INFINITE methodology to calculate the InI index and assess the performance of the three LLM frameworks: GPT, OAI1, and OAI3. To identify the parameters that can enable us to measure the performance of each framework, we recorded the number of different questions (attempts) we had to pose to the model until the correct LSTM model was generated, the number of queries submitted each time (whether an SB response or an answer was returned), the response times between a query and a response from the framework and the R\({}^{2}\) values between LSTM predictions and ground truth (in this case, R\({}^{2}\) is preferred over MAPE, since there exist observed wind speed values close to 0). For each framework, an average R\({}^{2}\) was calculated for temperature, relative humidity, and wind speed from the values of Table 9. The main parameters are summarized in Table 10. \(ARTpQ\) is calculated using Equation (1). By substituting the values of Table 10 into Equations (2)-(8), we derived Table 11. For better visualization, index InI is shown in Figure 7 for the three frameworks. \begin{table}
\begin{tabular}{l c c c c} \hline \hline  & **Attempts Until Correct Answer** & **Total Queries** & **SB Responses** & \(ARTpQ\) **(s)** & **Average R\({}^{2}\)** \\ \hline GPT & 2 & 2 & 0 & 28.53 & 0.94 \\ OAI1 & 4 & 4 & 0 & 129.25 & 0.93 \\ OAI3 & 2 & 2 & 0 & 25.50 & 0.90 \\ \hline \hline \end{tabular}
\end{table} 
Table 10: Important parameters collected during the execution of the procedure for generating code for an LSTM model using GPT, OAI1, and OAI3. \begin{table}
\begin{tabular}{l c c c} \hline \hline  & **Temperature** & **Relative Humidity** & **Wind Speed** \\ \hline LSTM-H & 1.1569 & 1.1833 & 36.4229 \\ GPT & 0.9026 & 1.0079 & 33.3757 \\ OAI1 & 1.3938 & 1.0432 & 36.0228 \\ OAI3 & 1.0412 & 1.0238 & 37.4445 \\ \hline \hline \end{tabular}
\end{table} 
Table 8: MAPE between predictions and ground truth for the LSTM-H, GPT, OAI1, and OAI3 models concerning temperature, relative humidity, and wind speed. \begin{table}
\begin{tabular}{l c c c} \hline \hline  & **Temperature** & **Relative Humidity** & **Wind Speed** \\ \hline LSTM-H & 0.9733 & 0.9864 & 0.8488 \\ GPT & 0.9827 & 0.9892 & 0.85041 \\ OAI1 & 0.9675 & 0.9861 & 0.8457 \\ OAI3 & 0.9789 & 0.9895 & 0.7698 \\ \hline \hline \end{tabular}
\end{table} 
Table 9: R\({}^{2}\) score comparisons between predictions and ground truth for the LSTM-H, GPT, OAI1, and OAI3 models concerning temperature, relative humidity, and wind speed. As observed, GPT surpasses OAI1 at this stage in Efficiency and Consistency, and the two frameworks are very close regarding Accuracy. GPT's performance is also slightly better than OAI3's in terms of Accuracy. Overall, GPT achieved the highest InI among the three frameworks. It only failed to calculate the requested errors for each variable separately; instead, it aggregated them. Hence, GPT appears to be producing meaningful code for complex machine learning tasks in the shortest time possible. Thus, it is currently the most appropriate option for scientific coding tasks. An extensive literature search yielded no references for this, although there have been limited comparisons between GPT and the newer variants [68; 69].