The problem

Students in India often study after school hours, when no teacher is around. Most AI tutors answer only in English, so doubts in Marathi or Hindi simply go unasked.

What it does

DoubtSetu is an AI study buddy for class 6-12 students. You type a doubt or snap a photo of a textbook page, worksheet or notebook, pick Marathi, Hindi or English, and DoubtSetu explains the underlying concept, solves the doubt step by step, gives one similar practice example, and turns the same topic into an interactive 3-question quiz with instant right/wrong feedback, because a doubt is only cleared when you can answer a question on it.

How we built it

A Python (Flask) backend calls Google Gemini with a fixed tutor role prompt and responseMimeType: application/json, so every answer comes back as clean structured JSON: concept, numbered solving steps, a practice example and quiz items. Textbook photos go to Gemini as inline_data images, so a student can just snap their notebook instead of typing. If the API key is absent, the app falls back to a clearly labelled demo mode so the interface is never empty. The frontend is vanilla HTML/CSS/JS and the app is deployed free on Render.

Challenges we ran into

The free Gemini tier has rate limits and can fail under high demand, so we added retry messaging and the demo-mode fallback. Keeping the output reliably parseable and language-correct across three languages took several rounds of prompt iteration.

What we learned

Structured-output prompting (JSON schema + responseMimeType), multimodal image input handling, and designing for real after-school, low-bandwidth, non-English study sessions.

Built With

Share this project:

Updates

Submission history