Constructing a Few-Shot Prompt for Multi-Step Reasoning
A researcher wants to use a large language model to perform a specific three-step analysis on sentences: 1) identify the longest word, 2) count the number of letters in that word, and 3) determine if that count is a prime number. When given only the instructions, the model's performance is inconsistent. Your task is to construct a complete and effective prompt that uses demonstrations to guide the model. Your prompt should include at least one full example of the task being performed correctly before presenting a new sentence for the model to analyze.
0
1
Tags
Ch.3 Prompting - Foundations of Large Language Models
Foundations of Large Language Models
Foundations of Large Language Models Course
Computing Sciences
Application in Bloom's Taxonomy
Cognitive Psychology
Psychology
Social Science
Empirical Science
Science
Related
Example of a Mathematical Reasoning Task for LLMs
Constructing a Few-Shot Prompt for Multi-Step Reasoning
A developer is prompting a large language model to solve multi-step logic puzzles. They are comparing two few-shot prompting strategies. Strategy A provides examples showing only the puzzle and the final answer. Strategy B provides examples showing the puzzle, a step-by-step reasoning process, and then the final answer. Which strategy is more likely to yield consistently accurate results for new, complex puzzles, and why?
Limitation of Question-Answer Pair Demonstrations in Few-Shot Prompting
Diagnosing Prompting Failures in Multi-Step Tasks