Nischal Dhoj Kunwar
Menu
All research and projects

web · engineering · ml

Traceback LMS

A CS-focused learning platform with skill-tagged quizzes. A knowledge-tracing model trained on ASSISTments data estimates per-skill mastery, a cited study assistant answers from the course's own lessons, and instructors see where a whole class is struggling.

Traceback LMS sign-in page: the tagline 'Find where it went wrong.' above a Welcome back login form

Key figures

Held-out AUC, knowledge tracing
0.724
Recall@5, study assistant (48 questions)
0.979
Backend end-to-end tests (real PostgreSQL)
52/52
Frontend UI tests
63/63
Backend unit tests
24/24
Knowledge-tracing pipeline tests
8/8
User roles
3

Write-up

A React and NestJS application with three roles (student, instructor, admin), JWT-protected API, bcrypt password hashing and rate limiting on login and registration. Test counts are from the repository's test report of 27 November 2026.

  • Instructors create, edit, publish and delete their own courses, built from text, YouTube video and PDF-link modules, and add one multiple-choice quiz per course. Ownership is enforced on every write.
  • Students browse published courses, enrol, open lessons, mark modules complete and track progress on a dashboard. Quizzes give an instant score, per-question feedback and an attempt history. The answer key never reaches the student.
  • Skill tracking. Every quiz question carries a skill tag and every answer is logged. Students see their predicted mastery per skill, weakest first, and instructors see where the class is weakest per course.
  • Admins get platform stats, a searchable user list with role changes, and course moderation.
  • Course Q&A: enrolled students ask, only that course's instructor answers.
  • Hardening: Helmet, validated parameters, atomic enrolment so a double click cannot enrol twice, and a required long JWT_SECRET in production. The API has Swagger docs and a health check that also tests the database.

Knowledge tracing. A logistic-regression model is trained on the public ASSISTments 2009-2010 data (283,105 answers, 4,163 students, 112 skills) with a split by student, so no student appears in both training and test data. Held-out AUC is 0.724 (95% CI 0.719 to 0.727), against 0.689 for the best heuristic baseline, "the student's own accuracy on this skill". One extra feature, how the rest of the class does on the skill, adds +0.009 AUC in 5-fold cross-validation, and the app uses it only where at least 10 other students have answered the skill. A skill-agnostic GRU was tried and gained only +0.006 AUC, below the 0.01 bar set before the run, so it was not shipped. A student with no history on a skill gets a smoothed-accuracy estimate, labelled as an estimate.

Calibration. The app shows a mastery percentage to a student, so it matters whether 70% predictions come true about 70% of the time. Calibration on the held-out students is close to the diagonal. The lowest-probability decile is slightly over-confident: 0.26 predicted against 0.23 observed.

A stronger model that does not fit. A classic skill-id deep knowledge tracing (DKT) model reaches 0.747 AUC, but it needs skill ids that the LMS does not have for new content. An exploratory follow-up suggests much of its lead comes from simply knowing which skill is being asked, not from modelling the student better. I kept the simpler model.

Study assistant ("Ask this course"). Retrieval-augmented generation over a course's text lessons: passages are embedded with Gemini, stored in PostgreSQL and searched by cosine similarity. Answers list the passages used and mark which were cited, and the model is told to say the topic is not covered rather than guess. On a small, hand-written benchmark of 48 questions over three courses, the evidence passage was in the top 5 for 47 of 48 questions (Recall@5 0.979, MRR 0.919).

Limits.

  • ASSISTments is school mathematics and the LMS teaches computer science. The model learns how answer history predicts the next answer, not subject content, and it has not been validated on LMS data. It uses one dataset only.
  • The retrieval benchmark is small, synthetic and nearly saturated. Whether answers are faithful to the retrieved passages, and how it does on real student questions, are not measured.
  • Video and PDF lessons are not searched by the assistant.
  • The demo seed students are simulated learners, so their numbers show that the screens work, not that the model is accurate.
  • Instructor sign-up is by request: an admin approves or rejects it. Test counts are from the repository's test suite.

Built with

  • React 18
  • TypeScript
  • Vite
  • NestJS 11
  • TypeORM
  • PostgreSQL
  • Python (scikit-learn)
  • Google Gemini (embeddings and answers)