AIF-C01 notes
Essentials of prompt engineering

Prompt Engineering Techniques

TechniqueHow it worksWhen to use it
Zero-shotThe task with no examplesSimple tasks and large, capable models
Few-shot (one-shot with a single example)The task plus a few input and output examplesYou need a specific format or style
Chain-of-thought (CoT)Asks the model to reason in intermediate steps, for example "Think step by step"Multi-step reasoning such as math word problems

Tips

  • Zero-shot works better with larger models and with instruction-tuned models, including those tuned with RLHF.
  • Few-shot: pick representative, diverse, clear examples. More examples usually help, but too many add noise.
  • CoT can be zero-shot ("think step by step") or few-shot (worked examples that show the reasoning). Combining CoT with few-shot examples is the strongest option for complex reasoning.

Scenario update

Few-shot with the company's report template plus two example reports from earlier product launches.

On this page