Table of Contents
Fetching ...

CoPrompt: Supporting Prompt Sharing and Referring in Collaborative Natural Language Programming

Li Feng, Ryan Yen, Yuzhe You, Mingming Fan, Jian Zhao, Zhicong Lu

TL;DR

CoPrompt addresses collaborative NL programming by introducing four mechanisms—referring, requesting, sharing, and linking—that support prompt co-engineering across teammates. A formative study identifies workflow stages and pain points, motivating a prototype that aids sense-making, leveraging others' work, and reducing repetitive updates. A two-part user study with 12 experienced programmers shows improved task completion time, higher usability, and lower cognitive load when using CoPrompt versus a baseline, with participants extensively adopting the four mechanisms. The work contributes a formative study, a functional prototype, and design implications for future NL-prompt collaboration tools, highlighting practical gains for teams using LLM-powered coding assistants.

Abstract

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: Supporting Prompt Sharing and Referring in Collaborative Natural Language Programming

TL;DR

CoPrompt addresses collaborative NL programming by introducing four mechanisms—referring, requesting, sharing, and linking—that support prompt co-engineering across teammates. A formative study identifies workflow stages and pain points, motivating a prototype that aids sense-making, leveraging others' work, and reducing repetitive updates. A two-part user study with 12 experienced programmers shows improved task completion time, higher usability, and lower cognitive load when using CoPrompt versus a baseline, with participants extensively adopting the four mechanisms. The work contributes a formative study, a functional prototype, and design implications for future NL-prompt collaboration tools, highlighting practical gains for teams using LLM-powered coding assistants.

Abstract

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.
Paper Structure (64 sections, 14 figures, 1 table)

This paper contains 64 sections, 14 figures, 1 table.

Figures (14)

  • Figure 1: Envisioned Scenario of collaborative NL programming using CoPrompt, including tasks from 1 to 5 (pink boxes indicate Alice's tasks, and blue boxes indicate Bob's tasks). Four colors of arrows indicate four types of mechanisms.
  • Figure 2: The CoPrompt user interface includes (a) a block-based rich text editor for NL inputs, which consists of prompt blocks and execution code blocks. (b) Prompt Wiki: a multi-hierarchy wiki displaying tasks and prompts, (c) a message panel providing a comprehensive log of actions, (d) an explanation view displaying an explanation for prompts and code-prompt relationship, and (e) a history view for version control.
  • Figure 3: Refer Workflow: (a) select source node from the editor; (b) select target node for reference from the wiki and click the refer icon; (c) A's block will instantly regenerate prompt and code based on the code and execution result of B's prompt.
  • Figure 4: Request Workflow: (a) select a source node from the editor; (b) select a target node that needs the collaborator to finish and share the result from wiki and click the request icon, fill in a descriptive message for the request; (c) when B updates how they deal with missing values, A's block will regenerate prompt and code accordingly.
  • Figure 5: Share Workflow: (a) select a source node to be shared from the editor; (b) select a target node to be updated with the shared content from the wiki and click the share icon to highlight the node, then A will see a pop-up message, indicating that B would like to share some information with A; (c) when A accepts, A's highlighted block will update its code based on B's df.
  • ...and 9 more figures