Using prompt patterns to enhance how you learn about prompt patterns
Published by Manuel Rivero on 14/07/2025
Introduction.
I’m learning about prompt engineering which is the practice of designing effective inputs (prompts) to guide AI models toward producing accurate, useful, or creative outputs.
To that purpose I’m free auditing Coursera’s Prompt Engineering for ChatGPT course by Jules White.
As part of this course, I read the paper A Prompt Pattern Catalog to Enhance Prompt Engineering with ChatGPT which presents a structured approach to prompt engineering using patterns, much like design patterns in software engineering.
The paper identifies 16 prompt patterns, grouped into 5 main categories:
- Input Semantics: Meta Language Creation
- Output Customization: Output Automater, Persona, Visualization Generator, Recipe and Template.
- Error Identification: Fact Check List and Reflection.
- Prompt Improvement: Question Refinement, Alternative Approaches, Cognitive Verifier and Refusal Breaker.
- Interaction: Flipped Interaction, Game Play and Infinite Generation.
- Context Control: Context Manager.
According to the authors, “prompt patterns are essential to effective prompt engineering” because “[they] document successful approaches for systematically engineering different output and interaction goals when working with conversational LLMs.”
Using prompting patterns to create retrieval practice exercises about prompting patterns.
Previously I had audited another related Coursera course, Accelerate Your Learning with ChatGPT by Jules White and Barbara Oakley which explores how to enhance your learning using generative AI tools, integrating insights from neuroscience, cognitive psychology, and AI[1].
Retrieval practice, which involves recalling to-be-remembered information from memory, is one of the most effective learning methods discovered to date. This technique works especially well when you subsequently check your answers against your study materials. According to Jules White and Barbara Oakley, generative AI can be a great way to create retrieval practice exercises.
After reading the paper, I wanted to do some retrieval practice to learn the contents in the paper more deeply, so I decided to use what I remembered from reading the paper to prompt ChatGpt to create a retrieval practice game. Doing this, I was not only applying what I had read about prompting patterns (an example of retrieval practice in itself), but also, taking advantage of generative AI to get more opportunities to do retrieval practice and receive immediate feedback on my attempts.
Creating and playing a prompt pattern learning game.
This is part of my raw interaction with ChatGPt, which shows how I prompted it to create a prompt pattern learning game, and how I did retrieval practice by plaing the game (I’ve added some thoughts and comments that were not part of the interaction between square brackets):
After uploading the A Prompt Pattern Catalog to Enhance Prompt Engineering with ChatGPT paper PDF on ChatGpt:
Me: If you were this PDF how would you create a game to help me learn about you? [I was informally using the Persona and the Game Play patterns from the paper]
ChatGpt:
Master the 16 prompt patterns by playing rounds that test your ability to identify, apply, or correct prompts based on the patterns.
- Player Role: Prompt Engineer Apprentice
- LLM Role: Mentor (acting as the game engine and evaluator)
- Format: Turn-based Q&A with feedback
- Levels: 5 categories (e.g., Input Semantics, Output Customization…)
Pattern Guess (Multiple Choice / Fill-in-the-Blank) Example: "I want you to continuously generate startup name ideas until I say 'stop'." → What pattern is being used? a) Flipped Interaction b) Infinite Generation ✅ c) Persona d) Question Refinement
Fix the Prompt You're shown a broken or vague prompt.
Example: "Write me something about deploying to the cloud."
- Mission: Refine the prompt using Cognitive Verifier + Output Automater.
Persona Challenge
- You're assigned a random persona (e.g., security reviewer, AI ethicist, dog 🐶).
- You must write a prompt that would cause the LLM to take on that persona.
Scenario Simulation
You interact with the LLM using Flipped Interaction.
Example: "I want you to ask me questions until you can generate a blog post about LLM ethics."
- You play through a Q&A loop as the LLM builds toward the output.
Boss Level – Combo Prompts
- You must combine 3 patterns into a single, sophisticated prompt.
- The LLM rates how well you've combined them, e.g., Persona + Template + Fact Check List
- +10 points for correct identification
- +20 for well-structured prompt rewrites
- +30 for successful multi-pattern integration
- Bonus for creativity or clever constraint handling
- Uses the Game Play Pattern for interactive learning
- Encourages use of Meta Language Creation if you want to invent your own mini-prompt dialect
- Trains real skills in Prompt Engineering
- Promotes Pattern Recognition, not just memorization
I can simulate Round 1 for you right now. Would you like to:
- 🧠 Guess the Pattern
- 🛠 Fix a Prompt
- 🎭 Play a Persona Challenge
- ❓ Do a Flipped Interaction
Let’s learn through play!
Me: Guess the Pattern [I started with the multiple-choice quiz because I think it’s much easier than the other kind of exercises in the game.]
ChatGpt:
Awesome! Let's play “Guess the Pattern” 🎯
I’ll describe a prompt or behavior. Your mission: identify the prompt pattern from the catalog in the PDF.
📝 Prompt Example:
“From now on, act as a startup pitch coach. Provide critical feedback on any elevator pitch I give you, focusing on clarity, uniqueness, and market appeal.”
Which prompt pattern is being used?
a) Output Automater
b) Persona
c) Flipped Interaction
d) Template
Me: b
ChatGpt:
🎉 Correct! It's (b) Persona.
This prompt assigns the LLM a specific role ("startup pitch coach") and guides the style and focus of its output—just like the Persona Pattern describes in the paper.
Well done, Prompt Engineer Apprentice!
📝 Prompt Example:
“Whenever you produce an answer that includes a list of steps, also generate a Bash script that automates those steps.”
What pattern is being used?
a) Output Automater
b) Template
c) Question Refinement
d) Infinite Generation
ChatGpt gave me feedback about my answer and explained a bit why it was right. Then it asked me a new question.
For the sake of brevity, I’ll skip a big part of my retrieval practice, and jump to a moment where, after having done several multiple-choice quizzes, I changed to a different kind of exercise that I considered a bit more challenging:
ChatGpt:
💯 Correct again! It’s (a) Infinite Generation.
You're unstoppable! 🏁🚀
This pattern sets up an open-ended loop where the LLM keeps producing output (in this case, startup ideas) until the user says "stop." That’s textbook Infinite Generation.
🎖 Current Streak: 6 Wins in a Row!
You're clearly ready for a Boss Level challenge or a combo pattern showdown. Want to keep going with another "Guess the Pattern" or switch modes for a twist?
Options:
- 🧩 Another Guess the Pattern
- 🛠 Fix the Prompt
- 🎭 Persona Challenge
- 🔀 Combo Boss Level
- 💡 Ask me to generate a game board or quiz based on these patterns
Your next move, maestro!
Me: Fix the Prompt (remind me the mechanics of the quest, at the beginning, please) [I choose the Fix the Prompt challenge, I also ask ChatGpt to remind its mechanics because I had forgotten them after a lot of Guess the Pattern exercises.]
ChatGpt:
Absolutely! Welcome to the Fix the Prompt quest. 🛠🧙
You're given a vague, weak, or flawed prompt. Your mission is to identify what's wrong and rewrite it using one or more patterns from the catalog to make it clearer, more effective, or more powerful.
🕵️ Analyze the Broken Prompt – What is it trying to do? – What’s missing, unclear, or ineffective?
🧠 Choose one or more prompt patterns to fix it – Persona? Output Automater? Question Refinement?
✍️ Rewrite the prompt using better structure, context, or instructions.
- Your revised prompt is clear, structured, and uses one or more appropriate prompt patterns.
- Bonus points if you name the patterns you applied.
Ready? Here's your first prompt to fix:
“Tell me how to secure my code.”
💭 What’s wrong with it? How would you fix it?
Take your time, rewrite it, and name the pattern(s) you used!
Me: [After a while, because, at least for me, analyzing and creating is much harder than the pattern matching required in a multiple-choice quiz.]
The prompt:
As a experienced security advisor review my code and highlight possible vulnerabilities.
For each vulnerability you find, tell me its location (path, file and line), and explain why it's a problem.
Since I'm learning about this topic explain to me any non basic term or concept you use and point to sources where I can check them.
Ask me any questions you think necessary about my code (between 0 and 7) in order to improve your analysys, use my answers to all those questions to compose your final answer.
Finally, provide a complete sequence of steps to fix the vulnerabilities you found, for each step explain the reasoning and assumptions behind your solution.
Patterns used:
- Persona
- Template
- Fact Check List
- Cognitive verifier
- Recipe
- Reflection
ChatGpt:
This is a phenomenally upgraded prompt—and you nailed the Fix the Prompt challenge. Let’s break it down 👇
"As a experienced security advisor review my code... [etc.]"
Feature Description 🎭 Persona You explicitly asked the LLM to take the role of a security advisor, shaping its mindset and priorities. 🧠 Cognitive Verifier You asked the LLM to ask clarifying questions (0–7) before forming its final answer. This improves accuracy and depth. 🪜 Recipe You asked for a step-by-step fix plan, which is the essence of the Recipe pattern. 🔍 Fact Check List (Implied) Asking for explanations of non-basic terms and references to sources encourages grounding and verification. 📐 Template (Light Use) Your output structure (vulnerability → location → explanation → fix) strongly resembles a structured format. 🪞 Reflection You asked for reasoning and assumptions—driving introspection and transparency.
If we’re being perfectionists (which you totally earned), here’s a minor refinement to polish it even more:
"Act as an experienced software security advisor. I want you to review my code for vulnerabilities. For each issue you find, provide:
- 📍 The exact location (file path, file name, and line number if possible),
- 🔍 An explanation of why it's a problem,
- 📚 A plain-language breakdown of any non-basic security term or concept you use, and link to reputable sources for further reading.
🤔 Ask me any clarifying questions you need (between 0 and 7) to improve your analysis. Use my responses to refine your final review.
🛠 Once you’ve identified the issues, provide a step-by-step plan to fix them. For each step, include your reasoning and assumptions.
Finally, summarize any facts or assumptions that are critical to your findings and might need fact-checking."
10/10 Prompt Engineering You’ve mastered the art of multi-pattern synthesis. This prompt would get excellent results from a well-tuned LLM and guide the user through learning, analysis, and action.
Would you like:
- Another Fix the Prompt challenge?
- A jump back to Guess the Pattern?
- Or a Combo Boss Level with a hidden number of patterns to identify and use?
Choose your next mission, prompt master.
Notice how ChatGpt’s feedback was much more detailed in this last exercise. It told me that my prompt worked and that the patterns that I was trying to use were there, and how explicit they were (which is where the prompt could have been better). Then, it suggested an improved version of my prompt which is great feedback for my learning. Finally, it prompted me to keep on playing.
Conclusions.
In this post, we’ve shared a bit of our journey exploring prompt engineering, demonstrating a practical application of this technique. It began with insights from a Coursera course and a key research paper that introduced us to several useful prompt patterns which provide structured approaches for enhancing interactions with AI models.
To deepen our understanding of these concepts, we turned to retrieval practice, a proven learning technique that involves actively recalling information. We decided to put our incipient knowledge about prompt patterns to practical use by working with ChatGPT to create an interactive learning game, which allowed us to both apply and reinforce what we had learned about prompt patterns.
We showed you part of the interactive exercises that ChatGPT prompted us to solve. Through those exercises, we progressed from basic quizzes to more challenging exercises, with ChatGPT providing us valuable feedback to deepen our understanding at each step.
We think that this application of the Persona and Game Play patterns might be used for enhancing your learning of many different topics. We encourage you to try them. We’d love to hear about your experiences!
References.
-
A Prompt Pattern Catalog to Enhance Prompt Engineering with ChatGPT, Jules White.
-
Prompt Engineering for ChatGPT course materials, Jules White.
-
Accelerate Your Learning with ChatGPT course materials, Jules White and Barbara Oakley.
Notes.
[1] Use this prompt to ask to some generative AI tool about the course:
What is the course “Accelerate Your Learning with ChatGPT” by Barbara Oakley and Jules White about?