A Curriculum-Aligned Knowledge Graph for K–12 Learning

Explore a static, offline-friendly learning platform with thousands of curriculum-mapped concepts, prerequisite links, practice questions, and adaptive diagnostics.

When a student gets a question wrong, the useful next step is not always another question on the same topic. The real gap may sit several grades earlier: a learner struggling with completing the square, for example, may need to revisit the perfect-square formula first. A curriculum becomes much more actionable when it represents not only what students should learn, but also how concepts depend on one another.

That is the idea behind cn-math-taxonomy, an open-source knowledge graph and diagnostic tool for Chinese school curricula. It combines curriculum standards, textbook organization, concept-level prerequisites, and question banks in structured data—then uses those relationships to trace a learning gap back to its likely roots.

From a list of topics to a learning graph

A conventional syllabus is ordered by grade, unit, and lesson. That is useful for planning, but it does not describe the dependencies between concepts. This project models each topic as a node and each prerequisite as a directed edge:

{
  "topicId": "cnm_h027",
  "prerequisiteId": "cnm_...",
  "strength": "hard",
  "reason": "This concept is needed to ..."
}

The direction means that topicId depends on prerequisiteId. A hard edge represents a prerequisite considered necessary for learning the later topic; a soft edge marks knowledge that can help without being an absolute gate. Those labels are explicit, but the repository cautions that they are judgments—not teacher-validated facts.

The graph preserves direct prerequisite links and applies a form of transitive reduction. If one topic already depends on another through a sufficiently strong path, redundant links can be omitted. This keeps the local graph easier to read while still allowing a diagnostic to traverse the longer chain when needed.

For example, the graph can connect a high-school function concept to middle-school quadratic functions, and then continue backward toward earlier foundations. English and mathematics are separate graphs; physics also stays independent of the math graph, recording related math concepts through mathLinks rather than prerequisite edges.

A substantial, multi-subject dataset

The repository describes a broad collection that has grown well beyond its original mathematics focus. Its data includes mathematics from primary school through high school, English from grades 3 through high school, Chinese language from primary through junior high, and science subjects including physics, chemistry, biology, history, geography, and morality and law.

The README’s current subject tables report 870 mathematics concepts and 3,627 math questions; 791 English concepts and 3,164 questions; 269 physics concepts and 1,076 questions; and 682 Chinese-language concepts and 2,728 questions. Other subject collections include 222 primary science topics, 159 primary morality-and-law topics, 85 junior-high morality-and-law topics, 134 history topics, 59 geography topics, 66 biology topics, and 45 chemistry topics. These counts are useful indicators of scope, not a claim that every textbook lesson or curriculum statement has been exhaustively captured.

Coverage is tied to specific editions and curriculum references. For mathematics, the repository maps elementary and junior-high material to the revised 2022 compulsory-education standard and high-school material to the 2017 standard, using the revisions and source documents described in the project. It also records textbook edition choices—for instance, People’s Education Press mathematics textbooks, including the A-edition high-school series. Other subjects have their own textbook and standards notes.

That versioning detail matters. Textbooks are changing, and a topic’s grade, chapter, or name can shift between editions. The project records when a directory is officially checked, when a third-party index is used, and when a section remains provisional. In some cases, the text is a public paraphrase rather than a verified verbatim quotation from the official standard. Treating those distinctions as metadata makes the dataset more useful—and more honest—than presenting every mapping as equally authoritative.

How adaptive diagnosis works

The diagnosis tool starts with a target concept or a broader chapter or grade range. It asks questions, updates its estimate of mastery, and follows prerequisite links when answers suggest a foundational gap. The documented default is three consecutive correct answers to mark a topic mastered and skip its ancestors; users can choose a threshold of two, three, or five. Each topic is limited to at most two questions in a diagnostic session. If a learner misses a question, a follow-up at the same or an easier level helps distinguish a persistent weakness from a single mistake. A confirmed weakness triggers prerequisite tracing, with hard prerequisites considered before soft ones.

The result is more than a score. It separates likely weak points from uncertain topics, presents a learning path ordered from earlier foundations toward the target, and can show the curriculum references and a graph of the path. Progress is saved locally in the browser; the project says diagnostic records stay on the device rather than being uploaded. Results can be exported as JSON, printed, or rendered as a shareable image.

This design is useful because it turns a wrong answer into a hypothesis about why the answer was wrong. It does not prove the cause. A short adaptive session can narrow down where to investigate, but it cannot replace a teacher’s judgment or a full assessment.

Static data, browser tools, and reproducible checks

The repository is designed to run as a static site. Its main data files are straightforward JSON arrays:

  • data/topics.json stores concepts, descriptions, mastery criteria, diagnostic questions, curriculum mappings, and textbook placement.
  • data/dependencies.json stores prerequisite edges and their strength and rationale.
  • data/cn-curriculum-standards.json contains the standards records.
  • data/questions.json contains the question bank.

The browser experience includes a homepage, a knowledge-graph explorer, and the diagnosis tool. The explorer uses Cytoscape 3.30.4 with dagre 0.8.5 and cytoscape-dagre 2.5.0 for local graph layouts. The project ships its browser dependencies in the repository rather than loading scripts, styles, or fonts from an external CDN. A progressive web app setup supports installation and offline caching.

To try the site locally, start a static server from the repository root:

python3 -m http.server 8000

Then open http://localhost:8000/ or go directly to http://localhost:8000/diagnose/. The diagnosis engine is plain JavaScript and has a Node test command:

node tests/test_engine.js

The Python validator checks JSON structure, unique identifiers, valid fields, existing edge endpoints, duplicate edges, cycles, and whether each non-external topic has a prerequisite or a documented root reason. Run it with:

python3 scripts/validate.py

Question verification is also available:

python3 scripts/verify_questions.py

The project reports that the current verification run has 2,823 automatically verified questions, zero mismatches, and 532 unverifiable questions—mostly junior-high questions without machine-checkable verification expressions. A successful automated check only confirms what the validator can express; it does not establish pedagogical quality or prove that an answer key is correct in every context.

The important limitation: a graph is a proposal, not a curriculum authority

The README is unusually direct about what still needs review. Prerequisite relationships, hard-versus-soft labels, topic granularity, and diagnostic questions have not been validated with classroom data. Many questions were generated with AI. Primary and junior-high mathematics received additional automated or independent checks, but high-school and English questions did not receive blind solving; in those cases, the verification expression and answer may come from the same underlying construction. Some textbook directories and standards mappings remain provisional or based on public paraphrases.

The project is therefore best approached as a structured, inspectable starting point: useful for exploring dependencies, building learning tools, and identifying questions for educators to review—not as an official replacement for a syllabus or a validated placement test. Contributors can report questionable wording, answers, or edges through GitHub issues. The repository is licensed under CC BY-NC 4.0: personal learning, teaching, and research use is allowed with attribution, while commercial use requires separate permission.

The larger lesson is that curriculum data becomes more powerful when it is explicit about both relationships and uncertainty. A prerequisite graph can help software move beyond “wrong answer, try again” toward “which foundation might be missing?” But the quality of that help depends on careful provenance, transparent limits, and ongoing review by the teachers who know how students actually learn.

Source

xiaoyang111222/cn-math-taxonomy: 数学(小学到高中)、英语(三年级到高中)、初中物理的知识图谱:1644 个知识点、2403 条先修边、6723 道题,对齐课标,附自适应前置诊断。