Author
Listed:
- Manuel Andruccioli
(Department of Computer Science and Engineering, University of Bologna, 47522 Cesena, Italy)
- Giovanni Delnevo
(Department of Computer Science and Engineering, University of Bologna, 47522 Cesena, Italy)
- Silvia Mirri
(Department of Computer Science and Engineering, University of Bologna, 47522 Cesena, Italy)
- Paola Salomoni
(Department of Computer Science and Engineering, University of Bologna, 47522 Cesena, Italy)
Abstract
The increasing adoption of Large Language Models (LLMs) in software development has enabled automatic code generation from natural language, yet the influence of communicative factors such as prompt tone remains underexplored. This work introduces PromptTone, a controlled dataset designed to investigate how variations in prompt politeness affect LLM-based code generation in web development. The dataset is constructed through a structured experimental design combining three variables: programming paradigm (Vue.js Composition API vs. Options API), LLM provider (GPT, Claude, Gemini), and prompt tone (impolite, neutral, polite), resulting in 396 generated components across 22 implementations. Data were collected in an educational setting under a single-prompt constraint to capture first-shot model behavior, and are provided in both hierarchical and CSV formats, including prompts, generated code, and error annotations. Preliminary analysis reveals that prompt tone influences output characteristics such as verbosity, with model-specific patterns: for instance, some models exhibit increased output length with more polite prompts, while others remain stable. Differences also emerge across programming paradigms, suggesting an interaction between tone and code structure. These findings highlight that LLMs are sensitive not only to semantic content but also to pragmatic aspects of input. Overall, the dataset provides a novel benchmark for studying human–LLM interaction in code generation, supporting future research on prompt engineering, model evaluation, and socially-aware Artificial Intelligence (AI)-assisted development tools.
Suggested Citation
Manuel Andruccioli & Giovanni Delnevo & Silvia Mirri & Paola Salomoni, 2026.
"PromptTone: A Dataset for Evaluating Large Language Model Code Generation Under Varying Prompt Politeness Levels,"
Data, MDPI, vol. 11(4), pages 1-16, April.
Handle:
RePEc:gam:jdataj:v:11:y:2026:i:4:p:88-:d:1923489
Download full text from publisher
Corrections
All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:gam:jdataj:v:11:y:2026:i:4:p:88-:d:1923489. See general information about how to correct material in RePEc.
If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.
We have no bibliographic references for this item. You can help adding them by using this form .
If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.
For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: MDPI Indexing Manager The email address of this maintainer does not seem to be valid anymore. Please ask MDPI Indexing Manager to update the entry or send us the correct address
(email available below). General contact details of provider: https://www.mdpi.com .
Please note that corrections may take a couple of weeks to filter through
the various RePEc services.