Example

Example of a One-Shot CoT Prompt with Arithmetic Problems

A one-shot Chain-of-Thought (CoT) prompt can be constructed by combining a solved demonstration with an unsolved target problem. For example, a prompt can first present the 'Tom's marbles' problem along with its complete, step-by-step logical reasoning (calculating initial marbles, additions from winning or gifts, and subtractions from losing) to reach the final answer of 17{}17. After this full demonstration, the prompt introduces a new word problem, such as 'Jack's apples'. Guided by the preceding example, a language model is encouraged to output a structured sequence of intermediate calculations (such as subtracting eaten apples and adding given apples) before stating the correct final answer of 7{}7.

0

1

Updated 2026-04-20

Contributors are:

Who are from:

Tags

Foundations of Large Language Models

Ch.2 Generative Models - Foundations of Large Language Models

Foundations of Large Language Models Course

Computing Sciences