Inspiration:- Education is the greatest equalizer, but educators in under-resourced schools face a massive administrative bottleneck: creating differentiated, localized teaching materials. We discovered that teachers often spend 1–2 hours daily manually crafting worksheets, quizzes, and lesson plans from standard textbooks.

Furthermore, localized content is scarce. A teacher in rural India or Latin America might have an English textbook but needs assessment materials in Hindi or Spanish. We wanted to build a tool that acts as a "copilot" for these educators. We named it Vidyapack—combining Vidya (the Sanskrit word for knowledge) and Pack (a ready-to-use bundle of teaching materials).

What it does:- Vidyapack transforms any textbook photo or PDF into a complete, customized assessment pack in seconds.

Upload: Teachers upload a PDF or image of a textbook chapter.

Visualize: The platform uses a ReactFlow node-graph to visually display the AI pipeline in real-time (OCR Extraction → Semantic Chunking → Vector Indexing → Topic Hierarchy).

Configure: Teachers use a custom configuration panel to select exactly how many Multiple Choice, True/False, Fill-in-the-Blanks, Computational, or Software Code questions they need.

Generate: With a click of the "Push Changes" button, the AI generates the quiz and answer key in their chosen target language.

How we built it:- We built Vidyapack using a modern, decoupled architecture:

Frontend (Next.js & React): We used Next.js for its robust routing and server-side rendering. For the pipeline visualization, we integrated ReactFlow, allowing users to see the backend processing state dynamically via Server-Sent Events (SSE). We used Tailwind CSS for a clean, accessible UI.

Backend (Python & FastAPI): FastAPI handles the heavy lifting. We used PyMuPDF and Tesseract OCR to extract text from PDFs and images. The text is then semantically chunked and stored in ChromaDB for efficient Retrieval-Augmented Generation (RAG).

AI Pipeline (LangChain & LLMs): We used LangChain's with_structured_output and Pydantic to force the LLM to return perfectly formatted JSON. Depending on the teacher's config, the LLM generates specific question types. For mathematical and computational questions, we ensured the AI outputs LaTeX formatting so equations render perfectly, such as the quadratic formula:

x = \frac{-b \pm \sqrt{b^2-4ac}}{2a}]

Multilingual Support: We integrated the prompt pipeline with translation models (like NLLB-200) to ensure that generated questions and answer keys are accurately localized into the teacher's native language without losing pedagogical context.

Challenges we faced:- Structured JSON Generation: LLMs are notoriously bad at outputting strict, parseable JSON when asked to generate multiple different formats (MCQs vs. code questions) in one go. We solved this by using Pydantic schemas and LangChain's structured output tools, guaranteeing the frontend receives clean data.

Real-time Visualization: Mapping the backend Python processing steps to the frontend ReactFlow graph in real-time was tricky. We had to implement a WebSocket/SSE connection to push status updates (e.g., node_1: complete, node_2: processing) to the Next.js client.

Multilingual Localization vs. Translation: Directly translating English questions to Hindi often resulted in robotic phrasing. We had to engineer the prompt so the LLM generates the question natively in the target language based on the extracted context, rather than translating it word-for-word.

Handling PDFs: Textbooks often contain complex layouts, tables, and diagrams. Extracting clean text without losing the structural hierarchy (chapters vs. sub-topics) required careful chunking strategies.

Built With

  • chromadb
  • docker
  • events
  • fastapi
  • generative-ai
  • github
  • hugging-face
  • langchain
  • llama-3
  • next-js
  • nllb-200
  • openai
  • pydantic
  • pymupdf
  • python
  • react
  • reactflow
  • retrieval-augmented-generation
  • server-sent
  • tailwind-css
  • tesseract-ocr
  • typescript
  • vector-database
  • vercel
  • websockets
Share this project:

Updates

Submission history