Inspiration

Students often struggle not because they cannot learn, but because the explanation is too advanced, too generic, or disconnected from their own chapter. We wanted to create a study buddy that adapts to a student’s class, subject, and uploaded material—without making learning feel like another boring worksheet.

What it does

LearnStep is an NLP-first learning companion for Classes 5–8 Mathematics and Science.

Students upload a chapter PDF, notes, or worksheet. LearnStep extracts concepts, definitions, formulas, examples, and exercises; turns them into short lessons; asks class-appropriate questions; gives hints before solutions; and recommends what to revise next.

Instead of calling students “weak” or “smart,” it tracks learning evidence such as:

  • Introduced
  • Developing with support
  • Demonstrated independently
  • Ready for revision

How we built it

We built LearnStep using:

  • React and TypeScript for the learning interface
  • FastAPI for the backend APIs
  • PostgreSQL and pgvector for structured data and semantic retrieval
  • PyMuPDF for PDF extraction
  • spaCy and rule-based NLP for detecting headings, definitions, formulas, examples, and questions
  • MiniLM embeddings for retrieving relevant chapter content
  • DistilBERT classifiers for question cognitive level and difficulty
  • Docker for reproducible local development and deployment

The retrieval system uses both semantic similarity and strict metadata filters such as student, class, subject, chapter, document, and concept.

$$ \text{score}(q, c) = \cos(\mathbf{e}_q, \mathbf{e}_c) $$

where ( \mathbf{e}_q ) is the query embedding and ( \mathbf{e}_c ) is the learning-content chunk embedding.

Challenges we ran into

The hardest challenge was making content truly class-appropriate. A shorter answer is not automatically easier—vocabulary, prerequisites, notation, numbers, and reasoning steps all need to match the student’s level.

We also had to prevent the system from treating retrieval as teaching. Finding a relevant paragraph is not enough; the system needs to convert it into a structured flow:

$$ \text{Learn} \rightarrow \text{Example} \rightarrow \text{Practice} \rightarrow \text{Hint} \rightarrow \text{Explain} \rightarrow \text{Revise} $$

Another major challenge was answer evaluation. Numerical answers need value, unit, and tolerance checks, while explanations need rubric-based feedback and should sometimes remain low-confidence instead of being force-marked correct or incorrect.

Accomplishments that we're proud of

  • Built a curriculum-grounded learning flow instead of a generic “chat with PDF” tool
  • Designed an NLP pipeline that identifies educational content such as formulas, definitions, examples, and exercises
  • Created class-, subject-, concept-, and document-filtered RAG retrieval
  • Added staged hints so students can think before seeing the answer
  • Separated curriculum coverage, learning evidence, and revision priority
  • Designed the system without student ranking, behavioural profiling, or unnecessary personal-data collection
  • Added a deep-learning evaluation plan that compares DistilBERT against a TF-IDF baseline instead of assuming the neural model is better

What we learned

We learned that RAG alone is not enough for educational products. Good retrieval does not guarantee a good explanation for a Class 5 student.

We also learned that AI feedback needs uncertainty. It is better for a system to say that an explanation needs another attempt than to confidently give incorrect feedback.

Most importantly, we learned that building for children requires privacy, safety, and age-appropriate design from the first line of the product—not as an afterthought.

What's next for LearnStep

We are starting with Classes 5–8 Mathematics and Science in English.

Next, we plan to:

  • Evaluate the NLP extraction pipeline on varied educational PDFs
  • Train and benchmark the cognitive-level and difficulty classifiers
  • Build a reviewed question bank with explanations and hint stages
  • Add concept-level revision planning
  • Deploy a safe demo using synthetic sample chapters
  • Expand carefully to more subjects, languages, and curriculum mappings after evaluation

Built With

Share this project:

Updates