Dalarna University's logo and link to the university's website

du.sePublications
Change search
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • chicago-author-date
  • chicago-note-bibliography
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf
Evaluating the Capabilities of GPT-4 in Full-Stack Web Development: A Practical Approach
Dalarna University, School of Information and Engineering, Informatics.
Dalarna University, School of Information and Engineering, Informatics.
2024 (English)Independent thesis Basic level (degree of Bachelor), 10 credits / 15 HE creditsStudent thesis
Abstract [en]

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.

Abstract [sv]

Med de snabba framstegen inom Artificiell Intelligens har användningen av maskinlärningsmodeller för olika områden blivit alltmer utbredd. Denna avhandling utforskar förmågorna hos OpenAIs Generative Pre-trained Transformer4 (GPT-4) inom fullstack webbutveckling genom att använda den för att skapa kompletta applikationer via prompts. Studien riktar sig mot utmaningarna och begränsningarna med att använda GPT-4 för detta ändamål, såsom den ansträngning som läggs på felsökning och kodkvaliteten hos de utvecklade applikationerna. En utforskande fallstudie användes där tre olika applikationer med olika komplexitet utvecklades genom prompts med GPT-4. Data samlades in om antalet prompts som användes, deras avsikt och kodkvaliteten, vilken analyserades med hjälp av SonarCloud. Resultaten visar att även om prompts med GPT-4 kan producera funktionella fullstack webapplikationer, minskar effektiviteten med applikationernas komplexitet på grund av en ökning av prompts som används för att felsöka koden. Analysen antyder en form av avtagande avkastning i form av antalet rader i den kompletta koden jämfört med antalet prompts som spenderas på att utveckla applikationerna, från 42,5 rader per prompt för den enklasteapplikationen, till 5,1 för den mest komplexa. Analysen av kodkvaliteten visade relativt få och mindre allvarliga problem, förutom för den mest komplexa applikationen som visade en ökning av mängden och allvarlighetsgraden av kodkvalitetsproblem. Sammanfattningsvis så visar GPT-4 betydande potential för att automatisera aspekter av webbutveckling, men trots det så kräver dess nuvarande begränsningar mänsklig övervakning, särskilt i felsökningsprocessen. Denna studie bidrar till att förstå generativ AI:s förmågor inom mjukvaruutveckling samtidigt som den belyser de områden där den brister.

Place, publisher, year, edition, pages
2024.
Keywords [en]
Code Generation, Code quality, Full-stack web development, Generative AI, GitHub Copilot, GPT-4
National Category
Electrical Engineering, Electronic Engineering, Information Engineering
Identifiers
URN: urn:nbn:se:du-49018OAI: oai:DiVA.org:du-49018DiVA, id: diva2:1883159
Subject / course
Informatics
Available from: 2024-07-09 Created: 2024-07-09

Open Access in DiVA

fulltext(1075 kB)307 downloads
File information
File name FULLTEXT01.pdfFile size 1075 kBChecksum SHA-512
b0820cdca669f72db28c4d772dd7ed7f99ac5174e12589d967154f48d52483b7aeae62292a35e9e1e781b804713af2dd72f5056c03b6ff81945fc9d909d93d98
Type fulltextMimetype application/pdf

By organisation
Informatics
Electrical Engineering, Electronic Engineering, Information Engineering

Search outside of DiVA

GoogleGoogle Scholar
Total: 307 downloads
The number of downloads is the sum of all downloads of full texts. It may include eg previous versions that are now no longer available

urn-nbn

Altmetric score

urn-nbn
Total: 779 hits
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • chicago-author-date
  • chicago-note-bibliography
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf