Personality-Guided Code Generation Using Large Language Models
Not on the map. Why?
Abstract (arXiv)
Code generation, the automatic creation of source code from natural language descriptions, has garnered significant attention due to its potential to streamline software development. Inspired by research that links task-personality alignment with improved development outcomes, we conduct an empirical study on personality-guided code generation using large language models (LLMs). Specifically, we investigate how emulating personality traits appropriate to the coding tasks affects LLM performance. We extensively evaluate this approach using seven widely adopted LLMs across four representative datasets. Our results show that personality guidance significantly enhances code generation accuracy, with improved pass rates in 23 out of 28 LLM-dataset combinations. Notably, in 11 cases, the improvement exceeds 5%, and in 5 instances, it surpasses 10%, with the highest gain reaching 12.9%. Additionally, personality guidance can be easily integrated with other prompting strategies to further boost performance. We open-source our code and data at https://github.com/IanWalls/Persona-Code.
Key facts. Cited by 3 papers in the map (data through 14 Oct 2026). Builds on 17 of its 26 references that are in the map. First posted on arXiv 16 Oct 2024.
Builds on
17 of 26 references.
References · 17
- 2024The Llama 3 Herd of Modelscited by 14,715
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2021Program Synthesis with Large Language Modelscited by 3,637
- 2023Code Llama: Open Foundation Models for Codecited by 2,139
- 2023CAMEL: Communicative Agents for "Mind" Exploration of Large Language Model Societycited by 1,395
- 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,391
- 2024A Survey on Large Language Models for Code Generationcited by 658
- 2022CodeT: Code Generation with Generated Testscited by 384
- 2024DeepSeek-Coder-V2: Breaking the Barrier of Closed-Source Models in Code Intelligencecited by 331
- 2023AutoAgents: A Framework for Automatic Agent Generationcited by 216
- 2024Large Language Model-Based Agents for Software Engineering: A Surveycited by 178
- 2022Coder Reviewer Reranking for Code Generationcited by 84
5 more
- 2023A Survey of Large Language Models for Code: Evolution, Benchmarking, and Future Trendscited by 66
- 2022Identifying and Manipulating the Personality Traits of Language Modelscited by 40
- 2021What do pre-trained code models know about code?cited by 36
- 2023Have Large Language Models Developed a Personality?: Applicability of Self-Assessment Tests in Measuring Personality in LLMscited by 32
- 2015Influence of Personality Types in Software Tasks Choicescited by 1
Built on by
Citing papers per year: 2025: 2; 2026: 1.
3 papers.