cn-math-taxonomy Treats a Wrong Answer as a Symptom

An open prerequisite graph for Chinese K-12 math that walks backward from a student's mistake to the concept they never learned.

11 min read • View on GitHub • More from xiaoyang111222

A student seen from behind at a small desk, a single exam paper in front of them with one answer circled. Behind the student, the flat wall of the room dissolves into a vast dense lattice of small connected nodes joined by thin lines, like a root system or an aerial city map, with one continuous path drawn heavier than the rest descending from the top of the frame to a single node low in the lattice.
The circled answer is the symptom at the surface. The lattice behind it is the prerequisite graph underneath, and the heavier path is the diagnosis the engine performs.
Key Takeaways

The Wrong Answer Is the Symptom

A student misses a quadratic equations problem. The pencil circles the question. A tutor explains the factoring, the student nods, and everyone moves on. That is how nearly every learning tool handles a mistake: find the error, patch the error.

cn-math-taxonomy starts from a different premise. The visible error is the last thing that went wrong, not the first. The quadratic problem may be fine. The break may be in factoring. And factoring may be fine too, with the real gap sitting one level deeper in the multiplication formulas that factoring depends on. The failed question is a symptom. The disease lives somewhere up the prerequisite chain.

The project states the thesis itself, in the README's own words: 先找到真正没学会的那一步. Find the step you truly have not learned.

That single inversion is the whole point of the repository. It is not a question bank with a search box bolted on. It is a prerequisite graph for the Chinese K-12 curriculum, paired with an adaptive engine that treats backward diagnosis as the primary job rather than a feature.

Diagnosing Backward

The engine runs on a directed acyclic graph. Every knowledge point is a node, and every prerequisite relationship is an edge pointing from the earlier concept to the later one. The graph is built once, then queried.

Edges carry strength. A hard edge means the earlier concept is truly required. A soft edge means it helps but is not strictly necessary. The distinction matters, because when the engine backtracks it prefers hard edges first.

When a target node fails, the engine does not stop there. It walks up the prerequisite edges, testing as it goes, until it lands on a node that is genuinely weak. Then it stops and reports the root cause.

The backward diagnosis, step by step. A failed target node at the top sends the engine down the prerequisite chain until it finds the concept that actually broke, then it returns a study path ordered from lower grade to higher.

The output is a study path, ordered from lower grade to higher by a topological sort. The student gets a short list of concepts to shore up, not a wall of red marks. The engine reports a status for every node it touched: mastered, shaky, weak, or untested.

Two Questions, Four States

Each knowledge point gets at most two questions. The protocol is small enough to hold in your head.

The shaky rule is the most opinionated choice in the repo. A borderline result does not trigger a full prerequisite audit. The engine trades a little recall for far fewer false alarms, which is the right call when the goal is to send a student to a short, credible list rather than an exhaustive one. A single lucky answer can hide a real gap, and the design accepts that.

Who Built It

The trail is thin. The repository belongs to the GitHub account @xiaoyang111222, display name Aifeng, with a homepage at math.pansgo.com. No verified real-world identity, no interviews, no conference talks.

Someone built a curriculum graph with hundreds of knowledge points and thousands of questions, wrote an adaptive diagnostic engine around it, shipped a static site, and signed it with a handle. That is the entire available story, and it is worth stating plainly rather than padding into a profile.

又到了每日🔥放福利的时候👇 💻 GitHub · 新仓 top5 1. cn-math-taxonomy 🛠 做什么:对着人教版课标做的中小学数学知识图谱,999 个知识点、4143 道题,带前置诊断 👤 给谁:做 K12 辅导和刷题产品的人 🎯 解决啥:自己扒课标、理知识点的前后关系 💰 怎么赚钱:未公开 🔥 热度:建仓三天 1570 星、341

潜水员Balance, @balance0014 · @balance0014 on X

A Graph That Fits in a Browser

The engineering is disciplined in a quiet way. The frontend is vanilla JavaScript with no framework and no bundler. Each page is a plain script tag. The engine itself is a set of pure functions with a small, explicit surface.

buildGraph(topics, deps, questions?) -> graph
createSession(graph, targets, {limit, seed, avoid}) -> session
nextItem(graph, session) -> {topicId, question, attempt}
applyAnswer(graph, session, id, 'correct'|'wrong'|'skip') -> new session
summarize(graph, session) -> root cause, learning path, status buckets

applyAnswer returns a new session instead of mutating its input, which means a session is plain JSON that can be persisted to localStorage and restored after a reload. The same file runs in the browser and in Node through a UMD wrapper, with no build step. A session can be seeded, so a diagnosis is reproducible.

Small details show care. The graph uses null-prototype maps so that arbitrary string IDs cannot collide with prototype keys. Edges are deduplicated. The topological sort breaks ties by file order, which makes the question order deterministic. Cycle detection throws an error in Chinese rather than silently looping.

The whole thing is a static site. It runs on GitHub Pages and at math.pansgo.com, with a manifest for offline use and a canvas share poster that renders a 1080 by 1920 result card with local QR generation. There is effectively no test suite, which is the one gap in an otherwise careful build.

The Data Is a Draft

Here is the catch, and it is a real one. The graph, the prerequisite edges, and the questions are AI-generated. A technical write-up of the project is explicit that the data has not been reviewed by teachers. The clever engine is reasoning over a substrate that no human has certified.

The counts do not reconcile either. Different sources report different totals for the same project.

SourceKnowledge pointsQuestions
README (math)8283,459
Repository description1,6446,723
Sina News1,2445,123
0539edu write-up8023,355
@inoriaaaa on X1,6446,723

The README's own math figures (828 knowledge points, 3,459 questions) are the most defensible anchor for a specific release, since the math row matches the README's own arithmetic. The rest should be treated as snapshots from different points in time and different scopes, not as a single settled inventory.

So the engine is careful and the substrate is a draft. The diagnosis is a lead for a teacher to check, not a validated assessment. The project does not pretend otherwise, and neither should anyone reading the output. The engine even hands ambiguous free-form answers to a human rather than guessing.

What It Is Not

It helps to place this against what already exists. cn-math-taxonomy is not a learning platform, not a research instrument, not an open textbook, and not a commercial adaptive engine.

A split composition at hand scale. On the left, a human hand circles a wrong answer on a page and closes a book over it. On the right, a different hand pulls a single taut thread out of the same wrong answer, the thread running down and off the page through a chain of small index cards receding into the distance.
Two ways to handle a mistake. The left hand closes the book on the error. The right hand follows it down the prerequisite chain, one concept at a time, until it reaches the break.
ProjectWhat it isRelationship to cn-math-taxonomy
cn-math-taxonomyChinese K-12 topic taxonomy, prerequisite graph, question bank, and adaptive root-cause diagnosisThe subject
Khan AcademyLarge structured learning platform with exercises and mastery practiceProduct-level comparator; does not publish an equivalent open Chinese K-12 prerequisite dataset
ASSISTmentsFormative-assessment and learning-analytics platformAdjacent on assessment; different on publishing an open curriculum graph
OpenStaxOpen textbooks and learning contentOpen-content alternative, not a graph-backed diagnostic engine
MATHia / Carnegie LearningCommercial adaptive math productProduct-level alternative; closed, different licensing and scope

Its niche is narrow and specific: an open, inspectable, Chinese-curriculum-specific link between topic data and diagnosis. A learner's error decides what prerequisite to test next, and the graph proposes foundational topics for review. General platforms offer adaptive practice and open textbook projects offer content. Neither is automatically a substitute for a reusable Chinese K-12 prerequisite dataset plus a separately usable diagnostic engine.