Characterizing Readability Issue Patterns and the Role of Prompt Design in LLM-Generated Code

Hengzhi Ye, Fengyuan Ran, Weiwei Xu, Minghui Zhou
5/13/2026
cs.SEcs.AI

No confident code implementation found for this paper.

Abstract

Large Language Models (LLMs) are increasingly changing how code is produced, but generated code still requires human review and validation before it can be adapted or integrated into real-world projects. This makes the readability of LLM-generated code a critical concern.

Show full abstract

Existing studies have mainly focused on functional correctness and task completion of LLM generated code, leaving open questions about whether it is readable, how its readability fails, and to what extent prompt design can improve it. We therefore investigate the readability of LLM-generated code. We first construct a readability assessment model that integrates textual, structural, program, and visual features. Using this model, we compare human-written code with code generated by representative frontier LLMs across 2,735 scenarios derived from World of Code (WoC) and LeetCode. We further characterize readability issue patterns using thematic analysis and examine prompt design associations through controlled prompt-variant experiments. Our results show that current LLMs produce code that is comparable to human-written code in overall readability. However, this aggregate similarity masks distinct issue patterns, including excessive complexity, redundant comments, and unknown API usage. Prompt analysis further shows that function signature, constraints, and style description are most strongly associated with code readability, although the overall role of prompt design remains bounded. These findings reveal latent readability debt in AI-assisted programming, identify prompt design as a lightweight starting point for improving generated-code readability, and motivate automated support for detecting and mitigating readability issues in future development workflows.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{ye2026characterizing,
  title  = {Characterizing Readability Issue Patterns and the Role of Prompt Design in LLM-Generated Code},
  author = {Hengzhi Ye and Fengyuan Ran and Weiwei Xu and Minghui Zhou},
  year   = {2026},
  eprint = {2605.13280},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2605.13280v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2605.13280.svg)](https://codeofpaper.com/paper/2605.13280)

Discussion