A Prompt Pattern Catalog to Enhance Prompt Engineering with ChatGPT
Jules WhiteQuchen FuSam HaysMichael SandbornCarlos OleaHenry GilbertAshraf ElnasharJesse Spencer-SmithDouglas C. Schmidt
Presents a structured catalog of reusable prompt engineering patterns modeled after software design patterns to solve common problems and systematically improve interactions with large language models.
As conversational large language models become widely integrated into software engineering workflows and enterprise environments, organizations often struggle to produce consistent, high-quality, and secure outputs. Standard, informal prompting frequently results in incomplete answers, hallucinations, or inefficient trial-and-error interactions.
The article sets out to create a structured framework and catalog of reusable prompt patterns that formalize effective prompt engineering practices for large language models. Its primary goal is to demonstrate how systematic prompt structuring can solve recurring interaction challenges and enhance output quality across diverse domains.
The authors established a qualitative pattern framework inspired by traditional software design patterns, defining each prompt pattern through structured components including intent, motivation, fundamental contextual statements, and concrete implementations. They evaluated sixteen distinct prompt patterns by combining community-documented techniques with independent experiments using the ChatGPT+ service, focusing on automating software engineering tasks such as code generation, refactoring, and system administration.
The article establishes several key findings. First, the authors cataloged sixteen reusable prompt patterns grouped into five functional categories: Input Semantics, Output Customization, Error Identification, Prompt Improvement, and Interaction. Second, they demonstrated that prompts can fundamentally alter interaction paradigms—such as using the Flipped Interaction pattern to have the model drive requirements gathering through sequential questioning, or the Persona pattern to simulate specialized environments like compromised terminals. Third, prompt patterns can be systematically composed; combining patterns (such as Question Refinement with Cognitive Verifier or Fact Check List) significantly improves reasoning depth and transparently highlights factual assumptions. Finally, using fundamental contextual statements rather than rigid formal grammars provides an intuitive, adaptable approach to prompt design across various operational contexts.
These findings have direct operational and risk implications for organizations adopting conversational artificial intelligence. Implementing standardized prompt patterns reduces development time and labor costs by automating repetitive multi-file coding tasks and deployment scripts. Furthermore, incorporating verification patterns (such as Fact Check List and Reflection) helps mitigate compliance and security risks by forcing models to expose underlying assumptions, thereby guarding against inaccurate generated artifacts.
Decision-makers and engineering leads should systematically adopt and codify these prompt patterns within organizational workflows to standardize generative artificial intelligence usage. Teams should mandate human verification of automated scripts and factual outputs before execution, particularly in high-risk domains like cybersecurity. Additionally, organizations should build internal, domain-specific pattern libraries and evaluate how emerging model updates impact pattern behavior.
The primary limitation of the article is that all patterns were evaluated qualitatively on a single platform, ChatGPT+, without large-scale statistical benchmarking across multiple competing language models. Furthermore, conversational memory limits can cause models to lose prompt context over extended sessions, and models remain susceptible to generating plausible-sounding factual errors. Readers can have high confidence in the utility and adaptability of the pattern framework, but should maintain prudent human oversight over all generated outputs.
- Paper: Pre-train, Prompt, and Predict: A Systematic Survey of Prompting Methods in Natural Language Processing, Pengfei Liu et al. (2021). Provides a comprehensive taxonomy and foundational mechanics of prompting techniques in NLP, establishing the foundational concepts that the prompt pattern catalog organizes into reusable software-style patterns.
- Paper: Language Models are Few-Shot Learners, T. B. Brown et al. (2020). Introduces the in-context few-shot prompting paradigm that underpins modern prompt engineering and interaction design with large language models.
- Paper: Chain-of-Thought Prompting Elicits Reasoning in Large Language Models, Jason Wei et al. (2022). Introduces the foundational Chain-of-Thought prompting strategy, which serves as a core structural template adapted throughout the paper's prompt pattern taxonomy.
- Paper: Large Language Models are Zero-Shot Reasoners, Takeshi Kojima et al. (2022). Demonstrates zero-shot reasoning triggers like 'Let's think step by step', establishing essential baseline prompt-structuring strategies expanded upon in the catalog.
- Paper: Training language models to follow instructions with human feedback, Long Ouyang et al. (2022). Explains how instruction fine-tuning and alignment enable conversational models like ChatGPT to reliably interpret structured prompt directives.
- Paper: Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?, Sewon Min et al. (2022). Analyzes the underlying mechanics and formatting factors that make prompt demonstrations effective, motivating systematic patterns for structuring prompt context.
- Paper: Self-Refine: Iterative Refinement with Self-Feedback, Aman Madaan et al. (2023). Operationalizes iterative refinement and feedback patterns into an automated multi-step LLM self-correction framework.
- Paper: Tree of Thoughts: Deliberate Problem Solving with Large Language Models, Shunyu Yao et al. (2023). Extends linear prompt reasoning patterns into a deliberate tree-search framework that explores and evaluates multiple intermediate thought paths.
- Paper: ReAct: Synergizing Reasoning and Acting in Language Models, Shunyu Yao et al. (2023). Combines reasoning and action prompting patterns into an interactive framework enabling language models to dynamically interface with external environments.
- Paper: Agentic Context Engineering: Evolving Contexts for Self-Improving Language Models, Qizheng Zhang et al. (2026). Evolves static prompt engineering patterns into an agentic context-engineering system that systematically updates and refines prompt playbooks from execution history.
- Paper: Not What You've Signed Up For: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injection, Kai Greshake et al. (2023). Investigates how structured prompt patterns and instructions can be exploited or subverted through indirect prompt injection in integrated LLM systems.
- Paper: Jailbroken: How Does LLM Safety Training Fail?, Alexander Wei et al. (2023). Analyzes how adversarial prompt combinations and patterns systematically exploit underlying safety training failure modes.
- Paper: Prompt Repetition Improves Non-Reasoning LLMs, Yaniv Leviathan et al. (2025). Evaluates prompt repetition as a concrete, lightweight prompt engineering pattern to improve accuracy across non-reasoning LLM tasks.
