In the software industry, the drive to add new features often overshadows the need to improve existing code. Large Language Models (LLMs) offer a new approach to improving codebases at an unprecedented scale through AI-assisted refactoring. However, LLMs come with inherent risks such as braking changes and the introduction of security vulnerabilities. We advocate for encapsulating the interaction with the models in IDEs and validating refactoring attempts using trustworthy safeguards. However, equally important for the uptake of AI refactoring is research on trust development. In this position paper, we position our future work based on established models from research on human factors in automation. We outline action research within CodeScene on development of 1) novel LLM safeguards and 2) user interaction that conveys an appropriate level of trust. The industry collaboration enables large-scale repository analysis and A/B testing to continuously guide the design of our research interventions.
翻译:在软件行业中,新增功能的驱动力常常掩盖了改进现有代码的需求。大型语言模型(LLM)通过AI辅助重构,为大规模改进代码库提供了全新途径。然而,LLM存在固有风险,例如破坏性变更和安全漏洞的引入。我们主张在集成开发环境中封装与模型的交互,并利用可信保障机制验证重构尝试。但同样重要的是,AI重构的采纳需要关于信任建立的研究。在本立场文件中,我们基于自动化中人因研究的成熟模型,规划了未来工作方向。我们概述了CodeScene平台内的行动研究,旨在开发:1)新型LLM保障机制;2)传递适当信任程度的用户交互界面。产业合作使我们能够进行大规模代码库分析和A/B测试,持续指导研究方案的设计。