Example of a Few-Shot Prompt for a Mathematical Reasoning Task
A few-shot prompt can be used to guide a Large Language Model through a mathematical reasoning task by providing several demonstrations that establish a pattern. For instance, to teach a model to sum two numbers and divide by their product, the following examples could be used:
DEMO
USER
This structure allows the model to infer the required operation for the new input pair.

0
1
Tags
Ch.3 Prompting - Foundations of Large Language Models
Foundations of Large Language Models
Foundations of Large Language Models Course
Computing Sciences
Related
Example of a Few-Shot Prompt for a Mathematical Reasoning Task
Analyzing a Language Model's Computational Error
A computational model is programmed to perform a specific two-step operation on a pair of numbers: first, it calculates their sum, and second, it divides that sum by their product. For which of the following input pairs would this operation be mathematically undefined?
A computational process is defined as follows: for any given pair of numbers, first calculate their sum, and then divide that sum by their product. This process will always yield the same final result regardless of which of the two numbers is considered first.
Learn After
A language model is given the following set of demonstrations to establish a pattern for a numerical task:
2, 4 -> 910, 6 -> 645, 5 -> 25
Based on the pattern demonstrated, what should the output be for the input
8, 12?Constructing a Few-Shot Prompt for a Novel Calculation
Debugging an AI's Mathematical Reasoning