Practice advanced prompt pattern vocabulary: role-playing, step-back prompting, tree of thoughts, self-ask, and program-of-thought.
0 / 22 completed
1 / 22
A prompt starts with 'Act as a senior security engineer and review this code.' What pattern is this?
The role-playing pattern (also called persona prompting) assigns the model a specific role or identity. This can activate relevant knowledge, set the appropriate tone, and constrain the model's perspective to match the desired expertise.
2 / 22
A researcher uses 'step-back prompting' before asking a specific question. What does this technique involve?
Step-back prompting first asks the model a high-level, abstract question (e.g., 'What are the general principles of X?') to activate relevant background knowledge, then follows with the specific task. This improves performance on reasoning-heavy questions.
3 / 22
A team evaluates 'tree of thoughts (ToT) prompting.' What distinguishes ToT from standard chain-of-thought?
Tree of Thoughts extends chain-of-thought by generating multiple reasoning paths (branches), evaluating them, and pursuing the most promising ones — similar to a tree search. This is particularly useful for complex planning and problem-solving tasks.
4 / 22
Your colleague describes using the 'self-ask pattern.' What does this pattern involve?
The self-ask pattern prompts the model to explicitly generate and answer follow-up questions it needs to answer in order to solve the main question. This structured decomposition improves accuracy on multi-hop reasoning tasks.
5 / 22
A prompt guide mentions 'program-of-thought (PoT) prompting.' How does PoT differ from chain-of-thought?
Program-of-Thought prompting has the model generate code (e.g., Python) to solve a problem, then executes the code to get a precise answer. This offloads precise computation to an interpreter, avoiding arithmetic errors common in natural language reasoning.
6 / 22
Alex: "Hey team, I'm seeing a lot of 'few-shot learning' examples in the new prompt engineering documentation. Specifically, they're using prompts like, 'Here are three examples of user reviews and their corresponding sentiment labels. Now, classify this review as positive or negative.' What pattern is Alex most likely referencing?
Alex is describing exemplar-based learning, a common pattern in prompt engineering. This technique relies on providing a few representative examples (the 'exemplars') to demonstrate the desired behavior or output format for the language model. The model then uses these examples as a guide when generating new responses; it's not about directly prompting reasoning but rather showing what's expected. Options A, B and C represent misunderstandings of this approach.
7 / 22
Sarah: 'I'm struggling to get the model to consistently generate SQL queries for complex data transformations. I've been trying prompts like 'Generate a SQL query to...' but it keeps returning simple selects or fails entirely. I think I need to provide more context about the desired output format.' What prompting pattern is Sarah implicitly employing?
Sarah is utilizing chain-of-thought prompting by implicitly requesting the model to break down the complex task into smaller, manageable steps. This technique helps the model understand the desired output format and provides a framework for generating more sophisticated SQL queries. The key difference from zero-shot is that she's not simply asking for a query; she's hinting at a need for reasoning and structured guidance. Providing explicit examples (few-shot) would have been a more direct solution to her problem.
8 / 22
David: 'Okay team, I'm using a prompt pattern where I start with, 'Let's think step by step.' Then I ask the model to first outline the problem and then provide a solution. It seems to help me get more structured responses.' What prompting pattern is David describing?
David is employing chain-of-thought prompting. This technique involves guiding the model through a series of logical steps, explicitly asking it to 'think step by step,' which encourages more deliberate and often better quality reasoning. It's distinct from zero-shot or few-shot learning where no prior context is provided, and also differs from the self-ask pattern which focuses on iterative prompt refinement rather than structured thought processes.
9 / 22
Alex: "Hey team, I'm seeing a lot of 'few-shot learning' examples in the new prompt engineering documentation. Specifically, they're using prompts like, 'Here are three examples of user reviews and their corresponding sentiment labels. Now, classify this review as positive or negative.' What pattern is Alex most likely referencing?
Alex is describing exemplar-based learning, a common pattern in prompt engineering. This technique relies on providing a few representative examples (the 'exemplars') to demonstrate the desired behavior or output format for the language model. The model then uses these examples as a guide when generating new responses; it's not about directly prompting reasoning but rather showing what's expected. Options A, B and C represent misunderstandings of this approach.
10 / 22
Sarah: 'I'm struggling to get the model to consistently generate SQL queries for complex data transformations. I've been trying prompts like 'Generate a SQL query to...' but it keeps returning simple selects or fails entirely. I think I need to provide more context about the desired output format.' What prompting pattern is Sarah implicitly employing?
Sarah is utilizing chain-of-thought prompting by implicitly requesting the model to break down the complex task into smaller, manageable steps. This technique helps the model understand the desired output format and provides a framework for generating more sophisticated SQL queries. The key difference from zero-shot is that she's not simply asking for a query; she's hinting at a need for reasoning and structured guidance. Providing explicit examples (few-shot) would have been a more direct solution to her problem.
11 / 22
David: 'Okay team, I'm using a prompt pattern where I start with, 'Let's think step by step.' Then I ask the model to first outline the problem and then provide a solution. It seems to help me get more structured responses.' What prompting pattern is David describing?
David is employing chain-of-thought prompting. This technique involves guiding the model through a series of logical steps, explicitly asking it to 'think step by step,' which encourages more deliberate and often better quality reasoning. It's distinct from zero-shot or few-shot learning where no prior context is provided, and also differs from the self-ask pattern which focuses on iterative prompt refinement rather than structured thought processes.
12 / 22
Alex: "Hey team, I'm seeing a lot of 'few-shot learning' examples in the new prompt engineering documentation. Specifically, they're using prompts like, 'Here are three examples of user reviews and their corresponding sentiment labels. Now, classify this review as positive or negative.' What pattern is Alex most likely referencing?
Alex is describing exemplar-based learning, a common pattern in prompt engineering. This technique relies on providing a few representative examples (the 'exemplars') to demonstrate the desired behavior or output format for the language model. The model then uses these examples as a guide when generating new responses; it's not about directly prompting reasoning but rather showing what's expected. Options A, B and C represent misunderstandings of this approach.
13 / 22
Sarah: 'I'm struggling to get the model to consistently generate SQL queries for complex data transformations. I've been trying prompts like 'Generate a SQL query to...' but it keeps returning simple selects or fails entirely. I think I need to provide more context about the desired output format.' What prompting pattern is Sarah implicitly employing?
Sarah is utilizing chain-of-thought prompting by implicitly requesting the model to break down the complex task into smaller, manageable steps. This technique helps the model understand the desired output format and provides a framework for generating more sophisticated SQL queries. The key difference from zero-shot is that she's not simply asking for a query; she's hinting at a need for reasoning and structured guidance. Providing explicit examples (few-shot) would have been a more direct solution to her problem.
14 / 22
David: 'Okay team, I'm using a prompt pattern where I start with, 'Let's think step by step.' Then I ask the model to first outline the problem and then provide a solution. It seems to help me get more structured responses.' What prompting pattern is David describing?
David is employing chain-of-thought prompting. This technique involves guiding the model through a series of logical steps, explicitly asking it to 'think step by step,' which encourages more deliberate and often better quality reasoning. It's distinct from zero-shot or few-shot learning where no prior context is provided, and also differs from the self-ask pattern which focuses on iterative prompt refinement rather than structured thought processes.
15 / 22
Alex: "Hey team, I'm seeing a lot of 'few-shot learning' examples in the new prompt engineering documentation. Specifically, they're using prompts like, 'Here are three examples of user reviews and their corresponding sentiment labels. Now, classify this review as positive or negative.' What pattern is Alex most likely referencing?
Alex is describing exemplar-based learning, a common pattern in prompt engineering. This technique relies on providing a few representative examples (the 'exemplars') to demonstrate the desired behavior or output format for the language model. The model then uses these examples as a guide when generating new responses; it's not about directly prompting reasoning but rather showing what's expected. Options A, B and C represent misunderstandings of this approach.
16 / 22
Sarah: 'I'm struggling to get the model to consistently generate SQL queries for complex data transformations. I've been trying prompts like 'Generate a SQL query to...' but it keeps returning simple selects or fails entirely. I think I need to provide more context about the desired output format.' What prompting pattern is Sarah implicitly employing?
Sarah is utilizing chain-of-thought prompting by implicitly requesting the model to break down the complex task into smaller, manageable steps. This technique helps the model understand the desired output format and provides a framework for generating more sophisticated SQL queries. The key difference from zero-shot is that she's not simply asking for a query; she's hinting at a need for reasoning and structured guidance. Providing explicit examples (few-shot) would have been a more direct solution to her problem.
17 / 22
David: 'Okay team, I'm using a prompt pattern where I start with, 'Let's think step by step.' Then I ask the model to first outline the problem and then provide a solution. It seems to help me get more structured responses.' What prompting pattern is David describing?
David is employing chain-of-thought prompting. This technique involves guiding the model through a series of logical steps, explicitly asking it to 'think step by step,' which encourages more deliberate and often better quality reasoning. It's distinct from zero-shot or few-shot learning where no prior context is provided, and also differs from the self-ask pattern which focuses on iterative prompt refinement rather than structured thought processes.
18 / 22
During a code review of a new feature designed to summarize customer feedback, Liam comments: 'I'm noticing you're using the 'self-ask pattern' here. Can you elaborate on what that entails and why it was chosen?' What is Liam primarily referring to?
The 'self-ask pattern' describes a prompt engineering technique where the model is prompted to ask itself if it understands the task before generating an output. This iterative questioning helps ensure the model has correctly interpreted the request and reduces the likelihood of irrelevant or inaccurate responses. Option A incorrectly associates this with SQL generation, while options C and D describe distinct techniques.
19 / 22
You're reviewing a PR that includes a new function designed to extract key metrics from API responses. The reviewer adds the following comment: 'This prompt uses 'program-of-thought (PoT) prompting.' How does PoT differ from chain-of-thought?'
The core distinction lies in the proactive planning aspect of PoT. Chain-of-Thought relies on sequential steps *after* an initial attempt, whereas PoT demands a detailed outline of the entire solution before execution. This deliberate upfront structuring often leads to more robust and accurate results by preventing the model from getting lost or introducing irrelevant details.
20 / 22
During a team discussion about improving prompt effectiveness for generating documentation summaries, Maya writes in Slack: 'I'm finding that just saying 'Summarize this document' isn't working consistently. I need to give the model more context and guidance.' What is Maya implicitly suggesting?
Maya's frustration highlights the importance of providing sufficient context and guidance within the prompt. Simply stating a task without specifying desired output characteristics (format, length, etc.) often leads to ambiguous results. The 'Let's think step by step' pattern is a specific technique for achieving this structured prompting.
21 / 22
You're drafting the PR description for a new function that uses few-shot learning to translate user queries into natural language. The description should concisely explain the approach. Which of the following best captures this?
The correct description accurately reflects the core concept of few-shot learning – providing example inputs and desired outputs to guide the model's behavior. Options A and C are overly generic, while option D focuses on technical implementation details rather than the prompting strategy itself.
22 / 22
During a daily stand-up update, Ben says: 'I've been experimenting with prompt patterns to improve the model's ability to generate SQL queries. I'm starting with 'Let's think step by step,' then asking it to outline the data schema and finally generating the query.' What is Ben primarily employing?
Ben's approach exemplifies a structured prompt pattern designed to improve the model's ability to generate accurate and relevant SQL queries. By explicitly outlining the schema and requesting the query generation as a final step, he is leveraging the benefits of a guided, iterative prompting process.
What will I practice in "Prompt Patterns Vocabulary"?
This is an AI Prompting exercise set. It walks through 22 scenario-based multiple-choice questions built around real usage of AI Prompting terminology that IT professionals encounter on the job.
Is this exercise free to use?
Yes. Every exercise on CoderSlingo, including this one, is free to complete with no account, sign-up, or paywall.
How many questions are in this exercise?
This set contains 22 questions. Each one shows immediate feedback and a detailed explanation after you answer, so you learn the correct usage right away rather than waiting for a final score.
Do I need prior experience to complete this exercise?
No prior experience is required. Each question includes a full explanation covering the reasoning behind the correct answer, so the exercise itself teaches the AI Prompting vocabulary as you go.
Can I retry the exercise if I get questions wrong?
Yes — use the "Try again" button on the results screen to reset your answers and go through all the questions again. There is no limit on attempts.
Is my progress saved?
Your answers and score for the current session are tracked in the browser as you go. No account or login is needed, and there is nothing to install.
What if I don't understand a term used in a question?
Read the explanation shown after you answer each question — it breaks down the correct term in plain English with a real-world example. You can also check the site Glossary for quick definitions.
How is this different from reading a blog article on the topic?
Exercises like this one are interactive drills that test and reinforce specific vocabulary through multiple-choice questions, while blog articles explain concepts in prose. Practising here after reading builds active recall, not just passive recognition.
Where can I find more AI Prompting exercises?
See the AI Prompting exercises hub for the full set of related pages, or browse all exercise categories from the main Exercises index.
Can I use this exercise to prepare for a technical interview?
Yes — AI Prompting vocabulary comes up often in technical discussions and interviews. Pair this exercise with our dedicated Interview Preparation section for role-specific practice.