Model and store spaced repetition scheduling data for a language learning application

domain: education-general · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. For each learnable item, store: item_id, user_id, ease_factor (a float representing difficulty, starting around 2.5), interval_days (days until next review), repetition_count, and next_review_date
  2. After each review, apply the SM-2 algorithm: if the user's performance score (0-5) is below 3, reset interval to 1 day and repetition_count to 0; otherwise calculate new_interval = previous_interval * ease_factor, and update ease_factor = ease_factor + (0.1 - (5 - score) * (0.08 + (5 - score) * 0.02))
  3. Clamp ease_factor to a minimum of 1.3 to prevent intervals from collapsing to near-zero for consistently difficult items
  4. Set next_review_date = today + new_interval_days and persist the updated record
  5. At session start, query for all items where next_review_date <= today for the user, prioritizing items with the oldest next_review_date to handle overdue cards first

Known gotchas

Related routes

Implement Speakable structured data for TTS and AI-citation use cases
structured-data · 5 steps · unrated
Benchmark a language model across standard tasks with lm-evaluation-harness
github.com/EleutherAI/lm-evaluation-harness · 5 steps · unrated
Automate interview scheduling by reading availability and creating calendar events
recruiting-general · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans