Dataset Viewer
The dataset viewer is not available for this dataset.
Unexpected token '<', "<html> <h"... is not valid JSON

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

YAML Metadata Warning:The task_categories "text2text-generation" is not in the official list: text-classification, token-classification, table-question-answering, question-answering, zero-shot-classification, translation, summarization, feature-extraction, text-generation, fill-mask, sentence-similarity, text-to-speech, text-to-audio, automatic-speech-recognition, audio-to-audio, audio-classification, audio-text-to-text, voice-activity-detection, depth-estimation, image-classification, object-detection, image-segmentation, text-to-image, image-to-text, image-to-image, image-to-video, unconditional-image-generation, video-classification, reinforcement-learning, robotics, tabular-classification, tabular-regression, tabular-to-text, table-to-text, multiple-choice, text-ranking, text-retrieval, time-series-forecasting, text-to-video, image-text-to-text, image-text-to-image, image-text-to-video, visual-question-answering, document-question-answering, zero-shot-image-classification, graph-ml, mask-generation, zero-shot-object-detection, text-to-3d, image-to-3d, image-feature-extraction, video-text-to-text, keypoint-detection, visual-document-retrieval, any-to-any, video-to-video, other

Primary School Maths-500k Dataset

This repository contains a synthetic dataset of arithmetic expressions designed for fifth-grade level practice. The dataset is formatted in JSON and includes both the step-by-step intermediate results and the final rounded answer.


Dataset Overview

  • Purpose: Provide a collection of basic arithmetic problems (addition, subtraction, multiplication, and division) that any fifth grader could solve.
  • Data Type: JSON file containing a list of problem instances.
  • Split: 90% training, 10% testing.

Data Format

Each entry in the JSON list has the following structure:

{
  "question": "<expression>",
  "steps": [
    "<intermediate step 1>",
    "<intermediate step 2>",
    ...
  ],
  "answer": <float or null>
}
  • question: A string containing the arithmetic expression, using Python syntax. Only the operators +, -, *, and / are used. Nested operations follow standard precedence rules, and chained division x/y/z is parsed as (x/y)/z.
  • steps: A list of strings capturing each major intermediate calculation (up to five decimal places). If a division by zero occurs at any step, the final step records an error message (e.g., "Division by Zero is not possible").
  • answer: The final result rounded to two decimal places, or null if the expression could not be evaluated (e.g., due to division by zero).

Numerical Precision

  • Intermediate results are computed and recorded with five decimal digits of precision.
  • Final answers are rounded to two decimal digits.
  • All absolute answers satisfy 0.005 < |answer| < 100000.

Value Range

  • All numeric values in the questions range from 1 to 100.
  • The final answer for each valid expression lies outside the interval [-0.005, 0.005] and within (-100000, 100000).

Train/Test Split

  • The dataset is split into 90% training and 10% testing subsets.

  • Filenames:

    • train.json — 90% of the data.
    • test.json — 10% of the data.

Examples

Valid expression:

{
  "question": "87*38",
  "steps": ["3306"],
  "answer": 3306
}

Expression with step-by-step precision:

{
  "question": "(61/48/90)/((17-38)+((83.34-14.71*41.33)-(10.36*1.72*36.11)-(56*53*98))+(23.72*49.97/77.8))+(43.88*30.28)",
  "steps": [
    "0.01412/(-21+(-524.6243-643.45131-290864)+15.23507)+1328.6864",
    "0.01412/(-21+-292032.07561+15.23507)+1328.6864",
    "0.01412/-292037.84054+1328.6864",
    "1328.6864"
  ],
  "answer": 1328.69
}

Division by zero:

{
  "question": "(36-27)/(98-98)",
  "steps": ["9/0" , "Division by Zero is not possible"],
  "answer": null
}

Licensing and Attribution

This dataset is released under the MIT license.


Downloads last month
17