Investigating Code Generation Performance of ChatGPT with Crowdsourcing Social Data

被引:49
作者
Feng, Yunhe [1 ]
Vanam, Sreecharan [1 ]
Cherukupally, Manasa [1 ]
Zheng, Weijian [2 ]
Qiu, Meikang [3 ]
Chen, Haihua [1 ]
机构
[1] Univ North Texas, Denton, TX 76203 USA
[2] Argonne Natl Lab, Argonne, IL 60439 USA
[3] Dakota State Univ, Madison, SD USA
来源
2023 IEEE 47TH ANNUAL COMPUTERS, SOFTWARE, AND APPLICATIONS CONFERENCE, COMPSAC | 2023年
关键词
ChatGPT; Coding Generation; Software Engineering; Large Language Models (LLMs); Generative Models; Social Media;
D O I
10.1109/COMPSAC57700.2023.00117
中图分类号
TP39 [计算机的应用];
学科分类号
081203 ; 0835 ;
摘要
The recent advancements in Artificial Intelligence, particularly in large language models and generative models, are reshaping the field of software engineering by enabling innovative ways of performing various tasks, such as programming, debugging, and testing. However, few existing works have thoroughly explored the potential of AI in code generation and users' attitudes toward AI-assisted coding tools. This knowledge gap leaves it unclear how AI is transforming software engineering and programming education. This paper presents a scalable crowdsourcing data-driven framework to investigate the code generation performance of generative large language models from diverse perspectives across multiple social media platforms. Specifically, we utilize ChatGPT, a popular generative large language model, as a representative example to reveal its insights and patterns in code generation. First, we propose a hybrid keyword word expansion method that integrates words suggested by topic modeling and expert knowledge to filter relevant social posts of interest on Twitter and Reddit. Then we collect 316K tweets and 3.2K Reddit posts about ChatGPT's code generation, spanning from Dec. 1, 2022 to January 31, 2023. Our data analytics show that ChatGPT has been used in more than 10 programming languages, with Python and JavaScript being the two most popular, for a diverse range of tasks such as code debugging, interview preparation, and academic assignment solving. Surprisingly, our analysis shows that fear is the dominant emotion associated with ChatGPT's code generation, overshadowing emotions of happiness, anger, surprise, and sadness. Furthermore, we construct a ChatGPT prompt and corresponding code dataset by analyzing the screen-shots of ChatGPT code generation shared on social media. This dataset enables us to evaluate the quality of the generated code, and we have released this dataset to the public. We believe the insights gained from our work will provide valuable guidance for future research on AI-powered code generation.
引用
收藏
页码:876 / 885
页数:10
相关论文
共 31 条
[1]  
Aljanabi M., 2023, Iraqi Journal for Computer Science and Mathematics, V4, P62, DOI [10.52866/ijcsm.2023.01.01.0018, DOI 10.52866/IJCSM.2023.01.01.0018, DOI 10.52866/20IJCSM.2023.01.01.0018]
[2]  
Avila-Chauvet Laurent, 2023, Chatgpt as a support tool for online behavioral task programming
[3]  
Bang Y, 2023, Arxiv, DOI [arXiv:2302.04023, DOI 10.48550/ARXIV.2302.04023]
[4]  
Barke S, 2022, Arxiv, DOI arXiv:2206.15000
[5]  
Baumgartner J., 2020, P INT AAAI C WEB SOC, P830, DOI [DOI 10.1609/ICWSM.V14I1.7347, DOI 10.48550/ARXIV.2001.08435]
[6]   Latent Dirichlet allocation [J].
Blei, DM ;
Ng, AY ;
Jordan, MI .
JOURNAL OF MACHINE LEARNING RESEARCH, 2003, 3 (4-5) :993-1022
[7]  
Castelvecchi Davide, 2022, Nature, DOI 10.1038/d41586-022-04383-z
[8]   This new conversational AI model can be your friend, philosopher, and guide ... and even your worst enemy ... [J].
Chatterjee, Joyjit ;
Dethlefs, Nina .
PATTERNS, 2023, 4 (01)
[9]   Demystifying COVID-19 publications: institutions, journals, concepts, and topics [J].
Chen, Haihua ;
Chen, Jiangping ;
Nguyen, Huyen .
JOURNAL OF THE MEDICAL LIBRARY ASSOCIATION, 2021, 109 (03) :395-405
[10]  
Chen M., 2021, arXiv