Skip to main content
QUICK REVIEW

[论文解读] Exploring Prompt Engineering Practices in the Enterprise

Michael Desmond, Michelle Brachman|arXiv (Cornell University)|Mar 13, 2024
Software Engineering Techniques and Practices被引用 7
一句话总结

本研究分析了 57 次企业级提示编辑会话,旨在了解从业者如何迭代提示并且哪些组件和编辑最为常见,对工具设计与开发有何影响。

ABSTRACT

Interaction with Large Language Models (LLMs) is primarily carried out via prompting. A prompt is a natural language instruction designed to elicit certain behaviour or output from a model. In theory, natural language prompts enable non-experts to interact with and leverage LLMs. However, for complex tasks and tasks with specific requirements, prompt design is not trivial. Creating effective prompts requires skill and knowledge, as well as significant iteration in order to determine model behavior, and guide the model to accomplish a particular goal. We hypothesize that the way in which users iterate on their prompts can provide insight into how they think prompting and models work, as well as the kinds of support needed for more efficient prompt engineering. To better understand prompt engineering practices, we analyzed sessions of prompt editing behavior, categorizing the parts of prompts users iterated on and the types of changes they made. We discuss design implications and future directions based on these prompt engineering practices.

研究动机与目标

  • 了解在企业场景中,实践者在 LLM 提示会话中如何迭代地编辑提示。
  • 识别最常被编辑的提示组件以及应用的编辑类型。
  • 分析提示编辑行为与模型切换、上下文使用和任务指令之间的关系,以为工具设计提供参考。

提出的方法

  • 收集并对来自内部企业级 LLM 提示平台的数据进行匿名化,该平台被 1,712 名用户在约 3 周的时间内使用。
  • 将提示编辑按会话分段,记录之间的间隔至少 20 分钟。
  • 对 57 个会话(1,523 次编辑)进行定性分析,按提示组件和编辑类型对编辑进行标注,并进行评估者间一致性检查。
  • 为提示组件(如指令、上下文、标签)和编辑类型(如修改、添加、变更、删除、格式化)制定代码手册。
  • 评估回滚(撤销/重做)和会话使用案例,以了解编辑的持久性和结果。

实验结果

研究问题

  • RQ1企业从业者在提示会话中最频繁编辑的提示组件有哪些?
  • RQ2用户应用的编辑类型有哪些(例如修改、添加),这些编辑如何影响提示的含义?
  • RQ3编辑模式如何与企业提示环境中的模型切换和参数变化相关?
  • RQ4编辑实践对为组织设计支持提示工程的工具有哪些启示?

主要发现

  • 提示编辑会话通常较长,平均每会话 43.4 分钟,中位数为 39 分钟。
  • 提交之间编辑提示的平均时间为 47 秒(中位数 32 秒)。
  • 93% 的会话涉及一个或多个推理参数的更改,其中目标语言模型是最常变更的参数。
  • 平均而言,会话使用 3.6 个模型(SD=2.7;中位数=3),表明在提示中频繁进行模型切换。
  • 最常见的编辑类型是修改(保持含义),其次是添加和含义变化;上下文和任务指令是编辑最多的组件。
  • 22% 的编辑是在重新提交前进行的多重编辑,其中 68% 的多重编辑至少包含一次上下文编辑,45% 同时包含上下文和指令编辑。
  • 11% 的编辑为回滚(撤销/重做),某些组件如 handle-unknown 和 output-length 的回滚率更高。

更好的研究,从现在开始

从论文设计到论文写作,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。