Work

Evaluating the Capabilities of GPT-4 in Full-Stack Web Development : A Practical Approach

Year: 2024
Type: dissertation
Abstract: With the rapid advancements in Artificial Intelligence, leveraging machine learning models for various domains has become increasingly prevalent. This thesis explores the capabilities of OpenAI’s Generative Pre-trained Transformer 4 (GPT-4) within full-stack web development by using it to create complete applications through prompting. The study addresses the challenges and limitations of using GPT-4 for this purpose, such as effort spent debugging and the code quality of the developed applications. An exploratory case study was adopted where three different applications of different complexity were developed through prompting with GPT-4. Data were collected on the number of prompts used, their intention, and the code quality, which was analysed using SonarCloud. Results show that while prompting with GPT-4 can produce functional full-stack web applications, the efficiency of doing so decreases with the complexity of the applications due to an increase in prompts spent debugging the code. The analysis suggests a form of diminishing returns in terms of the number of lines in the complete code compared with the number of prompts spend developing the applications, from 42.5 lines per prompt for the simplest application, to 5.1 for the most complex. The analysis of the code quality showed relatively few and minor issues, except for the most complex application which showed an increase in the amount and complexity of code quality issues. In conclusion, while GPT-4 demonstrates significant potential for automating aspects of web development, its current limitations necessitate human oversight, particularly in the debugging process. This study contributes to understanding the capabilities of Generative Artificial Intelligence (GAI) in software development while highlighting the areas where it falls short.
Authors: Sandberg, Jesper, Zhang, Yuanyao
Institution: Dalarna University
Language: English
Open Access status: green
OpenAlex ID: W7019038494
Cites: 9
Cited by:
Related to: 10