Natural language (NL) programming has become more approachable due to the powerful code-generation capability of large language models (LLMs). This shift to using NL to program enhances collaborative programming by reducing communication barriers and context-switching among programmers from varying backgrounds. However, programmers may face challenges during prompt engineering in a collaborative setting as they need to actively keep aware of their collaborators' progress and intents. In this paper, we aim to investigate ways to assist programmers' prompt engineering in a collaborative context. We first conducted a formative study to understand the workflows and challenges of programmers when using NL for collaborative programming. Based on our findings, we implemented a prototype, CoPrompt, to support collaborative prompt engineering by providing referring, requesting, sharing, and linking mechanisms. Our user study indicates that CoPrompt assists programmers in comprehending collaborators' prompts and building on their collaborators' work, reducing repetitive updates and communication costs.
翻译:自然语言编程因大型语言模型强大的代码生成能力而变得更加便捷。这种使用自然语言进行编程的转变通过减少不同背景程序员之间的沟通障碍和上下文切换,增强了协作编程。然而,在协作环境中进行提示工程时,程序员可能面临挑战,因为他们需要主动了解协作者的进度和意图。本文旨在研究在协作背景下帮助程序员进行提示工程的方法。我们首先进行了一项形成性研究,以了解程序员在使用自然语言进行协作编程时的工作流程和挑战。基于我们的发现,我们实现了一个名为CoPrompt的原型系统,通过提供引用、请求、分享和链接机制来支持协作式提示工程。我们的用户研究表明,CoPrompt帮助程序员理解协作者的提示并基于协作者的工作进行构建,减少了重复更新和沟通成本。