AWS AI Practitioner AIF-C01 · Applications of Foundation Models · medium

An analyst prompts an LLM to solve a multi-step supply-chain math word problem. When asked for the final number directly, the LLM frequently guesses wrong. However, when the analyst adds three worked examples showing intermediate reasoning steps (Step 1: ... Step 2: ... Therefore, the answer is ...) inside the prompt before the new question, accuracy jumps from 42% to 91%. Which two prompt engineering techniques are combined in this prompt? (Select two.)

Published · Last updated · checked before publication — how we verify questions

Options

  • AZero-Shot Prompting with zero examples or reasoning steps
  • BFew-Shot Prompting providing worked in-context examplesCorrect answer
  • CChain-of-Thought (CoT) Prompting eliciting step reasoningCorrect answer
  • DModel Distillation training a smaller student neural network

Answers: B. Few-Shot Prompting providing worked in-context examples; C. Chain-of-Thought (CoT) Prompting eliciting step reasoning

The prompt places three worked examples before the new question, and each example shows intermediate reasoning steps ending in a final answer. Showing examples inside the prompt is Few-Shot Prompting, also called in-context learning. Demonstrating the step-by-step reasoning chain before the answer is Chain-of-Thought Prompting. Together they form what is often called few-shot CoT, which is why accuracy rose from 42% to 91% on a multi-step problem that the model guessed at when asked directly. The key concept is that these two techniques are independent and can be stacked: few-shot describes how many demonstrations are supplied, while CoT describes what the demonstrations contain. The common trap is choosing only one of them, or confusing in-prompt techniques with methods that change the model itself, such as distillation or fine-tuning. Nothing about the model's weights changes here; only the prompt text does.

Why the other options are wrong

  • A. Zero-Shot Prompting with zero examples or reasoning steps — Zero-Shot Prompting gives the model a task with no examples at all. This prompt includes three worked examples, so it is not zero-shot, and zero-shot also lacks the reasoning steps that drove the improvement.
  • D. Model Distillation training a smaller student neural network — Model Distillation is a training process in which a smaller student model learns to imitate a larger teacher model, which changes model weights. This scenario only modifies the prompt text at inference time, so distillation is not involved.

All Applications of Foundation Models questions and the topic overview →

AWS and Amazon Web Services are trademarks of Amazon.com, Inc. PrepIQ Hub is not affiliated with, endorsed by, or sponsored by Amazon Web Services.