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 / 5 completed
1 / 5
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 / 5
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 / 5
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 / 5
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 / 5
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.