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生成的代码,并在代码不恰当时自动修正,向用户呈现合适的代码。本研究旨在解决生成代码所需人工反馈与修改过程中手动工作量较大的难题。运行该系统时,我们成功实现了代码的预期自动修正。