Inspiration: Water, water, everywhere...

The theme for this hackathon is "Beneath the Water." When we think of the ocean, we think of something vast, deep, and full of water—yet you cannot drink from it. You need purified water.

Today’s educational landscape is exactly the same. Students are drowning in an ocean of unstructured information (ChatGPT, Google, YouTube). But when you have an exam in 24 hours, you don't need the whole ocean. You need exactly what is in your syllabus. Just as a fisherman only catches the specific fish he needs, a student only needs high-yield, targeted knowledge.

That is why we built DoubtSetu. We wanted to build an AI learning engine that filters out the internet noise, anchors strictly to the student's syllabus, and dives beneath the surface to measure true conceptual understanding.

What it does

DoubtSetu is a MERN-based, context-restricted AI study assistant.

  • The "Purified Water" (Strict Context Guardrails): Unlike general chatbots, DoubtSetu anchors itself entirely to the uploaded PDFs/notes. If you ask an out-of-syllabus question, the system actively blocks it. No internet hallucinations.
  • Surface Rescue (Exam Panic Mode): Input a deadline like "Exam in 3 Days," and the AI acts as a targeted net—fishing out predicted questions, high-yield topics, a revision schedule, and generating an interactive 5-question mini-test.
  • Deep Dive (AI Teacher Mode & Ask Without Terms): Instead of spoon-feeding answers, the AI Teacher uses a Socratic loop (Hint -> Explanation -> Answer). If a student forgets a technical term, they can fuzzily describe it, and the system maps it to the exact syllabus topic.
  • Sonar Analytics (Memory Heatmap): We don't guess a student's proficiency. The system generates automatic quizzes. Based on quiz scores and chat telemetry, it populates a "Memory Heatmap" to show where the student is strong and where they are "drowning."

How we built it

DoubtSetu is built on a robust, production-ready architecture:

  • Frontend: React + Vite, styled with a dark "deep-sea tactical sonar" aesthetic.
  • Backend: Node.js + Express.
  • Database: MongoDB + Mongoose to manage strict session data, document relationships, and quiz attempt telemetry.
  • AI Engine: Google Gemini API (gemini-2.5-flash-lite). We leveraged Gemini's massive context window and structured outputs for document parsing (pdf-parse, mammoth) and MCQ generation.

Challenges we ran into

  1. Context Bleed: General LLMs want to answer questions. Engineering strict system prompts to force the Gemini API to reply "Out of Scope" when a query drifted from the uploaded PDF required ruthless prompt tuning.
  2. Normalizing AI Outputs: Generating interactive quizzes required the AI to return data in a highly predictable format. Normalizing Gemini's text outputs (e.g., distinguishing between "A", "Option A", or raw answer text) so our React UI could correctly score the quizzes took significant iteration.
  3. Async Error Handling: Ensuring our Node backend didn't crash during heavy PDF parsing. We built robust async wrappers and local demo fallbacks to keep the app alive even if the network drops.

Accomplishments that we're proud of

  • Zero Hallucinations: We successfully built a "walled garden" study space. The AI truly acts as a professor restricted to the textbook.
  • The Telemetry Loop: Taking an auto-generated quiz doesn't just give you a score; it dynamically alters your Memory Heatmap and triggers Confusion Detection alerts in real-time.
  • "Ask Without Terms" Feature: Getting the AI to successfully bridge a student's vague, fuzzy memory with the strict terminology of a computer science textbook.

What's next for DoubtSetu

Our immediate next steps include adding RAG (Retrieval-Augmented Generation) using Vector Databases to handle massive, 1000-page textbooks without hitting token limits. We also plan to integrate Cloudinary/AWS S3 for permanent document storage and implement advanced Knowledge Tracing algorithms (like LBKT) for long-term semester tracking.

Share this project:

Updates