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能够帮助程序员理解协作者的提示并基于协作者的工作进行构建,从而减少重复性更新和沟通成本。