## 6 Complex Task: Generating Code for an LSTM Model
The results indicate that all frameworks can generate functional Python code for both tasks. However, GPT demonstrates a more efficient workflow and outperforms its competitors, particularly OAI1, which requires more attempts before producing a fully functional LSTM model, indicating less consistency in managing complex programming tasks. OAI3 performs equally well as GPT in terms of efficiency and consistency; however, GPT's predictions show better accuracy in the complex task, resulting in a higher overall score. All AI-generated LSTM models perform similarly to the manually developed LSTM-H model, with only marginal differences in predictive accuracy. This demonstrates that AI-assisted code generation can yield results comparable to expert-designed implementations, provided that the models are correctly prompted and refined through iterative feedback. Moreover, the analysis shows that execution times of all AI-generated codes remain low, ensuring that generated programmes are practical to use on standard consumer-grade hardware. In summary, GPT's slightly better performance reveals that it remains a competitive framework despite the release of newer variants from OpenAI, namely OAI1 and OAI3. This sustained performance may be attributed to its widespread usage, which allows for extensive fine-tuning based on a larger volume of user interactions, feedback, and error corrections. As a result, GPT benefits from a broader range of refinements, potentially offsetting advancements in newer, more specialized models. The findings of this work highlight the evolving role of AI in computational modeling and scientific research, where the ability to generate accurate and efficient code has significant implications for accelerating discovery and innovation. Future research will explore further refinements in AI-assisted coding, assess additional AI frameworks, and investigate the potential for hybrid approaches that utilize multiple models to optimize performance. Moreover, the Inference Index (InI) methodology will be refined to support expanded AI assessment tasks beyond code generation. These developments will further enhance the ability to measure, compare, and improve LLM performance across diverse applications. Conceptualization, N.C. and D.D. ; Methodology, N.C. and D.D. ; Software, N.C.; Formal analysis, N.C. and D.D. ; Investigation, N.C. and D.D. ; Data curation, N.C.; Writing--original draft, N.C. and D.D. ; Writing--review & editing, N.C. and D.D. All authors have read and agreed to the published version of the manuscript. This research received no external funding. Not applicable. All data sets and AI-generated codes, along with the comparison graphs they produced, are available and may be downloaded from: [[https://github.com/nchrkis/infinite](https://github.com/nchrkis/infinite)]([https://github.com/nchrkis/infinite](https://github.com/nchrkis/infinite)) (accessed on 15 February 2025). The authors declare no conflicts of interest. The following abbreviations are used in this manuscript: \begin{tabular}{l l} LLMs & Large Language Models \\ AI & Artificial Intelligence \\ NLP & Natural Language Processing \\ LSTM & Long Short-Term Memory \\ RNNs & Recurrent Neural Networks \\ INFINITE & Inference Index In Testing Model Effectiveness \\ GPT & ChatGPT-4o \\ OAI1 & OpenAI-ol pro \\ OAI3 & OpenAI-ol3 mini-high \\ MSE & Mean Squared Error \\ MAE & Mean Absolute Error \\ MB & Mean Bias \\ MAPE & Mean Average Percentage Error \\ MFE & Mean Fractional Error \\ \end{tabular} 

## References

* 1 OpenAI. Optimizing Language Models for Dialogue. 2022. Available online: [[https://openai.com/blog/chatgpt](https://openai.com/blog/chatgpt)]([https://openai.com/blog/chatgpt](https://openai.com/blog/chatgpt)) (accessed on 15 January 2025). * 2 [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON] [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON]; et al. Gpt-4 technical report. _arXiv_**2023**, arXiv:2303.08774.