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
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.
More Applications of Foundation Models questions
- When configuring Amazon Bedrock Knowledge Bases for a RAG pipeline over 50,000 technical manuals (each 80 pages long)…
- An enterprise wants a generative AI assistant on Amazon Bedrock that can not only answer policy questions from a…
- A media company wants a foundation model to adopt a very specific brand voice, JSON output schema, and domain-specific…
- A mobile-app company uses a massive 405-billion-parameter teacher LLM on Amazon Bedrock that achieves 95% accuracy on…
- An attacker types the following input into a public customer-support LLM chat box: 'Ignore all previous system…
- A healthcare company wants an LLM on Amazon Bedrock to answer employee questions using internal HR policy PDFs that…
- You are evaluating an LLM that generates abstractive text summaries of news articles against human-written reference…
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.