← Back to browser
examples

Gemmate: The Open-Weight Voice Study Companion That Unmasks Exam Traps

This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend What I...

*This is a submission for the [Hacktoberfest Weekend Challenge: Build for a Friend](https://dev.to/challenges/hacktoberfest-weekend-2026-10-01)*

---

What I Built

Every semester, my close friend in engineering pulls grueling all-nighters preparing for advanced technical exams. They don't struggle with understanding the core equations; they struggle with the deceptive traps examiners deliberately design into the questions:

When studying at 2:00 AM, my friend's anxiety peaks. Standard chatbots like ChatGPT fail them completely: when asked for help, they immediately dump long walls of text containing the direct final answer. That robs a student of the chance to build problem-solving intuition, and reading dense markdown blocks on a screen only increases their cognitive exhaustion.

**I built Gemmate for them.**

**Gemmate** is an empathetic, open-weight AI voice companion designed to turn exam panic into calm mastery. When a student uploads a photo of a tricky exam question or pastes a problem statement, Gemmate **never spoils the solution**. Instead, it acts like a kind, brilliant senior peer:

1. πŸ’‘ **Core Theory Analysis**: Identifies the fundamental underlying principles required to solve the problem. 2. πŸ’€ **The Trap(s)**: Explicitly calls out the misleading phrasing, deceptive edge cases, or false assumptions examiners set up to mislead students. 3. βš”οΈ **Actionable Attack Plan**: Lays out a systematic 3-to-4 step blueprint to solve the problem methodically. 4. πŸŽ™οΈ **Socratic Voice Hints**: Powered by ElevenLabs, Gemmate speaks comforting, bite-sized hints out loudβ€”encouraging the student to take the next step without revealing the formula. 5. πŸ“ **Dynamic Practice Variant**: Generates a brand-new practice problem testing the exact same concepts and traps with fresh variables so the student can prove they've mastered it.

---

Demo

Key Highlights of the Experience:

---

Code

The complete source code for Gemmate is open-source under the MIT license:

{% github inusha-thathsara/Gemmate %}

---

How I Built It

Gemmate is designed from the ground up around **Google's Open-Weight Gemma models**:

 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
 β”‚           Student: Past Exam Paper / Photo             β”‚
 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                             β”‚
                             β–Ό
 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
 β”‚           Gemmate Frontend (Next.js 16)                β”‚
 β”‚    Client-Side Image Compression & Glassmorphic UI     β”‚
 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                             β”‚
                             β–Ό
 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
 β”‚        API Route Orchestrator (/api/triage)            β”‚
 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
               β”‚                           β”‚
    (Offline / Local)              (Cloud / Production)
               β”‚                           β”‚
               β–Ό                           β–Ό
 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
 β”‚  Local Ollama Runtime     β”‚   β”‚  Google Hosted Cloud   β”‚
 β”‚  - Gemma 3 / 4 (1B/31B)   β”‚   β”‚  - Gemma 4 (31B-IT)    β”‚
 β”‚  - Moondream Vision       β”‚   β”‚  - Flash Vision OCR    β”‚
 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
               β”‚                           β”‚
               β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                             β”‚
                             β–Ό
 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
 β”‚      Structured JSON Extraction:                       β”‚
 β”‚      Core Concepts β€’ The Trap β€’ Attack Plan            β”‚
 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                             β”‚
                             β–Ό
 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
 β”‚      ElevenLabs Audio Engine (Turbo v2.5)              β”‚
 β”‚      Human-Like Socratic Voice Hints & Audio Streams   β”‚
 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

1. The Open-Weight AI Core (Google Gemma)

2. High-Performance Vision OCR

Exam questions often exist only on paper past-exam handouts or lecture slides. Gemmate accepts up to 3 photos concurrently, compresses them client-side in HTML5 canvas to prevent payload bloat, and processes them in parallel using high-fidelity vision models to transcribe formulas and diagrams into pristine LaTeX markdown.

3. Voice Intelligence with ElevenLabs

Reading dense screens at 2 AM induces eye fatigue and mental blocks. Gemmate integrates ElevenLabs Turbo v2.5 with in-memory audio caching. Hints and attack plans are converted into comforting, natural speech that sounds like a supportive friend talking you through the problem.

---

Why Does Open Innovation Matter?

Building with **open-source AI and open-weight models** wasn't just a technical preferenceβ€”it was the only way this project could truly succeed:

1. 100% Privacy for Sensitive Student Work

University honor codes and exam confidentiality mean students should never paste unpublished past papers, professor problem sets, or graded assignments into closed commercial LLMs that use user queries for proprietary retraining. With open-weight Gemma running locally on a student's machine, **their data never leaves their laptop**.

2. True Offline Accessibility in Exam Study Basements

University libraries, basement study halls, and dormitories are notorious for dead Wi-Fi zones. Closed API-dependent applications become useless bricks the moment the connection drops. Because Gemma runs natively via Ollama, Gemmate can run completely air-gapped on a plane, on a train, or in an underground library cubicle.

3. Democratizing Education Without Subscription Tollgates

Closed commercial frontier models charge $20/month subscriptions or per-token API fees that student budgets cannot sustain. Open innovation means students everywhere have unlimited access to world-class reasoning without artificial usage caps or surprise credit card bills.

4. Customizability and Fine-Tuning

With open weights, educators and students can fine-tune Gemma specifically on their university's syllabus, curriculum notation, or regional examination styles (e.g., JEE, AP, IB, Cambridge A-Levels)β€”something impossible with closed black-box models.

---

What My Friend Said When I Handed It Over

*"Usually when I get stuck on a past paper, I stare at the question for an hour getting more and more panicked, or I cheat and look up the answer sheet, which makes me feel like an idiot. Gemmate is the first tool that actually pointed out the trick in the question without giving away the answer. Having the voice explain the trap out loud made my chest unfreeze."*

Seeing their stress melt away made every line of code worthwhile.

---

🌐 Community Wisdom

During the design and implementation of Gemmate, insights from the broader developer community on [dev.to](https://dev.to) helped shape our architecture:

---

Prize Categories

---

πŸ€– Agent Session

This project was built with the help of an AI pair-programming session. Below is the full transcript of how we debugged deployments, fixed the vision pipeline, audited branding, and wrote this very submission β€” all in one continuous session:

{% agent_session building-gemmate-an-open-weight-ai-study-companion-for-hacktoberfest-8jiaol %}

Have questions about this article?

Ask DocuMind