The dataset viewer is not available for this split.
Error code: FeaturesError
Exception: ArrowInvalid
Message: JSON parse error: Invalid value. in row 0
Traceback: Traceback (most recent call last):
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 354, in _generate_tables
df = pandas_read_json(f)
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 38, in pandas_read_json
return pd.read_json(path_or_buf, **kwargs)
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/pandas/io/json/_json.py", line 815, in read_json
return json_reader.read()
~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/pandas/io/json/_json.py", line 1014, in read
obj = self._get_object_parser(self.data)
File "/usr/local/lib/python3.14/site-packages/pandas/io/json/_json.py", line 1040, in _get_object_parser
obj = FrameParser(json, **kwargs).parse()
File "/usr/local/lib/python3.14/site-packages/pandas/io/json/_json.py", line 1176, in parse
self._parse()
~~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/pandas/io/json/_json.py", line 1392, in _parse
ujson_loads(json, precise_float=self.precise_float), dtype=None
~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: Expected object or value
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/src/services/worker/src/worker/job_runners/split/first_rows.py", line 244, in compute_first_rows_from_streaming_response
iterable_dataset = iterable_dataset._resolve_features()
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 4675, in _resolve_features
features = _infer_features_from_batch(self.with_format(None)._head())
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2885, in _head
return next(iter(self.iter(batch_size=n)))
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 3095, in iter
for key, pa_table in ex_iterable.iter_arrow():
~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2600, in _iter_arrow
yield from self.ex_iterable._iter_arrow()
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 577, in _iter_arrow
for key, pa_table in iterator:
^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 459, in _iter_arrow
for key, pa_table in self.generate_tables_fn(**gen_kwags):
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 357, in _generate_tables
raise e
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 295, in _generate_tables
pa_table = paj.read_json(
io.BytesIO(batch), read_options=paj.ReadOptions(block_size=block_size)
)
File "pyarrow/_json.pyx", line 364, in pyarrow._json.read_json
File "pyarrow/error.pxi", line 155, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 92, in pyarrow.lib.check_status
raise convert_status(status)
pyarrow.lib.ArrowInvalid: JSON parse error: Invalid value. in row 0Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
Order of Operations Chain-of-Thought
Dataset Description
This dataset contains synthetically generated order-of-operations (PEMDAS/BODMAS) problems, each paired with a step-by-step chain-of-thought (CoT) explanation and a final answer. Problems combine parentheses, exponents, multiplication, division, addition, and subtraction so that the correct evaluation order matters.
Problems and their ground-truth answers are checked for correctness by Qwen 3.8, in a separate inference pass, before generating reasoning output. A local language model (Qwen3.8:27b-mlx, served via Ollama) is then given each problem and its correct answer, and asked only to produce the minimal numbered steps that justify that answer. The resulting reasoning is cleaned, normalized, and wrapped in <think></think> tags.
This makes the dataset well-suited for fine-tuning or evaluating models on step-by-step order-of-operations reasoning.
- Language: English
- License: MIT
- Reasoning model used for generation: Qwen3.8:27b-mlx (via Ollama)
Dataset Structure
Data Instances
Each line of the dataset is a JSON object with a single text field containing the full instruction/response pair:
{"text": "Instruction:\n5 + 3^2 \u00d7 2 =\n\nResponse:\n<think>Step 1: Evaluate the exponent first: 3^2 = 9, Step 2: Perform the multiplication next: 9 x 2 = 18, Step 3: Perform the addition last: 5 + 18 = 23.</think>23"}
{"text": "Instruction:\n12 - 2 \u00d7 4 + 1 =\n\nResponse:\n<think>Step 1: Perform multiplication first: 2 x 4 = 8; Step 2: Rewrite the expression as 12 - 8 + 1; Step 3: Subtract left to right: 12 - 8 = 4; Step 4: Add: 4 + 1 = 5.</think>5"}
Data Fields
| Field | Type | Description |
|---|---|---|
text |
string | Combined instruction (an order-of-operations expression) and response (<think> reasoning followed by the final answer) |
Data Splits
The dataset is provided as two JSONL files and the source CSV (order-of-operations_cot_raw.jsonl, order-of-operations_cot.jsonl, order-of-operations.csv) with no predefined train/validation/test split. Users are free to create their own splits.
Dataset Creation
Curation Rationale
The dataset was created to provide clean, verifiable chain-of-thought supervision for order-of-operations reasoning, useful for fine-tuning small models to "show their work" and apply operator precedence correctly.
Source Data
Expressions are procedurally generated, not sourced from any external corpus. Numbers, operators, exponents, and parenthetical groupings are sampled randomly within simple elementary/middle-school ranges. Generation logic guarantees exact, whole-number or clean-decimal answers wherever possible (e.g., divisions are constructed to divide evenly).
Annotations
The <think> reasoning steps are generated by prompting Qwen3.8:27b-mlx (run locally via Ollama) with each expression and its already-known correct answer, asking only for the minimal ordered steps that justify that answer. Raw model output is post-processed to:
- Strip markdown/formatting artifacts
- Parse and renumber sequential step markers
- Reject or truncate malformed/incomplete reasoning chains
- Enforce a maximum character length per explanation
Rows where no valid step sequence could be parsed are excluded from the final dataset.
Considerations for Using the Data
- Reasoning text is model-generated and, while grounded in a verified correct answer, may occasionally phrase a step imprecisely or skip minor arithmetic detail.
- Step delimiters vary slightly between examples (e.g., commas vs. semicolons between steps).
- The dataset targets order-of-operations problems and is not intended for advanced or multi-topic mathematical reasoning.
Licensing Information
This dataset is released under the MIT License.
Citation
If you use this dataset, please cite it as:
@misc{order_of_operations_chain_of_thought,
title = {Order of Operations Chain-of-Thought},
author = {AlexFromApex},
year = {2026},
note = {Synthetically generated; reasoning produced with Qwen3.8:27b-mlx via Ollama}
}
- Downloads last month
- 42