Knowledge Space Theory.
In Python.
Derive knowledge structures from prerequisites. Estimate what a learner knows. Identify what to study next.
Structures
Build knowledge spaces from surmise relations or skill maps. Compute atoms, bases, fringes, and learning paths over arbitrary domains.
Assessment
Estimate a learner's knowledge state via Bayesian inference. Adaptive item selection minimizes the number of questions needed.
Estimation
Fit BLIM parameters with the EM algorithm. Multi-restart optimization, goodness-of-fit via G², AIC, and BIC.
Integration
Command-line interface, MCP server for LLM-based workflows, and CSV/JSON I/O compatible with R packages.
From prerequisites to assessment in five lines.
import knowledgespaces as ks
structure = ks.space_from_prerequisites(
["add", "sub", "mul"],
[("add", "sub"), ("sub", "mul")],
)
result = ks.assess(
structure,
{"add": True, "sub": True, "mul": False}
)
Structure
4 valid knowledge states identified from 8 possible subsets. Union-closed.
Assessment
Most likely knowledge state and the recommended next topic.
Talk to your data.
Your AI assistant becomes a KST expert. Build structures, run assessments, and explore learning paths through natural conversation.
7 tools · 13 resources · 4 prompts
Marco's estimated knowledge state is {add, mul}. His outer fringe contains sub, which depends only on add (already mastered). Recommended next topic: subtraction.