Uppsats
Evaluating Code Generation by Large Language Models : A Comparative Study on Accuracy, Efficiency, and Errors
Kandidat-uppsats
KTH/Skolan för elektroteknik och datavetenskap (EECS)
Publicerad: 2025
Språk: Engelska
Nyckelord
klicka för att sökaSammanfattning
Large language models are increasingly being used for generating programming code in educational and software development contexts. Using these models can potentially save time and resources, but it is crucial to understand their strengths, limitations, and reliability. This study compared the performance of three popular language models (GPT-4 Turbo, GPT-4o, and Claude 3.7 Sonnet) by evaluating their capability to solve a total of 100 programming tasks across three difficulty levels from the Kattis platform. The results indicated that the models generally performed well on simpler tasks, but accuracy significantly decreased with increasing complexity. Claude 3.7 Sonnet was the most effective for easier tasks, whereas GPT-4 Turbo provided the best balance of accuracy and efficiency on intermediate problems. For difficult tasks, all models faced significant challenges with correctness and efficiency. Common errors included logical mistakes, runtime problems, and exceeding time and memory limits. Clear differences in code readability and complexity were also observed, with Claude often generating better-commented code compared to the GPT models. We found that critical evaluation of AI-generated code is essential and suggest further research into advanced prompting techniques, model tuning, and improved integration of language models in educational and development environments to maximize the benefits of these tools.
Information
- Författare
- Ercin, Rachel, Pettersson, Maria
- Lärosäte / institution
- KTH/Skolan för elektroteknik och datavetenskap (EECS)
- Publiceringsdatum
- 2025
- Uppsatstyp
- Kandidat-uppsats
- Språk
- Engelska
Utforska vidare
Liknande uppsatser
Uppsatser med liknande ämnen och nyckelord.
Kandidat-uppsats, KTH/Medicinteknik och hälsosystem
Al Haj Ali, Qusai, Alabdali, Ibrahim
Publicerad: 2025
Kandidat-uppsats, Mälardalens universitet/Institutionen för hälsovetenskap, innovation och design
Poljén, Emmy
Publicerad: 2026
Kandidat-uppsats, Linnéuniversitetet/Institutionen för informatik (IK)
Rosengren, Charlie, Roinila Holmqvist, Emmi
Publicerad: 2024
Master-uppsats, Göteborgs universitet/Institutionen för data- och informationsteknik
Ganesh, Sundarakrishnan, Sahlqvist, Robert
Publicerad: 2024-10-16
Yrkesexamen på avancerad nivå, Luleå tekniska universitet/Institutionen för teknikvetenskap och matematik
Cortinovis, Viktor
Publicerad: 2026