arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2409.12447cs.SEcs.AIcs.HC
收藏

提示词也是程序!理解开发者如何构建包含提示词的软件

Prompts Are Programs Too! Understanding How Developers Build Software Containing Prompts

Carnegie Mellon University(卡内基梅隆大学)

Jenny T. Liang, Melissa Lin, Nikitha Rao, Brad A. Myers

AI总结:

本文通过访谈20名开发者,提出提示词编程概念,发现其与传统软件开发不同,开发者难以建立可靠心智模型,为提示词工具开发提供启示。

摘要:

生成式预训练模型驱动着数百万用户使用的智能软件功能,这些功能由开发者编写的自然语言提示词所控制。尽管提示词驱动的软件影响巨大,但对其开发过程及其与编程的关系却知之甚少。在这项工作中,我们认为某些提示词就是程序,且提示词的开发是编程中一种独特现象,称为“提示词编程”。我们采用斯特劳斯式扎根理论,通过对20名从事提示词开发的开发者进行访谈,这些开发者涉及多种情境、模型、领域和提示词结构,从而形成对提示词编程的理解。我们贡献了15项观察结果,以初步理解当前的提示词编程实践。例如,提示词程序员并非构建代码的心智模型,而是通过与基础模型(FM)交互,发展关于基础模型对提示词行为的心智模型。尽管先前研究表明专家具有良好形成的心智模型,我们发现,即使已开发数十个提示词的提示词程序员,仍难以建立可靠的心智模型。我们的观察表明,提示词编程不同于传统软件开发,这促使创建提示词编程工具,并为软件工程利益相关者提供启示。

英文摘要:

Generative pre-trained models power intelligent software features used by millions of users controlled by developer-written natural language prompts. Despite the impact of prompt-powered software, little is known about its development process and its relationship to programming. In this work, we argue that some prompts are programs and that the development of prompts is a distinct phenomenon in programming known as "prompt programming". We develop an understanding of prompt programming using Straussian grounded theory through interviews with 20 developers engaged in prompt development across a variety of contexts, models, domains, and prompt structures. We contribute 15 observations to form a preliminary understanding of current prompt programming practices. For example, rather than building mental models of code, prompt programmers develop mental models of the foundation model (FM)'s behavior on the prompt by interacting with the FM. While prior research shows that experts have well-formed mental models, we find that prompt programmers who have developed dozens of prompts still struggle to develop reliable mental models. Our observations show that prompt programming differs from traditional software development, motivating the creation of prompt programming tools and providing implications for software engineering stakeholders.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑