Skip to content

feat: implement spaced repetition (SM-2) for post-course retention reviews #1047

@sadhami0519

Description

@sadhami0519

Summary

After a student completes a course on ViBe, the platform should automatically schedule periodic practice question sessions based on the spaced repetition technique, a scientifically validated method for combating the forgetting curve and promoting long-term retention of course material.

Motivation

ViBe's core philosophy is deep, lasting mastery. Currently, the platform assesses comprehension during a course. However, research consistently shows that memory decays sharply after learning ends — especially without reinforcement.

Curve of forgetting

Spaced repetition addresses this by surfacing review material at optimal intervals (e.g. after 1 day, 3 days, 1 week, 2 weeks, 1 month), making each review session short but highly effective.

This is directly aligned with ViBe's inspiration from the Vikram-Betaal model: just as Betaal resurfaces with a new challenge each time, ViBe can resurface course concepts to ensure they are truly retained, not just passed.

Proposed behaviour

  1. Upon course completion, a spaced repetition schedule is created for the student.
  2. At each scheduled interval, the student receives a notification (email / in-app) prompting a short review session.
  3. Review sessions consist of a small set of AI-generated questions drawn from the completed course material.
  4. Student performance on each review adjusts future intervals via the SM-2 algorithm — correct answers push the next review further out; incorrect answers trigger a sooner follow-up.
  5. A student dashboard shows their upcoming review schedule and retention health per course.

Implementation — SM-2 algorithm

This feature will use the SM-2 algorithm (SuperMemo 2), the foundational spaced repetition algorithm that powers tools like Anki. Each question (or concept item) is tracked per student with three state variables:

  • n — the number of times this item has been successfully reviewed in a row (repetition count).
  • EF — the easiness factor, a float starting at 2.5, representing how easy the item is for this student. Minimum value: 1.3.
  • I — the inter-repetition interval in days (how long until the next review).

After each review, the student rates their recall quality q on a scale of 0–5:

  • 5 — perfect response
  • 4 — correct with minor hesitation
  • 3 — correct with significant difficulty
  • 2 — incorrect, but the correct answer felt familiar on seeing it
  • 1 — incorrect, and the correct answer felt barely recognisable
  • 0 — complete blackout

The algorithm updates state as follows:

if q >= 3 (answer was correct):
  if n == 0:   I = 1
  elif n == 1: I = 6
  else:        I = round(I_prev * EF)
  n = n + 1
  EF = EF + (0.1 - (5 - q) * (0.08 + (5 - q) * 0.02))
  EF = max(EF, 1.3)

if q < 3 (answer was incorrect):
  n = 0
  I = 1   # reset to 1 day

next_review_date = today + I days

In practice, for ViBe's UI we can simplify the 0–5 rating to a binary or three-point response (e.g. "Got it / Unsure / Missed it") mapped to q values of 5 / 3 / 1 respectively, keeping the review experience frictionless for students.

Each course item to be reviewed should be stored with its SM-2 state. A suggested schema:

ReviewItem {
  student_id:       string
  course_id:        string
  question_id:      string
  n:                int       // repetition count
  EF:               float     // easiness factor (default 2.5)
  interval_days:    int       // current interval
  next_review_at:   datetime  // scheduled next review date
  last_reviewed_at: datetime
}

A background scheduler (e.g. a cron job or task queue) queries for all ReviewItem records where next_review_at <= now and triggers the corresponding student notification.

Acceptance criteria

  • A review schedule is auto-generated on course completion, seeded with questions from the course's existing AI question bank.
  • SM-2 state is persisted per student per question and updated after every review response.
  • Intervals are recalculated correctly after each review according to the SM-2 formula above.
  • Students receive a notification (email / in-app) when a review session is due.
  • Students can view upcoming reviews and their retention status from their dashboard.
  • Notification triggers are configurable — students can opt out.

Out of scope (for this iteration)

  • Cross-course spaced repetition (merging concepts across multiple completed courses).
  • Custom review scheduling by instructors.
  • Adaptive difficulty beyond the SM-2 easiness factor.

References

Comments

I would be grateful to work on this feature to promote long-term enhanced learning experiences on the ViBe platform!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions