Prompting techniques are repeatable ways of structuring a prompt to get better answers without changing the model. This lesson covers the ones the exam names: zero-shot, single-shot and few-shot prompting, chain-of-thought prompting and prompt templates. Exam questions usually describe a task and a problem with the output, then ask which technique fits best.
Zero-shot prompting
A zero-shot prompt gives the model an instruction and the input, with no worked examples. "Classify the sentiment of this headline as positive, negative or neutral" is zero-shot. It works well for common, clearly described tasks that a capable foundation model has seen many times in training. It's also the cheapest option, because the prompt is short. Zero-shot is the natural first attempt: start here, and only add more if the answers miss the mark.
Single-shot and few-shot prompting
A "shot" is one example: a sample input paired with the output you want. A single-shot (or one-shot) prompt includes one example. A few-shot prompt includes several, often three to five for simple classification tasks. AWS also calls this in-context learning, because the model learns the pattern from examples inside the prompt rather than through retraining.
Examples are most useful when the task has a format, style or set of labels the model wouldn't guess. Think of company-specific ticket categories, or a house style for product descriptions. AWS's guidance on good shots: make them diverse, covering common and edge cases; match the complexity of the real inputs; keep them relevant; and avoid bias, since a lopsided set of examples produces lopsided answers. The trade-off is cost: every example adds input tokens to every request.
Chain-of-thought prompting
Chain-of-thought (CoT) prompting asks the model to reason step by step before giving its answer. That can be as simple as adding "Think step by step" or as guided as listing the steps to follow. It improves accuracy on multi-step problems such as calculations, multi-part analysis and complex reasoning. Because the reasoning is visible, it also makes mistakes easier to spot.
CoT has costs. The model writes more, so it uses more output tokens and takes longer. AWS advises skipping it for simple tasks that don't need it.
Prompt templates
A prompt template is a reusable prompt with fixed parts and placeholders for the parts that change, such as customer_message or product_name. A template can hold the instruction, the context, few-shot examples and the output format, so every request gets the same proven structure. Templates make results more consistent across a team and let a tested prompt be reused in many places. Amazon Bedrock Prompt Management stores templates with variables, covered in its own lesson.
| Technique | Add to the prompt | Best for | Main cost |
|---|---|---|---|
| Zero-shot | Instruction only | Common, clear tasks | Lowest |
| Single-shot | One example | Showing one format | Slightly more input tokens |
| Few-shot | Several examples | Custom labels, styles or formats | More input tokens |
| Chain-of-thought | "Reason step by step" | Multi-step reasoning | More output tokens and latency |
| Prompt template | Fixed structure with placeholders | Consistency and reuse | Upfront design effort |
On the exam
Match the problem to the technique. If the model uses the wrong labels or format, add examples (few-shot). If it fails at multi-step calculations or logic, use chain-of-thought. If every team member writes the prompt differently and results vary, use a template. If the task is simple and the answers are already good, zero-shot is the cheapest choice. A common trap is choosing fine-tuning when a few examples in the prompt would do. Few-shot prompting changes nothing about the model itself.