In recent years, the field of artificial intelligence has been rapidly developing. Among them, OpenAI's ChatGPT excels at natural language processing tasks and can also generate source code. However, the generated code often has problems with consistency and program rules. Therefore, in this research, we developed a system that tests the code generated by ChatGPT, automatically corrects it if it is inappropriate, and presents the appropriate code to the user. This study aims to address the challenge of reducing the manual effort required for the human feedback and modification process for generated code. When we ran the system, we were able to automatically modify the code as intended.
翻译:近年来,人工智能领域发展迅速。其中,OpenAI的ChatGPT在自然语言处理任务中表现卓越,亦能生成源代码。然而,生成的代码常存在一致性与程序规范方面的问题。为此,本研究开发了一套系统:对ChatGPT生成的代码进行测试,若发现不恰当之处则自动修正,并向用户呈现修正后的合适代码。本研究旨在应对生成代码人工反馈与修正过程中所需手动工作量较大的挑战。系统运行结果显示,我们成功实现了代码的预期自动修正。