Learn Before
Example

Example of a GSM8K Few-Shot Prompt

A few-shot prompt for the GSM8K dataset typically includes demonstrations of problem-solution pairs to guide the Large Language Model. For instance, a DEMO section might present solved word problems (like calculating the total hours Jerry spends watching his daughters play softball or how many apples Mary ate), showing detailed step-by-step reasoning formatted with calculation annotations (e.g., 82=16\ll 8*2=16 \gg) and a final answer token (e.g., #### 96{}96). This is followed by a USER section that presents a new, unsolved problem (like calculating the difference in apples between Boris and Beck) for the model to solve using the demonstrated logic and formatting.

0

1

Updated 2026-04-30

Contributors are:

Who are from:

Tags

Foundations of Large Language Models

Ch.3 Prompting - Foundations of Large Language Models

Foundations of Large Language Models Course

Computing Sciences