GenAI Smart Education Platform

Inspiration

Education often depends on static materials, textbooks, lecture notes, examination papers, and marking schemes, while students and instructors need interactive tools. Students want immediate, contextual help, and instructors spend significant time preparing quizzes, presentations, and assessment reports.

This inspired us to build a single AI-powered platform that transforms educational PDFs into useful learning and teaching experiences. Our goal was not simply to summarize documents, but to create practical workflows grounded in the uploaded material.

What It Does

The platform provides separate tools for students and instructors:

  • Document Assistant: Answers theoretical, numerical, and programming questions using indexed textbook content.
  • Quiz Generator: Extracts topics from a book’s table of contents and creates downloadable question and answer papers.
  • Slides Generator: Produces grounded presentation drafts that can be reviewed, revised, and exported as PowerPoint files.
  • Paper Checker: Reads solved papers and marking schemes, proposes marks for short-answer questions, supports human review, and generates a final PDF report.
  • RAGAS Evaluation: Measures retrieval and answer quality using faithfulness, context precision, context recall, and answer relevancy.

How We Built It

We built the backend with FastAPI, organizing the application into four focused modules connected through LangGraph workflows.

For document ingestion, Docling parses text-based PDFs, preserves headings and page information, and generates Markdown. Its hybrid chunker creates context-aware chunks, which are embedded with an OpenAI embedding model and stored persistently in Chroma.

The document assistant first redacts common Pakistani PII patterns and classifies each query as theoretical, numerical, or programming. Theoretical questions use semantic retrieval and a cross-encoder reranker, while numerical and programming questions follow specialized response paths.

The quiz and slide generators reuse the indexed books. An LLM extracts topic-level entries from the table of contents, after which the user calibrates printed page numbers against actual PDF pages. This allows the system to retrieve chunks belonging to selected topics instead of generating generic content.

Quizzes are rendered as question-only and answer PDFs with ReportLab. Slide decks are generated as structured drafts, revised through feedback, and exported with python-pptx. Users can optionally generate AI visuals for every slide.

For paper checking, solved-paper and mark-scheme PDFs are sent directly to a vision-capable OpenAI model. The system pairs printed questions with handwritten answers, extracts marking criteria, grades matching short-answer questions, and asks the instructor to approve or edit the marks before producing the final report.

The user interface was built with React, Vite, and Axios, with separate student and instructor tool areas.

Challenges We Faced

One major challenge was preserving enough document structure for reliable retrieval. Plain text splitting can disconnect content from its headings and pages, so we used Docling metadata and prefixed every chunk with its complete section path.

Then memory was an important issue. Initially, we were retaining entire previous conversation and were using it for retrieval along with current question. However, as conversation became long, the retrieved docs started to become more related to conversation history and less relevant to current question as history comprised of major portion of embedded text. We resolved this by adding a query rewrite prompt that assessed the relation between current query and chat history and only sent chat history if it was related to current question otherwise remove it.

Query type posed another issue as theory based questions can be answered from retrieved docs but questions involving performing calculations or writing code/programs could not be handled by a RAG agent. So, our implementation first classifies the query and then passes only theoretical queries to RAG agent and for numerical/programming queries, relevant docs are still retrieved and these docs alongwith query are sent to llm that solves them using the knowledge in the retrieved docs.

Page alignment was another difficult problem. Textbooks frequently use printed page numbers that differ from PDF viewer pages because of covers and front matter. We addressed this with a calibration step that computes and applies the page offset before selecting content.

Large topic selections could exceed practical model context limits. We handled this by batching quiz content and sampling representative slide excerpts while retaining heading and page metadata.

Handwriting introduced a different kind of uncertainty. Instead of relying on conventional text extraction, the paper checker sends complete PDFs to a vision-capable model. Because automated grading can still be wrong, we designed the system around human review and restricted automatic marking to supported short-answer questions.

We also had to manage different persistence requirements. Chroma indexes, Markdown books, and paper-checker reports are stored on disk, while chat history, quiz sessions, and slide drafts currently remain in process memory.

What We Learned

We learned that a useful educational AI system needs more than a strong prompt. Retrieval quality depends heavily on document structure, metadata, page alignment, chunking, and reranking.

We also learned the importance of designing AI as part of a workflow. Page calibration, topic selection, slide feedback, and mark review give users control at the points where automated decisions are most likely to need correction.

Finally, building several tools on top of one shared knowledge layer showed us the value of modular architecture. The same indexed educational content can support tutoring, quiz creation, slide generation, and evaluation without creating a separate ingestion pipeline for every feature.

What’s Next

Future improvements include CPU-compatible ingestion, OCR for scanned books, per-book chat selection, persistent user sessions and generated assets, stronger authentication and privacy controls, configurable frontend endpoints, and broader support for additional question types in the paper checker.

Built With

  • chromadb
  • docling
  • fastapi
  • javascript
  • langchain
  • langgraph
  • openai
  • pydantic
  • python
  • python-pptx
  • ragas
  • react
  • reportlab
  • uvicorn
  • vite
Share this project:

Updates