GSM8K › Dataset Structure and Problem Characteristics

Michael BrenndoerferMarch 1, 20267 min read
Language AI HandbookAll chapters
Part 54 of 67Benchmark Evaluation
Chapter 417GSM8K › Dataset Structure and Problem Characteristics
Reading section 3 of 13 · Dataset Structure and Problem Characteristics · 7 minSection 3 of 13 · 7 min

Book contents

Section 3 of 13 · 7 min read

GSM8K › Dataset Structure and Problem CharacteristicsOne section · Sections in this chapter3 / 13 ↓
Reading tools Definitions & inline links

Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.

Article links

Make inline references clickable

GSM8K consists of 8,500 high-quality grade school math word problems, split into 7,500 training examples and 1,000 test examples. Each problem requires between two and eight steps to solve, involving basic arithmetic operations (addition, subtraction, multiplication, and division) with natural number solutions. The problems are linguistically diverse, presenting scenarios ranging from retail transactions and travel planning to work rates and age relationships.

The dataset designers deliberately constrained the mathematical complexity to elementary operations while maximizing the reasoning depth required to reach solutions. This design choice isolates reasoning capability from advanced mathematical knowledge. This keeps failures indicate limitations in logical processing rather than gaps in mathematical education. By focusing on natural numbers and basic operations, GSM8K tests whether models can combine simple tools in complex ways, much like observing whether a carpenter can build detailed furniture using only basic hand tools.

Problem Taxonomy

The dataset captures several categories of mathematical reasoning that reflect the cognitive demands of early mathematics education. These categories map to distinct mental models that humans develop when learning to translate real-world situations into mathematical formalism.

Multi-step arithmetic problems require sequential operations where the output of one calculation is input to the next. Consider: "John buys 3 packs of gum for $2 each and gives the cashier a $20 bill. How much change does he receive?" This requires calculating the total cost (3 \times \2 = $6)beforedeterminingthechange() before determining the change ($20 - $6 = $14$). The cognitive load here involves maintaining intermediate results across steps. This keeps the calculation of total expenditure completes before attempting to compute the difference from the initial amount. When models collapse these steps into a single inference step, they lose the verification opportunity that explicit intermediate computation gives.

Rate and proportion problems involve speeds, work rates, or ratios. Consider: "If 5 workers can build a wall in 10 days, how long would 10 workers take?" The solution requires recognizing the inverse relationship between workers and time, understanding that doubling the workforce halves the duration. This tests whether models grasp proportional reasoning or merely memorize formulas. The linguistic packaging of rate problems varies enormously, with speed problems, efficiency problems, and concentration problems all involving the same underlying proportional structure expressed in very different surface forms.

Part-whole relationship problems require decomposition of quantities into components or aggregation of parts into totals. These test whether models can track how subsets relate to larger groups without double-counting or omitting elements. Calculating total expenses across multiple categories, or determining remaining inventory after several allocations, requires maintaining a mental inventory of which quantities have been accounted for. These problems are particularly prone to one specific error: reusing a quantity that was already consumed or redistributed in an earlier step.

Temporal sequencing problems involve time calculations across different periods, requiring models to maintain chronological order and properly aggregate durations. These problems test the ability to handle operations where order matters, such as calculating end times given start times and durations, or determining meeting times given different travel schedules. The non-commutativity of time arithmetic, combined with unit conversions (minutes to hours, days to weeks), creates multiple opportunities for reasoning failure.

Out[3]:
Visualization
Bar chart showing GSM8K problem type percentages: Multi-step Arithmetic 40%, Rate and Proportion 25%, Part-whole 20%, Temporal Sequencing 15%.
Distribution of problem types in GSM8K. Multi-step arithmetic problems form the largest category at 40%, which shows the emphasis on sequential reasoning chains. Rate and proportion problems (25%) constitute the second-largest group, followed by part-whole relationship problems (20%) and temporal sequencing problems (15%).

Solution Format and Annotation Quality

Each GSM8K example includes both the problem text and a detailed natural language solution. The solutions are structured to show step-by-step reasoning, with the final answer explicitly indicated after a #### delimiter. This format proves important for both human readability and automated evaluation:

Problem: Janet's ducks lay 16 eggs per day. She eats three for breakfast every morning and bakes muffins for her friends every day with four. She sells the remainder at the farmers' market daily for $2 per fresh duck egg. How much in dollars does she make every day at the farmers' market? Solution: Janet sells 16 - 3 - 4 = 9 duck eggs a day. She makes 9 * $2 = $18 every day at the farmers' market. #### 18

The #### delimiter precedes the final numeric answer, letting automated extraction while the preceding text gives the reasoning chain. This structure serves dual purposes: it allows automated evaluation systems to parse answers unambiguously while giving rich supervision signals for training models to generate coherent reasoning traces. The explicit separation of reasoning from final answer also facilitates error analysis, letting researchers to determine whether models fail due to comprehension errors, arithmetic mistakes, or answer formatting issues.

The annotations were written by human contractors trained specifically for this task. The quality control process involved multiple review rounds to ensure that each solution was numerically correct and pedagogically clear, meaning each intermediate step was explicitly stated with its arithmetic shown. This consistency in annotation style proved important for training: models learning from well-structured, consistently formatted reasoning traces develop stronger capabilities for generating their own structured reasoning.

Chain-of-Thought Supervision

The detailed natural language solutions in GSM8K were specifically designed to facilitate chain-of-thought fine-tuning. Unlike datasets giving only final answers, GSM8K's step-by-step explanations let researchers to train models to generate intermediate reasoning steps, materially improving performance on multi-step problems. This design decision shows a broader shift in machine learning toward process supervision, where models learn the answer and the valid intermediate transformations that lead to it.

Problem Difficulty Distribution

The 2-to-8 step range in GSM8K creates a real difficulty spectrum within the bounds of elementary mathematics. Two-step problems resemble direct arithmetic exercises where the challenge is primarily parsing the linguistic description. Eight-step problems require maintaining and correctly updating several intermediate quantities while working through multiple layers of problem structure.

This distribution reveals something important about how reasoning errors compound. If a model solves each individual step with 90% accuracy, an independent error model predicts the probability of solving an nn-step problem correctly as 0.90n0.90^n. For a 2-step problem, this gives 81% accuracy. For an 8-step problem, it gives only 43% accuracy. The actual decay is even steeper in practice because errors in early steps corrupt the input to later steps, causing downstream failures that cascade through the reasoning chain. This compounding nature of reasoning errors makes the 8-step problems disproportionately challenging relative to their individual step complexity.