利用实时编程验证AI生成代码
Validating AI-Generated Code with Live Programming
AI总结:
本文研究实时编程能否帮助开发者验证AI生成代码,通过构建结合AI助手与LP环境的Python编辑器并进行用户实验,发现LP可降低验证成本、缓解过度或不足依赖并减轻认知负荷。
摘要:
AI驱动的编程助手正日益普及,仅GitHub Copilot在全球就有超过一百万开发者使用。然而,这些工具远非完美,它们生成的代码建议可能以微妙的方式存在错误。因此,开发者面临一个新的挑战:验证AI的建议。本文探讨了实时编程(Live Programming,LP)——一种持续显示程序运行时值的技术——是否有助于应对这一挑战。为了回答这个问题,我们构建了一个Python编辑器,将AI驱动的编程助手与现有的LP环境相结合。在一项受试者间研究(N=17)中使用该环境,我们发现,通过降低执行验证的成本,LP可以缓解对AI生成程序的过度依赖和依赖不足,并降低某些类型任务中验证的认知负荷。
英文摘要:
AI-powered programming assistants are increasingly gaining popularity, with GitHub Copilot alone used by over a million developers worldwide. These tools are far from perfect, however, producing code suggestions that may be incorrect in subtle ways. As a result, developers face a new challenge: validating AI's suggestions. This paper explores whether Live Programming (LP), a continuous display of a program's runtime values, can help address this challenge. To answer this question, we built a Python editor that combines an AI-powered programming assistant with an existing LP environment. Using this environment in a between-subjects study (N=17), we found that by lowering the cost of validation by execution, LP can mitigate over- and under-reliance on AI-generated programs and reduce the cognitive load of validation for certain types of tasks.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。