Each lecture's quiz questions are generated once from curated lecture data and cached — grown gradually up to a per-lecture cap instead of regenerated on every attempt.
The server looks up that lecture's cached pool in the quiz_banks table before doing anything else.
↓
✓ Pool is ready
Already has ≥5 questions and isn't stale or under-filled — served instantly, zero LLM calls.
⚡ Needs generation
First-ever request (cold start), fewer than 5 questions, or stale (>8h) and still under cap — triggers the AI.
↓ ↓
2
AI generates from curated lecture data (only when needed)
The prompt uses this lecture's hand-curated keyConcepts, achievement, prompts and commands — not raw video transcript — so questions stay on-topic and cheap to generate. New questions are appended to the pool and saved.
↓
3
Sample questions, preferring ones this student hasn't seen
5 for a lecture quiz. For the 20-question course quiz, 1 question is drawn from each of ~20 stratified lectures spread across all 3 weeks (reusing/warming their individual banks) — intro/wrap-up lectures are skipped for course-quiz sampling only.
↓
4
Quiz is served with a source toast
The student sees whether their questions came from the cached bank, fresh AI generation, or a mix — full transparency, no black box.
Growth is capped: 20 questions max for lectures 1–4, 40 for every other lecture (editable per lecture in the table above).
Growth is gradual: at most +5 questions get added automatically per lecture every 8h, so a handful of students taking quizzes never triggers a burst of AI calls.
Admins can force it: "Generate Additional Questions" (➕) bypasses the cooldown gate and lets you pick exactly how many (1–5) to add right now, up to the cap.
Nothing is ever silently overwritten: growth and manual generation only append — existing questions are never deleted or replaced by this flow.
Quiz Bank Questions
+
Generate Additional Questions
Lecture: ...
Current Pool Status0 / 25 questions
Room remaining under cap: 5 question(s).
⚙️
Bulk Update Caps
Applies to lectures matching the current Week / search filters above:
0 lecture(s)
🧩
Bulk Generate Questions
Applies to lectures matching the current Week / search filters above: