arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2302.11382cs.SEcs.AI
收藏

用ChatGPT增强提示工程的提示模式目录

A Prompt Pattern Catalog to Enhance Prompt Engineering with ChatGPT

Vanderbilt University(范德堡大学)

Jules White, Quchen Fu, Sam Hays, Michael Sandborn, Carlos Olea, Henry Gilbert, Ashraf Elnashar, Jesse Spencer-Smith, Douglas C. Schmidt

摘要:

快速工程提示工程是与大语言模型(LLM)(如ChatGPT)进行有效对话所需的越来越重要的技能。指令是给予LLM的指令,用于执行规则,自动化流程,并确保生成的输出的特定质量(和数量)。脚本也是一种编程形式,可以自定义输出和与LLM的交互。本文描述了一个目录的提示工程技术模式的形式,已被应用于解决常见问题时,与LLM交谈。提示模式是一种类似于软件模式的知识转移方法,因为它们为特定上下文中面临的常见问题提供了可重用的解决方案,即,使用LLM时的输出生成和交互。本文提供了以下贡献的提示工程,应用LLM自动化软件开发任务的研究。首先,它提供了一个框架,用于记录模式,以结构化提示来解决一系列问题,以便它们可以适应不同的领域。其次,它提供了一个已成功应用于改善LLM对话输出的模式目录。第三,它解释了如何从多个模式中构建提示,并说明了与其他提示模式相结合的提示模式。

英文摘要:

Prompt engineering is an increasingly important skill set needed to converse effectively with large language models (LLMs), such as ChatGPT. Prompts are instructions given to an LLM to enforce rules, automate processes, and ensure specific qualities (and quantities) of generated output. Prompts are also a form of programming that can customize the outputs and interactions with an LLM. This paper describes a catalog of prompt engineering techniques presented in pattern form that have been applied to solve common problems when conversing with LLMs. Prompt patterns are a knowledge transfer method analogous to software patterns since they provide reusable solutions to common problems faced in a particular context, i.e., output generation and interaction when working with LLMs. This paper provides the following contributions to research on prompt engineering that apply LLMs to automate software development tasks. First, it provides a framework for documenting patterns for structuring prompts to solve a range of problems so that they can be adapted to different domains. Second, it presents a catalog of patterns that have been applied successfully to improve the outputs of LLM conversations. Third, it explains how prompts can be built from multiple patterns and illustrates prompt patterns that benefit from combination with other prompt patterns.

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

↑