AIF-C01 Question 128
Single answerA machine learning team is tasked with building a natural language processing (NLP) application using a large language model (LLM) hosted on Amazon SageMaker. They want to improve the model's ability to provide detailed reasoning for complex queries. Which prompt engineering technique should they use to achieve this?
- A
Zero-shot prompting
- B
Few-shot prompting
- C
Chain-of-thought prompting
- D
Single-shot prompting
Show answer and explanation
Correct answer: C
Explanation
Chain-of-thought prompting is a technique in prompt engineering where the prompt is designed to explicitly instruct the model to think through a problem step by step. This approach is particularly effective in scenarios where detailed reasoning or multi-step problem-solving is required, making it the best choice for the NLP team's goal of improving reasoning in their application.
- A. Incorrect.
Zero-shot prompting relies on the model's ability to generate an answer without any prior examples or context, which is not ideal for providing detailed reasoning.
- B. Incorrect.
Few-shot prompting provides a small number of examples to guide the model's behavior, but it does not inherently focus on step-by-step reasoning.
- C. Correct.
Chain-of-thought prompting encourages the model to generate step-by-step reasoning, making it well-suited for tasks requiring detailed explanations or multi-step problem-solving.
- D. Incorrect.
Single-shot prompting involves providing a single example, which may help guide responses but does not inherently encourage detailed or step-by-step reasoning.