AIF-C01 ยท Prompt engineering
Prompting techniques
Zero-shot, single-shot, few-shot, chain-of-thought and prompt templates and choosing among them.
Key points
- Zero-shot gives only the task.
- Single-shot adds one worked example, few-shot adds several.
- Chain-of-thought asks the model to reason step by step before answering, which helps multi-step problems.
- A prompt template is a reusable prompt with placeholders filled at run time.
Practice questions
What defines a zero-shot prompt?
- It contains the task but no worked examples
- It contains exactly one worked example
- It contains several worked examples
- It asks the model to show its reasoning
Show answer
Answer: A. It contains the task but no worked examples
Zero-shot means no examples are included; the model relies on its training. One or more examples would make it single-shot or few-shot.
Which statements about few-shot prompting are correct?
- The examples show the model the desired pattern or format
- The examples consume input tokens on every request
- The examples permanently retrain the model
- It requires zero examples
- It changes the model weights in the service
Show answer
Answer: A. The examples show the model the desired pattern or format, B. The examples consume input tokens on every request
Few-shot examples demonstrate the pattern and format, and they cost input tokens. They do not change model weights, so no retraining occurs.
True or false: giving examples in a few-shot prompt fine-tunes the model.
Show answer
Answer: False
False. Few-shot examples only live in the prompt for that request (in-context learning). Fine-tuning changes model weights through a separate training job.
Practice 8 questions on this topic in Bitzu
Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.
