metadata
license: mit
language:
- en
tags:
- math
- khan-academy
- latex
- education
- chatml
pretty_name: Khan Math – All Topics
size_categories:
- 1M<n<10M
Khan Math – All Topics
Complete collection of 4.7M math problems from Khan Academy in ChatML format. Covers algebra, calculus, geometry, linear algebra, number theory, counting and statistics.
Quick Start
from datasets import load_dataset
dataset = load_dataset("NecroMOnk/khan-math-all")
print(dataset["train"][0])
Example record:
{
"messages": [
{"role": "system", "content": "You are a mathematics tutor. Answer the following math problem."},
{"role": "user", "content": "Find the arclength of the function $f(x) = \\log(2x)$ on the interval $x=4$ to $x=5$"},
{"role": "assistant", "content": "$-\\sqrt{17}+\\sqrt{26}+\\tanh^{-1}\\left(\\sqrt{17}\\right)-\\tanh^{-1}\\left(\\sqrt{26}\\right)$"}
],
"topic": "calculus",
"subtopic": "arclength"
}
Dataset Stats
- 4.72M problems
- ChatML format
- Source: Khan Academy all topics materials
- Language: English
- Math notation: LaTeX
Fields
| Field | Type | Description |
|---|---|---|
messages |
list | ChatML turns: system, user, assistant |
topic |
string | Top-level math topic (e.g. calculus) |
subtopic |
string | Specific subtopic (e.g. arclength) |
Source
Problems sourced from Khan Academy via the AMPS dataset. Problems and answers are in LaTeX format.
Versions
- v1 – raw extraction, minor artifacts possible (e.g. degenerate intervals,
+-notation) - v2 – cleaned formulas, extraction artifacts removed (coming soon)