Inspiration

Every RUET student knows this routine: lecture slides in one folder, scattered notes in another, a question bank someone forwarded on Messenger, and a night-before-the-exam scramble to turn all of it into something you can actually write in an answer script. General-purpose AI chatbots don't fix this — they answer from the whole internet, not from your syllabus, and they explain things the way a textbook would, not the way an examiner expects to see them written. On top of that, most AI tools default to English, which quietly shuts out students who think and explain more naturally in Bangla.

We wanted to build something narrower and sharper than a full LMS: one tool that takes whatever material a student already has and turns it into grounded answers, a practice exam, and a study plan — in the language that actually helps them learn.

What it does

RUET StudyMate turns any uploaded course material (PDF, TXT, or MD — lecture slides, notes, question banks) into three connected AI features:

  • Ask — a grounded Q&A assistant. Ask anything from the uploaded material and get back an answer formatted the way you'd write it in an exam script: a one-line definition, numbered key points, a diagram/formula placeholder where relevant, and a short conclusion — with a source citation so you know it isn't hallucinated.
  • Practice Exam — one click generates a mixed MCQ / short-answer quiz from your material. Answer it, submit, and get an instant score plus a weak-topics breakdown with a personalized study plan grounded in your own notes.
  • Bilingual Mode — every answer, every piece of quiz feedback, and every study plan can be shown in English, বাংলা, or both side by side. This isn't a translation layer bolted on afterward — the same grounding instruction ("answer only from this material") applies regardless of language.

No login, no database, no setup beyond a Gemini API key — upload, ask, practice.

How we built it

  • Frontend: React + Vite, plain CSS with a small design-token system (no framework), themed around the look of a Bangladeshi exam answer script — ruled lines, a red margin, ink-navy header — so it doesn't feel like a generic chatbot skin.
  • AI: the Gemini API (gemini-3.5-flash-lite), called directly from the client for a hackathon-speed build.
  • Text extraction: pdf.js running in-browser to pull text out of uploaded PDFs; plain files are read directly. Everything is combined into a single "course knowledge base" string held in React state for the session — nothing persisted, nothing sent anywhere except to Gemini.
  • Prompt design: every AI feature routes through one small library of named, language-aware prompt templates (ANSWER_QUESTION_PROMPT, GENERATE_QUIZ_PROMPT, GRADE_SHORT_ANSWER_PROMPT, STUDY_PLAN_PROMPT), each taking a language parameter instead of duplicating prompts per language.
  • Structured output: quiz generation and short-answer grading use Gemini's JSON response mode (responseMimeType: application/json) with a schema in the prompt and an automatic one-shot retry if parsing fails, so the quiz UI never has to guess at loosely formatted text.

Challenges we ran into

  • Getting AI to write like an exam answer, not a chatbot. The default instinct of most models is a friendly paragraph. We had to be explicit in the prompt about structure — numbered points, a definition line, a diagram placeholder, a conclusion — before answers actually looked like something worth writing on paper for marks.
  • Keeping Bangla grounded, not just fluent. It's easy to get Gemini to produce nice-sounding Bangla; it's harder to make sure that Bangla output stays strictly tied to the uploaded material instead of drifting into generic explanation. We reused the exact same "answer only from this material" instruction across languages instead of writing a separate, looser Bangla prompt.
  • Reliable structured output for the quiz. Free-text quiz generation occasionally broke JSON parsing. Switching to Gemini's native JSON response mode, plus a single automatic retry that asks the model to fix its own malformed output, made this reliable enough to demo without babysitting it.
  • Model availability mid-build. We started on gemini-2.0-flash, which was deprecated mid-hack, and landed on gemini-3.5-flash-lite for speed and quota headroom — a reminder to keep the model name in one config value, not hardcoded across the app.

Accomplishments that we're proud of

Getting a genuinely bilingual, grounded study tool working end-to-end in a single hack session — not an English tool with a translate button, but one where Bangla and English answers are held to the same "cite your source" standard.

What we learned

That the highest-value AI feature here wasn't a chatbot — it was formatting discipline. The same underlying model produces something forgettable as a casual paragraph and something genuinely useful as a structured, exam-writable answer. Prompt structure did more work than any UI polish.

What's next for RUET StudyMate

  • Chunking and lightweight retrieval for longer material (full semester libraries, not just one file set).
  • A voice-based viva/oral-exam mode where the AI asks follow-up questions based on your answer.
  • Multi-course support with saved progress across sessions.

Built With

Share this project:

Updates

Submission history