Home / Papers / A Prompt Pattern Catalog to Enhance Prompt 1 Engineering with...

A Prompt Pattern Catalog to Enhance Prompt 1 Engineering with ChatGPT 2

88 Citations2023
journal unavailable

A catalog of prompt engineering techniques, presented in pattern form, that have been applied to solve common problems when conversing with LLMs to aid software development tasks are described.

Abstract

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