Code evaluation · Research feature

Developer-LLM Conversations: An Empirical Study of Interactions and Generated Code Quality

A new study analyzes 587,568 real-world developer-LLM conversations to understand topic shifts and code quality across multiple programming languages.

Adapted from research by Suzhen Zhong, Ying Zou, Bram Adams.

arXiv preprint revision · 2026-08-28 · Attribution & reuse
In this article
Editorial illustration of aperture mechanism.

Editor’s introduction

The study examines 587,568 real-world developer-LLM conversations from the CodeChat dataset, identifying that developers most frequently seek help with web design and machine learning. Conversations often extend due to repeated shifts in use cases, indicating a lack of intent tracking in current assistants. Generated code shows persistent language-specific issues, such as syntax errors and undefined variables, which do not consistently improve over five or more turns. Among successful error resolutions, prompts that explicitly state the error and request a fix are most common. The findings suggest that future code assistants should incorporate mechanisms to detect and confirm shifts in developer goals during multi-turn conversations.

Introduction

Developers have long relied on programming question-and-answer (Q&A) platforms such as Stack Overflow to seek help from peers and resolve technical problems. More recently, large language models (LLMs), such as ChatGPT and Claude, have introduced a new way for developers to obtain programming support. Trained on large corpora of text and code, these models can respond directly to natural-language requests and support iterative, conversational problem solving. Therefore, LLM-based assistants have emerged as an alternative to traditional Q&A platforms such as Stack Overflow. Developers now use them for a range of software engineering tasks, including code generation and code quality evaluation.

However, detailed conversational data from commercial LLM services such as OpenAI and Anthropic remains unavailable to the public due to privacy concerns and intellectual property protections. This limitation restricts comprehensive analyses and empirical studies. To address the lack of publicly accessible data, prior research has mined explicitly shared ChatGPT conversations from GitHub and Hacker News. More recent work has built datasets of repository artifacts, such as commits, issues, and pull requests, produced by autonomous coding agents. In contrast, developers’ daily use of LLMs often consists of quick, interactive back-and-forth conversations that occur outside a repository, which existing datasets do not capture.

RQ1. What topics do developers most commonly prompt when interacting with LLMs? Analyzing common topics in developer-LLM interactions reveals how developers use LLMs across different tasks and where certain use cases require more extensive interaction. We apply BERTopic, a transformer-based topic modeling technique, to CodeChat prompts and identify the most frequent topics. The most prevalent topics are web design (9.6% of conversations) and machine learning (8.7%). Developer–LLM engagement varies by topic, with AI-augmented business tool automation showing the highest interaction (mean = 3.40 turns). Within the topic with the highest mean turn count, repeated use-case shifts, feature revisions, and unresolved erroneous responses appear among the frequent prompt-gap patterns.

RQ2. How high is the quality of LLM-generated code within coding conversations? Conversational LLMs remain widely used for quick coding assistance, even as more autonomous coding agents become available. Evaluating generated code quality shows whether short exchanges provide reliable programming support and whether additional turns fix earlier defects. Across five major languages (i.e., Python, JavaScript, C++, Java, and C#), we find widespread defects in first-turn LLM-generated code, particularly undefined variables and missing documentation. In multi-turn conversations, code quality does not consistently improve. For example, undefined-variable errors in Python increase from 23.5% to 32.8% after five turns, whereas documentation violations in Java decrease from 78.1% to 63.4%. Users often correct syntax errors by identifying the error, asking targeted questions, or providing specific instructions. These findings show that additional turns alone do not guarantee better code quality, while explicit and focused feedback is commonly associated with successful corrections.

Data Collection

The dataset that we use is derived from the WildChat, a large-scale collection of 3.2 million real-world human–LLM conversations comprising 5.2 million conversational turns. Collected from April 2023 to July 2025 across 76 languages and 1.8 million users, it reflects recent and diverse ChatGPT usage and is publicly available on Hugging Face. Compared to LMSYS-Chat-1M, which includes about 70% Vicuna interactions, WildChat is more relevant due to its focus on ChatGPT, a widely adopted model. In addition, OpenAssistant ends data collection in April 2023 and contains 66,479 conversations, making WildChat (with 3.2 million conversations) both more current and substantially larger.

Conversations in WildChat are represented in a JSON format to support systematic analysis and reproducibility. A WildChat entry contains metadata such as conversation_id and model name, along with a conversation field containing a list of dialogue turns. Each turn includes attributes such as role (e.g., user or LLM), content, language, timestamp, and hashed_ip.

From WildChat, we identify code-related conversations by examining the content field of each LLM turn. We consider a conversation code-related if at least one LLM turn contains a code block enclosed in triple backticks (“'''”) followed by a programming language identifier, such as Python. This criterion captures conversations in which the LLM explicitly generates programming code while enabling us to identify the corresponding programming language. Applying this filter yields 587,568 conversations (18.4% of WildChat), comprising 1.1 million conversational turns and 1.7 million code snippets. We refer to the resulting dataset as CodeChat. CodeChat contains interactions associated with 426,062 unique hashed IP addresses, which we use as a proxy for users. To clarify participant roles, we refer to the user in these code-related conversations as the developer. All other metadata is inherited directly from WildChat without modification.

Common Topics in CodeChat

To characterize developer–LLM interactions, we use BERTopic to identify common topics from developers’ initial prompts and examine how developers engage in back-and-forth interactions within each topic. We further investigate why some topics lead to more prolonged conversations.

Select English Conversations. To identify the topics that initiate developer–LLM conversations, we extract the first developer turn from each conversation. We restrict topic modeling to English prompts because BERTopic’s default embedding model is optimized for English text. Using the language metadata inherited from WildChat, we retain English conversations and use their initial prompts as input for topic modeling.

Identify common topics. We apply BERTopic, a transformer-based topic modeling technique widely used in software engineering research, to group developers’ initial prompts into topics. To identify the optimal hyperparameters, we conduct a grid search guided by the default and recommended settings from the BERTopic documentation. We then select the optimal clustering configuration using a combination of quantitative metrics and qualitative interpretability. From the grid search results, we select the top 10 hyperparameter settings based on topic coherence scores, which evaluate the semantic interpretability and consistency of the generated topics by measuring the co-occurrence probabilities of the top words within each topic.

To select the best-performing configuration, we manually examine the representative prompts generated by BERTopic for each of the top 10 configurations. Specifically, we manually assess whether representative prompts in each group share a coherent theme and align with the topic’s top keywords, discarding configurations with broad or inconsistent topics. We then retain one configuration that produces the most coherent and meaningful topics for further analysis.

Quality of LLM generated Code

To assess the quality of LLM-generated code and how it evolves across multi-turn interactions, we select the five most frequently generated languages that support robust static code analysis: Python, JavaScript, C++, Java, and C#. We exclude JSON and HTML (the 1st and 6th most frequent) because they contain no executable logic to assess. We also exclude shell scripts such as Bash, which have limited structural complexity and weak tooling.

Detect code clones in multi-turn conversations. From the multi-turn conversations in the five selected languages, we analyze how code quality issues evolve across the outputs of consecutive turns within the same conversation. As unrelated tasks are common in multi-turn conversations (Section III-A), we filter out subsequent turns where developers switch tasks or the LLM generates unrelated code. To detect such task switches, we apply code clone detection by checking the similarity between code snippets from two adjacent turns. If two successive conversation turns yield sufficiently similar code, we consider both turns to be related and add the second turn to the current task sequence. A task sequence is defined as a consecutive set of turns where the generated code remains sufficiently similar, reflecting work on the same programming task. However, if the similarity between both turns’ code is too low, we consider that a new task has started, ending the previous task sequence.

We employ C4, a contrastive learning-based model for detecting near-miss (i.e., code snippets that maintain structural similarity despite modifications such as statement addition, removal, or alteration) and semantic code clones (i.e., code snippets that achieve the same functional behaviour despite different syntactic or structural implementations) across programming languages. C4 compares learned code representations to identify consecutive outputs that are structurally or functionally related, indicating contextual continuity rather than a shift to a new or unrelated prompt.

Assess the evolution of code quality. To evaluate the evolution of LLM-generated code quality, we use established code quality tools to detect potential defects (e.g., undefined variables, null pointer dereferences) and code smells (e.g., stylistic issues) across the different code versions in the analyzed task sequences. For Python and Java, we follow the approach in, which leverages Pylint for Python and PMD for Java. For JavaScript, we use ESLint, which is a widely adopted tool for detecting syntax errors and style violations. For C++, we employ Cppcheck, which captures a broad range of issues, including performance and portability concerns. For C#, we utilize Roslyn, which is integrated into the.NET SDK for inspecting syntax, semantics, and maintainability issues.

RQ1: What topics do developers most commonly prompt when interacting with LLMs?

Motivation. Developers interact with LLMs to address a wide range of coding tasks, reflecting diverse intentions and tasks in their daily workflows. However, the specific topics developers prompt in actual practice remain largely unexplored. Understanding these topics is crucial for identifying the most pressing needs of developers and ensuring that LLMs provide relevant and effective support. In this RQ, we aim to uncover and categorize the common topics that developers prompt. These insights will help code assistant developers and researchers improve LLMs to better align with real-world programming tasks.

Machine learning model training and AI bot deployment is the second most frequent topic, comprising 8.7% of conversations. This topic includes prompts where developers seek assistance with configuring training pipelines, such as implementing gradient scaling in PyTorch, designing deep learning architectures in Keras, and optimizing multi-task learning workflows. Prompts also address challenges related to deploying AI models, including inference request handling and output parsing when integrating model APIs.

Low-level programming and memory manipulation accounts for 8.3% of conversations, spanning assembly-level operations (4.9%) and binary patching (3.4%). The predominant languages in these topics are C++ and C, reflecting their central role in systems-level development. Developer prompts involve fine-grained memory control and low-level system behavior, with assembly instructions such as mov, ptr, and eax. In binary patching, developers seek assistance with runtime code modification, driver-level memory operations, and byte-level injection. These interactions highlight the application of LLMs in supporting tasks related to systems programming, reverse engineering, and low-level debugging.

RQ2: How high is the quality of LLM-generated code within coding conversations?

Motivation. As developers increasingly rely on LLMs to solve code-related tasks, the quality of LLM-generated code becomes a critical concern. While LLMs have demonstrated impressive capabilities, the generated code may contain defects or fail to follow best practices. A comprehensive evaluation of LLM-generated code across different programming languages and real-world scenarios can provide valuable insights into their strengths and weaknesses. The findings of this RQ can help developers make more informed and responsible usage of LLMs, guide code assistant developers to address identified issues, and offer research directions for improving the capabilities and reliability of LLMs in code-related tasks.

“Point out mistake then request fix” is the most frequent follow-up prompt type, occurring in 23.0% of the 383 sampled transitions. As listed in Table IV, explicitly naming the error and requesting a fix frequently precedes syntactically valid code generation. The next most frequent prompt types are Ask questions to guide correct solution (17.0%) and Add specific instructions (16.4%), both of which clarify the developer’s intent or specify concrete edits. Together, the three prompt types account for 56.4% of the resolved cases, suggesting that clear error signaling, guided questioning, and precise directives are prevalent in successful resolutions and may reduce turn count when seeking non-syntax-error outputs.

Discussion

Proactively managing evolving developer intent in multi-turn coding conversations. Our study finds that prolonged conversations are often driven by recurring intent shifts, with repeated changes in use cases forming the most common gap pattern. Although current assistants maintain context and follow the latest instruction, they react to each prompt in isolation rather than tracking how a developer’s goal evolves, leaving redirected intent unmanaged and prolonging interactions. We therefore recommend tool builders to equip code assistants with mechanisms that detect intent shifts and confirm the redirected goal before continuing, and researchers to model intent evolution across turns.

Reusing real-world multi-turn coding interactions to fine-tune and evaluate code assistants. CodeChat captures real developer-LLM coding sessions across more than 20 programming languages and multiple turns, including conversations that extend to ten turns or more. Unlike curated single-turn benchmarks, it reflects how developers phrase, refine, and repair requests in practice. We therefore encourage researchers and tool builders to use CodeChat to fine-tune smaller, task-specialized code models and to evaluate assistants under realistic multi-turn and long-context conditions. Future studies could also extend our static analysis to security and vulnerability assessment, or compare code generated by other and newer models against our ChatGPT-based baseline.

Using real-world conversations to build benchmarks for multi-turn coding assistants. CodeChat captures how developers formulate, refine, redirect, and repair coding requests across multiple turns and more than 20 programming languages. Researchers can use these interactions to construct evaluation benchmarks that measure conversation-level behavior, including intent-shift recovery, code-quality regressions, error-correction rates, turns to resolution, and robustness to long contexts. These measures would complement existing single-turn benchmarks by evaluating whether an assistant preserves requirements and improves its outputs throughout a conversation. The dataset may also support fine-tuning task-specific models, but its primary value is enabling realistic and reproducible evaluation of multi-turn coding assistants.

Threats to Validity

Internal Validity. We select static analysis tools that are widely recognized for their reliability and relevance to the programming languages under investigation. However, a potential internal validity threat arises from the specific configuration settings used for each static analysis tool. To mitigate this concern, we follow the official documentation and recommended guidelines for each linter, thereby ensuring consistency, reliability, and transparency throughout our evaluation process.

Another limitation is that our code quality assessment is restricted to the types of issues supported by static analyzers. Other quality attributes, such as code complexity and security vulnerabilities, are beyond the scope of our current analysis and are therefore not reflected in our findings.

External Validity. CodeChat is derived from WildChat, whose chatbot is hosted on Hugging Face. Its users are therefore likely to skew toward the IT community and specific communities, which may over-represent coding-related questions and particular interaction styles. As a result, the topic distribution characterizes this population rather than developers in general. In addition, CodeChat captures conversations with ChatGPT models (from GPT-3.5 to o1) collected between April 2023 and July 2025. Consequently, the reported results reflect these models in these period. The analysis framework may be applied to conversations from other LLMs, such as Claude and Gemini, but the specific frequencies and trends may differ because of changes in model capabilities.

Finally, our findings may not generalize to repository-based coding agents, such as Codex and Claude Code, which can access project files, execute code, and revise outputs using tool feedback. CodeChat instead captures prompt-response interactions between users engaged in coding conversations and conversational coding assistants.