Skip to content

Study Plan (Vision): AI-generated plans from your own material

Status: vision / big bet

Not built. This is the next direction for the personalised learning bet, distinct from the shipped Practice Hub (JEE/NEET, past-paper-ranked). A feasibility pass (2026-07-03) confirmed most of the infrastructure already exists; what is missing is glue, not foundations.

The idea in one line

Point the same ranking engine at a different content source: instead of a fixed past-paper corpus, build the plan from NCERT books or a learner's own uploaded material, and generate the practice questions from that content on demand.

That turns the Practice Hub from a JEE/NEET-only surface into a plan for any learner with a syllabus or a textbook, Class 6 science, a college subject, a self-uploaded set of notes, without waiting for a hand-curated past-paper corpus per exam.

Why this is a small build, not a rewrite

The Practice Hub engine already separates where units come from and how practice is filled behind two seams. The shipped JEE path fills them one way; this vision fills them another, with no engine change.

Seam Practice Hub (shipped) Study Plan (this vision)
UnitProvider (rankable chapters) pyq_chapter_weightage table distinct chapters already tagged in the RAG corpus for the learner's board/class/subject, or in their uploaded doc
practice-session filler select real past-paper questions generate questions from that chapter's retrieved content via the existing generation agent
MasteryProvider (gap) kwiloai-memory learner_mastery unchanged, the M2 write-path already records attempts on any chapter

What already exists (verified)

  • RAG ingestion is live and B2C-facing. My Space upload (.pdf/.docx) runs the full pipeline: extract (page-aware) → chunk → 768-dim embed → curriculum_embeddings (pgvector). Retrieval slices by chapter today (search(chapter=…, subject=…, class_level=…)). That is exactly the unit boundary a plan needs.
  • Doc-grounded question generation is live, two ways: the mock-test agent generates from RAG-retrieved curriculum, and the assignment-agent generates from a specific uploaded document's context. MockTestService._generate_questions_via_agent() is the reusable core (structured MCQ/fill/short/true-false with answers and explanations).
  • An NCERT crawler exists (apps/rag/src/crawlers/ncert.py, Classes 1-12, all subjects). It is not seeded for B2C in production, so NCERT is a batch job away, not a build from scratch.
  • The mastery write-path is stream-agnostic (M2, shipped): attempts on any chapter feed learner_mastery, so generated-question attempts personalise the plan the same way past-paper attempts do.

Note: this also corrected an earlier assumption. The curriculum content lives in the RAG vector store, chapter-tagged, not in the concepts taxonomy table the older roadmap (M3) assumed. The structure needed to rank already exists in the RAG layer.

Two content sources, one machine

  • Seeded NCERT library — the default for K-12 and board learners. Run the crawler, ingest per class/subject, chapters become rankable units.
  • My Space uploads — the learner brings their own book or notes; already ingested and chapter-tagged. "Practise on your own material" is genuinely differentiated and scales for free (the learner supplies the content).

What is genuinely new (the glue)

  1. RagCorpusUnitProvider — read distinct chapters from the vector store by board/class/subject, or by an uploaded document id.
  2. A non-exam importance strategy (see the honest trade-off below).
  3. Extract _generate_questions_via_agent() into a shared question-generation service (variable count and question mix).
  4. Persist generated questions so a session is stable and resumable, cached per chapter (unlike past papers, they do not pre-exist).
  5. Seed NCERT (crawl → ingest, Classes 1-12).

Honest trade-offs (decide, do not hand-wave)

  • No weightage signal outside exams. The JEE promise is "study what is most tested." NCERT chapters have no past-paper frequency, so the plan cannot rank by yield. It becomes "cover your syllabus, prioritised by your weak spots" (syllabus order × mastery gap). Still valuable, but a different, honest promise.
  • Generated questions cost money, time, and trust. Each session is LLM generation (latency, quota, quality variance) versus past papers, which are free, instant, and real. Generated items need caching and validation guardrails; real past questions are inherently more trustworthy.
  • NCERT seeding is an ops project — crawl, ingest, storage, cost across twelve classes, plus content licensing and attribution.

My Space first. No seeding, the learner supplies the content, immediately differentiated ("practise on your notes"), and it exercises the whole new path end to end on real user data. The NCERT library is the broader follow-on, and it front-loads the seeding plus the weightage-substitute design.