Uppsats
Assessing the Readability of AI Generated Code: A Comparisonof Two LLMs
M1-uppsats
Linköpings universitet/Programvara och system
Publicerad: 2025
Språk: Engelska
Nyckelord
klicka för att sökaSammanfattning
As Large Language Models (LLMs) become increasingly integrated into software engineering workflows, it is important to understand their abilities and limitations when it comes to generating code. This thesis investigates the abilities of two LLMs, GPT-3.5-turbo and WizardCoder-15B-V1.0, to generate readable Python code. HumanEval was used to generate test samples and for functionality testing. The code generated by both models was analysed using the Radon and Flake8 code analysis tools and compared to human written solutions, on readability attributes established through workshops with four experienced developers. The findings show that LLMs have some ability to generate readable Python code for short HumanEval tasks. Both models generate code that is comparable to human written code in complexity and size while demonstrating higher alignment with best practice for the language. The models falter when it comes to the practice of commenting code, especially without being prompted to document. This study offers insight into code readability preferences of real world developers and proposes a practical methodology for evaluating readability. Furthermore, the results shed light on the strengths and weaknesses of current LLMs in generating readable code.
Information
- Författare
- Wangkhooklang, Wijitra
- Lärosäte / institution
- Linköpings universitet/Programvara och system
- Publiceringsdatum
- 2025
- Uppsatstyp
- M1-uppsats
- Språk
- Engelska
Utforska vidare
Liknande uppsatser
Uppsatser med liknande ämnen och nyckelord.
Yrkesexamen på avancerad nivå, Uppsala universitet/Avdelningen för systemteknik
Vigholm, Albin
Publicerad: 2026
Yrkesexamen på avancerad nivå, Luleå tekniska universitet/Institutionen för ekonomi, teknik, konst och samhälle
Åström, Tuva, Nilsson, Matilda
Publicerad: 2026
Kandidat-uppsats, Jönköping University/Tekniska Högskolan
Rönnqvist, Emilia, Skoogh, Lovisa
Publicerad: 2026
Yrkesexamen på avancerad nivå, Luleå tekniska universitet/Institutionen för ekonomi, teknik, konst och samhälle
Nordlander, Jonas
Publicerad: 2026
Master-uppsats, Stockholms universitet/Institutionen för data- och systemvetenskap
Lähteenmäki, Toni
Publicerad: 2026
M1-uppsats, Jönköping University/JTH, Avdelningen för datateknik och informatik
Seyhani Porshekoh, Artin
Publicerad: 2026