PLRS combines Self-Attentive Knowledge Tracing with a DAG prerequisite constraint layer to generate personalized learning recommendations that are pedagogically sound — not just statistically optimal.
Standard recommendation systems optimise for engagement or accuracy — they will happily recommend Calculus to a student who hasn't mastered Algebra. PLRS adds a constraint layer that makes this structurally impossible.
Evaluated on the Open University Learning Analytics Dataset (OULAD) with Nigerian secondary school curriculum knowledge maps. The 0% violation rate is a structural guarantee from the DAG constraint layer — not a hyperparameter.
| Model | Val AUC | Prerequisite Violation Rate | Coverage |
|---|---|---|---|
| PLRS (SAKT + DAG) | 0.7692 | 0.0% | Full curriculum |
| Collaborative Filtering | — | 81.3% | Partial |
| Matrix Factorization | — | 83.7% | Partial |
| BKT (baseline) | ~0.67 | No constraint layer | Partial |
PLRS is curriculum-agnostic. Define your knowledge graph in a simple JSON format and get recommendations immediately. No retraining required for new domains.
from plrs import PLRSPipeline from plrs.curriculum import load_dag # Load your curriculum (JSON knowledge graph) curriculum = load_dag("math_dag.json") # Create pipeline — no model needed for mastery-dict mode pipeline = PLRSPipeline(curriculum) # Get recommendations from student mastery scores results = pipeline.recommend_from_mastery({ "whole_numbers": 0.90, "algebraic_expressions": 0.75, "quadratic_equations": 0.40, }) for rec in results["approved"]: print(f"✅ {rec['topic_label']} (score={rec['score']})") print(f" {rec['reasoning']}") # What-if: what does mastering this topic unlock? wi = pipeline.what_if("algebraic_expressions") print(f"Unlocks {wi['total_unlocked']} downstream topics")
# Start the server $ python scripts/serve.py # → http://127.0.0.1:8000/docs # Get recommendations $ curl -X POST http://localhost:8000/recommend \ -H "Content-Type: application/json" \ -d '{"domain":"math","mastery_scores":{"whole_numbers":0.9}}'
/recommend, /what-if, and /curriculum endpoints. Auto-generated OpenAPI docs.pip install plrs — modular architecture with clean public API. Full type annotations throughout.The live demo runs the full pipeline in your browser. Adjust mastery sliders, simulate student sequences, explore the curriculum graph.