v0.3.0 · Knowledge Tracing · Constraint-Aware · Open Source

Recommendations that
respect how learning works.

PLRS combines SAKTWithDecay knowledge tracing with a DAG prerequisite constraint layer and a pluggable LLM explainability layer — producing personalized recommendations that are both accurate and pedagogically sound.

Try live demo View on GitHub Quickstart
0.8613
Val AUC — SAKTWithDecay
+0.042
AUC gain over vanilla SAKT
0.0%
Prerequisite violation rate
23k
OULAD students trained on
116
Tests passing
Evaluation

Real training. Real numbers.

Trained on the full OULAD dataset — 23,295 students, 173,739 assessment interactions, 20 skill buckets — on a Kaggle T4 GPU. The forgetting curve decay contributes +0.042 AUC over vanilla SAKT, a gap consistent across val and test sets.

OULAD Benchmark · v0.2.0 ~17 epochs · 25s on T4 GPU
ModelVal AUCTest AUCTest Acc
SAKTWithDecay (Ebbinghaus decay) 0.8613 0.8152 0.7629
SAKTModel (vanilla) 0.8194 0.7823 0.7318
FYP baseline (synthetic data) 0.7692
Recommendation Quality Structural guarantee — not a tuning choice
SystemPrerequisite Violation RateNotes
PLRS (SAKT + DAG) 0.0% DAG constraint layer — structural
Collaborative Filtering 81.3% No prerequisite awareness
Matrix Factorization 83.7% No prerequisite awareness
Architecture

Four layers. One guarantee.

The forgetting curve decay (Ebbinghaus/ACT-R) modifies attention weights in the transformer so recent interactions contribute more than older ones. The constraint layer makes prerequisite violations structurally impossible. The LLM layer is fully pluggable — use any model, local or hosted.

Student History
SAKTWithDecay
Mastery Vector
DAG Constraints
Ranker + SM-2
LLM Explain
Approved
All prerequisites met above mastery threshold. Student is ready to learn this topic now.
⚠️
Challenging
Prerequisites partially met — above soft threshold. Proceed with awareness.
Vetoed
Prerequisites not met. Structurally blocked until foundations are solid.
LLM Layer — v0.3.0

Pluggable. Provider-agnostic.

PLRS is an open-source framework — developers choose their own LLM. No vendor lock-in. Use a hosted API or run a local model with zero cost and full privacy.

ollama Free · No key
Local open-source models. Llama 3.2, Mistral, Phi-3, Gemma 2. Fully private, runs on your hardware.
pip install plrs[ollama]
huggingface Free tier
HuggingFace Inference API. Mistral-7B, Llama-3.2-3B, Phi-3-mini. Free tier available.
pip install plrs[huggingface]
openai Paid
OpenAI GPT-4o, GPT-4o-mini. Also compatible with Groq, Together AI, and Fireworks via base_url.
pip install plrs[openai]
claude Paid
Anthropic Claude. Best quality for curriculum authoring and explanation generation.
pip install plrs[claude]
PYTHON — BRING YOUR OWN PROVIDER
from plrs.llm import LLMProvider

class MyProvider(LLMProvider):
    def complete(self, prompt, system=None, max_tokens=1024, temperature=0.0):
        return my_model.generate(prompt)

# Works with curriculum builder + explainer + API
pipeline = PLRSPipeline(curriculum, llm=MyProvider())
Quickstart

Three lines to recommendations.

PYTHON
from plrs import PLRSPipeline
from plrs.curriculum import load_dag

pipeline = PLRSPipeline(load_dag("math_dag.json"), model_path="sakt_decay_best.pt")
results  = pipeline.recommend_from_mastery({"whole_numbers": 0.90, "fractions": 0.75})

for rec in results["approved"]:
    print(f"✅ {rec['topic_label']} — {rec['reasoning']}")
BUILD A CURRICULUM WITH FREE LOCAL LLM
from plrs.curriculum.llm_builder import CurriculumBuilder
from plrs.llm import OllamaProvider   # free, local, no API key

result = CurriculumBuilder(OllamaProvider()).from_topics(
    topics=["Mechanics", "Kinematics", "Dynamics", "Energy"],
    domain="A-Level Physics",
)
result.save("physics_dag.json")
REST API
$ python scripts/serve.py   # → http://127.0.0.1:8000/docs

$ curl -X POST http://localhost:8000/recommend \
    -H "X-API-Key: plrs_your_key" \
    -d '{"domain":"math","mastery_scores":{"whole_numbers":0.9}}'

$ curl -X POST http://localhost:8000/explain \
    -H "X-API-Key: plrs_your_key" \
    -d '{"topic_label":"Fractions","mastery":0.3,"status":"approved",...}'
Roadmap

Where this is going.

v0.1.0 ✓
Open Core
SAKT + DAG constraints + FastAPI + API keys + rate limiting + 109 tests.
v0.2.0 ✓
Real Training
SAKTWithDecay trained on full OULAD. Val AUC 0.8613. +0.042 over vanilla SAKT. 23,295 students.
v0.3.0 ✓
LLM Layer
Pluggable providers (Claude, OpenAI, Ollama, HuggingFace). Curriculum builder from topics/text. Natural language explanations. 116 tests.
v0.4.0
Hosted Platform
PostgreSQL + Redis. Multi-tenant. React frontend. Docker Compose. Stripe billing.
v1.0.0
Production
A/B testing with real schools. EdBERTa cross-curriculum transfer. Mobile SDK. AKT/DTransformer upgrade.
Try it — no setup required.

The live demo runs the full SAKTWithDecay pipeline. Adjust mastery sliders, simulate students, explore the curriculum graph.