A Prompt Pattern Catalog to Enhance Prompt Engineering with ChatGPT

A Prompt Pattern Catalog to Enhance Prompt Engineering with ChatGPT

21 Feb 2023 | Jules White, Quchen Fu, Sam Hays, Michael Sandborn, Carlos Olea, Henry Gilbert, Ashraf Elnashar, Jesse Spencer-Smith, and Douglas C. Schmidt
This paper introduces a catalog of prompt engineering techniques in the form of prompt patterns, which have been applied to solve common problems when conversing with large language models (LLMs). Prompt patterns are a knowledge transfer method similar to software patterns, providing reusable solutions to common problems in the context of LLM interactions. The paper provides a framework for documenting prompt patterns to solve a range of problems, a catalog of successful prompt patterns for improving LLM outputs, and explains how prompts can be built from multiple patterns. Prompt patterns are essential for effective prompt engineering. They offer reusable solutions to specific problems, focusing on the context of output generation from LLMs. The paper introduces a catalog of prompt patterns for conversational LLMs, including categories such as Input Semantics, Output Customization, Error Identification, Prompt Improvement, and Interaction. Each pattern is accompanied by concrete examples and explanations of how they can be used to improve LLM interactions. The paper compares software patterns with prompt patterns, noting that both provide reusable solutions to recurring problems. Prompt patterns follow a similar format to software patterns, with slight modifications to match the context of output generation with LLMs. The paper discusses various prompt patterns, including the Meta Language Creation, Output Automater, Flipped Interaction, Persona, Question Refinement, and Alternative Approaches patterns. Each pattern is described in terms of its intent, motivation, structure, example implementation, and consequences. The paper also discusses the challenges of defining prompt patterns, including the need for clear and unambiguous language to avoid confusion. It proposes the concept of fundamental contextual statements to describe important ideas in prompts, which can be adapted to different contexts. The paper concludes with a discussion of the importance of prompt engineering in automating software development tasks and the potential of prompt patterns to enhance the effectiveness of LLM interactions.This paper introduces a catalog of prompt engineering techniques in the form of prompt patterns, which have been applied to solve common problems when conversing with large language models (LLMs). Prompt patterns are a knowledge transfer method similar to software patterns, providing reusable solutions to common problems in the context of LLM interactions. The paper provides a framework for documenting prompt patterns to solve a range of problems, a catalog of successful prompt patterns for improving LLM outputs, and explains how prompts can be built from multiple patterns. Prompt patterns are essential for effective prompt engineering. They offer reusable solutions to specific problems, focusing on the context of output generation from LLMs. The paper introduces a catalog of prompt patterns for conversational LLMs, including categories such as Input Semantics, Output Customization, Error Identification, Prompt Improvement, and Interaction. Each pattern is accompanied by concrete examples and explanations of how they can be used to improve LLM interactions. The paper compares software patterns with prompt patterns, noting that both provide reusable solutions to recurring problems. Prompt patterns follow a similar format to software patterns, with slight modifications to match the context of output generation with LLMs. The paper discusses various prompt patterns, including the Meta Language Creation, Output Automater, Flipped Interaction, Persona, Question Refinement, and Alternative Approaches patterns. Each pattern is described in terms of its intent, motivation, structure, example implementation, and consequences. The paper also discusses the challenges of defining prompt patterns, including the need for clear and unambiguous language to avoid confusion. It proposes the concept of fundamental contextual statements to describe important ideas in prompts, which can be adapted to different contexts. The paper concludes with a discussion of the importance of prompt engineering in automating software development tasks and the potential of prompt patterns to enhance the effectiveness of LLM interactions.
Reach us at info@study.space