Few-shot learning, in-context learning (ICL), chain-of-thought (CoT) prompting, zero-shot CoT, self-consistency, Tree of Thoughts, and ReAct prompting.
Key vocabulary
Few-shot learning — providing the model with a small number of input-output examples within the prompt to guide its response format and reasoning.
In-context learning (ICL) — the model's ability to learn a task from examples provided in the prompt without updating weights.
Chain-of-thought (CoT) prompting — prompting the model to reason through intermediate steps before giving a final answer.
Zero-shot CoT — triggering step-by-step reasoning without examples, typically by adding "Let's think step by step."
Self-consistency — sampling multiple reasoning chains and selecting the most common answer to improve reliability.
0 / 30 completed
1 / 30
A prompt engineer says "we use few-shot examples in the prompt." What does this mean?
Few-shot learning (or few-shot prompting) places 2–10 demonstration examples directly in the prompt. The model infers the task pattern from the examples without any weight updates. This contrasts with zero-shot (no examples) and fine-tuning (examples used to update weights). Few-shot examples strongly influence output format and reasoning style.
2 / 30
What distinguishes chain-of-thought (CoT) prompting from a standard prompt?
Chain-of-thought prompting was introduced by Wei et al. (2022). By including examples that show intermediate reasoning steps ("First, I calculate… Then…"), or by simply asking the model to think step by step, you dramatically improve performance on multi-step reasoning tasks such as arithmetic, commonsense reasoning, and symbolic manipulation.
3 / 30
A colleague uses zero-shot CoT by adding "Let’s think step by step" to their prompt. What does this achieve?
Zero-shot CoT (Kojima et al., 2022) showed that simply appending "Let's think step by step" to a question prompts large models to generate reasoning chains spontaneously — without any demonstrations. This is powerful because it avoids the need to manually craft reasoning examples, making it cheap and broadly applicable.
4 / 30
The self-consistency technique in prompting involves:
Self-consistency (Wang et al., 2022) replaces greedy decoding with sampling: you generate N diverse reasoning chains (by using non-zero temperature), then take a majority vote on the final answers. This marginalises over imperfect reasoning paths, substantially improving accuracy on mathematical and commonsense reasoning benchmarks over single-chain CoT.
5 / 30
How does ReAct prompting differ from standard chain-of-thought?
ReAct (Yao et al., 2022) stands for Reason + Act. The model alternates between Thought (reasoning), Action (invoking a tool such as a web search or code interpreter), and Observation (reading the tool result). This grounds reasoning in real-world information and is the foundation of modern AI agent architectures like LangChain's agent loop.
6 / 30
Sarah: "I'm struggling with this API call. It keeps returning a 429 – Too Many Requests. I tried adding a delay to my calls but it's still happening."
Sarah's situation highlights an issue where the API isn't correctly interpreting her requests. Few-shot examples would provide the API with prior instances of successful calls, allowing it to better understand and respond to her current request without the rate limiting issues she is experiencing. The core problem isn't a misunderstanding of CoT; it's a misconfiguration or a lack of contextual information for the API.
7 / 30
Mark (in a PR description): "Implemented the new user authentication flow. Using chain-of-thought prompting to improve the model's ability to handle complex scenarios and guide it through the validation process."
Mark correctly identifies that CoT prompting provides the model with a sequential reasoning process. This allows the model to break down complex tasks like authentication into smaller, more manageable steps, improving its ability to handle different scenarios effectively. It's crucial to understand that few-shot examples provide *examples* of correct behavior, while CoT guides the *reasoning* behind it.
8 / 30
David (during a standup): "I'm experimenting with ReAct prompting. I'm giving the language model a chance to analyze the user query and then decide what action to take before executing it."
David's description accurately captures the essence of ReAct prompting. It distinguishes itself from standard CoT by incorporating an 'act' phase – the model not only reasons about the problem but also executes actions based on that reasoning. This creates a dynamic feedback loop, enabling more nuanced and adaptable behavior.
9 / 30
Emily: "We're using a dataset of successful API calls to fine-tune the model. The prompts include examples of how developers typically interact with the service."
Emily's statement clearly illustrates few-shot learning. Providing a small set of relevant examples – in this case, successful API call interactions – directly influences the model's responses and behavior. This contrasts with CoT, which focuses on guiding *reasoning* rather than simply providing examples.
10 / 30
Ben (in a Slack message): "To improve the accuracy of our sentiment analysis model, we're using a prompt that asks the model to first identify the key entities in the text and then determine the overall sentiment towards those entities."
Ben's message perfectly exemplifies chain-of-thought prompting by structuring the sentiment analysis task into distinct stages. The model first identifies entities and *then* determines sentiment – this sequential breakdown is characteristic of CoT. This approach allows for more nuanced understanding than simply asking the model to directly identify sentiment.
11 / 30
Sarah: "I'm struggling with this API call. It keeps returning a 429 – Too Many Requests. I tried adding a delay to my calls but it's still happening."
Sarah's situation highlights an issue where the API isn't correctly interpreting her requests. Few-shot examples would provide the API with prior instances of successful calls, allowing it to better understand and respond to her current request without the rate limiting issues she is experiencing. The core problem isn't a misunderstanding of CoT; it's a misconfiguration or a lack of contextual information for the API.
12 / 30
Mark (in a PR description): "Implemented the new user authentication flow. Using chain-of-thought prompting to improve the model's ability to handle complex scenarios and guide it through the validation process."
Mark correctly identifies that CoT prompting provides the model with a sequential reasoning process. This allows the model to break down complex tasks like authentication into smaller, more manageable steps, improving its ability to handle different scenarios effectively. It's crucial to understand that few-shot examples provide *examples* of correct behavior, while CoT guides the *reasoning* behind it.
13 / 30
David (during a standup): "I'm experimenting with ReAct prompting. I'm giving the language model a chance to analyze the user query and then decide what action to take before executing it."
David's description accurately captures the essence of ReAct prompting. It distinguishes itself from standard CoT by incorporating an 'act' phase – the model not only reasons about the problem but also executes actions based on that reasoning. This creates a dynamic feedback loop, enabling more nuanced and adaptable behavior.
14 / 30
Emily: "We're using a dataset of successful API calls to fine-tune the model. The prompts include examples of how developers typically interact with the service."
Emily's statement clearly illustrates few-shot learning. Providing a small set of relevant examples – in this case, successful API call interactions – directly influences the model's responses and behavior. This contrasts with CoT, which focuses on guiding *reasoning* rather than simply providing examples.
15 / 30
Ben (in a Slack message): "To improve the accuracy of our sentiment analysis model, we're using a prompt that asks the model to first identify the key entities in the text and then determine the overall sentiment towards those entities."
Ben's message perfectly exemplifies chain-of-thought prompting by structuring the sentiment analysis task into distinct stages. The model first identifies entities and *then* determines sentiment – this sequential breakdown is characteristic of CoT. This approach allows for more nuanced understanding than simply asking the model to directly identify sentiment.
16 / 30
Sarah: "I'm struggling with this API call. It keeps returning a 429 – Too Many Requests. I tried adding a delay to my calls but it's still happening."
Sarah's situation highlights an issue where the API isn't correctly interpreting her requests. Few-shot examples would provide the API with prior instances of successful calls, allowing it to better understand and respond to her current request without the rate limiting issues she is experiencing. The core problem isn't a misunderstanding of CoT; it's a misconfiguration or a lack of contextual information for the API.
17 / 30
Mark (in a PR description): "Implemented the new user authentication flow. Using chain-of-thought prompting to improve the model's ability to handle complex scenarios and guide it through the validation process."
Mark correctly identifies that CoT prompting provides the model with a sequential reasoning process. This allows the model to break down complex tasks like authentication into smaller, more manageable steps, improving its ability to handle different scenarios effectively. It's crucial to understand that few-shot examples provide *examples* of correct behavior, while CoT guides the *reasoning* behind it.
18 / 30
David (during a standup): "I'm experimenting with ReAct prompting. I'm giving the language model a chance to analyze the user query and then decide what action to take before executing it."
David's description accurately captures the essence of ReAct prompting. It distinguishes itself from standard CoT by incorporating an 'act' phase – the model not only reasons about the problem but also executes actions based on that reasoning. This creates a dynamic feedback loop, enabling more nuanced and adaptable behavior.
19 / 30
Emily: "We're using a dataset of successful API calls to fine-tune the model. The prompts include examples of how developers typically interact with the service."
Emily's statement clearly illustrates few-shot learning. Providing a small set of relevant examples – in this case, successful API call interactions – directly influences the model's responses and behavior. This contrasts with CoT, which focuses on guiding *reasoning* rather than simply providing examples.
20 / 30
Ben (in a Slack message): "To improve the accuracy of our sentiment analysis model, we're using a prompt that asks the model to first identify the key entities in the text and then determine the overall sentiment towards those entities."
Ben's message perfectly exemplifies chain-of-thought prompting by structuring the sentiment analysis task into distinct stages. The model first identifies entities and *then* determines sentiment – this sequential breakdown is characteristic of CoT. This approach allows for more nuanced understanding than simply asking the model to directly identify sentiment.
21 / 30
Sarah: "I'm struggling with this API call. It keeps returning a 429 – Too Many Requests. I tried adding a delay to my calls but it's still happening."
Sarah's situation highlights an issue where the API isn't correctly interpreting her requests. Few-shot examples would provide the API with prior instances of successful calls, allowing it to better understand and respond to her current request without the rate limiting issues she is experiencing. The core problem isn't a misunderstanding of CoT; it's a misconfiguration or a lack of contextual information for the API.
22 / 30
Mark (in a PR description): "Implemented the new user authentication flow. Using chain-of-thought prompting to improve the model's ability to handle complex scenarios and guide it through the validation process."
Mark correctly identifies that CoT prompting provides the model with a sequential reasoning process. This allows the model to break down complex tasks like authentication into smaller, more manageable steps, improving its ability to handle different scenarios effectively. It's crucial to understand that few-shot examples provide *examples* of correct behavior, while CoT guides the *reasoning* behind it.
23 / 30
David (during a standup): "I'm experimenting with ReAct prompting. I'm giving the language model a chance to analyze the user query and then decide what action to take before executing it."
David's description accurately captures the essence of ReAct prompting. It distinguishes itself from standard CoT by incorporating an 'act' phase – the model not only reasons about the problem but also executes actions based on that reasoning. This creates a dynamic feedback loop, enabling more nuanced and adaptable behavior.
24 / 30
Emily: "We're using a dataset of successful API calls to fine-tune the model. The prompts include examples of how developers typically interact with the service."
Emily's statement clearly illustrates few-shot learning. Providing a small set of relevant examples – in this case, successful API call interactions – directly influences the model's responses and behavior. This contrasts with CoT, which focuses on guiding *reasoning* rather than simply providing examples.
25 / 30
Ben (in a Slack message): "To improve the accuracy of our sentiment analysis model, we're using a prompt that asks the model to first identify the key entities in the text and then determine the overall sentiment towards those entities."
Ben's message perfectly exemplifies chain-of-thought prompting by structuring the sentiment analysis task into distinct stages. The model first identifies entities and *then* determines sentiment – this sequential breakdown is characteristic of CoT. This approach allows for more nuanced understanding than simply asking the model to directly identify sentiment.
26 / 30
Sarah: "I'm struggling with this API call. It keeps returning a 429 – Too Many Requests. I tried adding a delay to my calls but it's still happening."
Sarah's situation highlights an issue where the API isn't correctly interpreting her requests. Few-shot examples would provide the API with prior instances of successful calls, allowing it to better understand and respond to her current request without the rate limiting issues she is experiencing. The core problem isn't a misunderstanding of CoT; it's a misconfiguration or a lack of contextual information for the API.
27 / 30
Mark (in a PR description): "Implemented the new user authentication flow. Using chain-of-thought prompting to improve the model's ability to handle complex scenarios and guide it through the validation process."
Mark correctly identifies that CoT prompting provides the model with a sequential reasoning process. This allows the model to break down complex tasks like authentication into smaller, more manageable steps, improving its ability to handle different scenarios effectively. It's crucial to understand that few-shot examples provide *examples* of correct behavior, while CoT guides the *reasoning* behind it.
28 / 30
David (during a standup): "I'm experimenting with ReAct prompting. I'm giving the language model a chance to analyze the user query and then decide what action to take before executing it."
David's description accurately captures the essence of ReAct prompting. It distinguishes itself from standard CoT by incorporating an 'act' phase – the model not only reasons about the problem but also executes actions based on that reasoning. This creates a dynamic feedback loop, enabling more nuanced and adaptable behavior.
29 / 30
Emily: "We're using a dataset of successful API calls to fine-tune the model. The prompts include examples of how developers typically interact with the service."
Emily's statement clearly illustrates few-shot learning. Providing a small set of relevant examples – in this case, successful API call interactions – directly influences the model's responses and behavior. This contrasts with CoT, which focuses on guiding *reasoning* rather than simply providing examples.
30 / 30
Ben (in a Slack message): "To improve the accuracy of our sentiment analysis model, we're using a prompt that asks the model to first identify the key entities in the text and then determine the overall sentiment towards those entities."
Ben's message perfectly exemplifies chain-of-thought prompting by structuring the sentiment analysis task into distinct stages. The model first identifies entities and *then* determines sentiment – this sequential breakdown is characteristic of CoT. This approach allows for more nuanced understanding than simply asking the model to directly identify sentiment.
What will I practice in "Few-Shot & Chain-of-Thought Vocabulary | Coders Lingo"?
This is a Prompt Engineering Language exercise set. It walks through 30 scenario-based multiple-choice questions built around real usage of prompt engineering language 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 30 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 prompt engineering language 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 Prompt Engineering Language exercises?
See the Prompt Engineering Language 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 — prompt engineering language vocabulary comes up often in technical discussions and interviews. Pair this exercise with our dedicated Interview Preparation section for role-specific practice.