This is a submission for the Gemma 4 Challenge: Build with Gemma 4
What I Built
StudyGemma — an AI-powered study buddy that transforms messy CS notes into polished study material.
I built this because I noticed how frustrating it is to have scattered lecture notes, code snippets, and textbook excerpts scattered everywhere with no good way to organize them. StudyGemma solves that with a single interface:
- Explain: Turns confusing notes into clear explanations
- Quiz Me: Generates 5-question quizzes to test understanding
- Notebook Notes: Creates clean, structured bullet-point summaries
- Practice Problems: Generates problems to reinforce concepts
- Interview Mode: Preps you for technical interviews
It's a React + FastAPI web app that's simple to use but powerful enough to actually save study time.
Demo
[Link to deployed demo or video walkthrough]
Try it locally:
- Clone the repo
- Set up your OpenRouter and Google AI API keys
- Run the backend:
uvicorn main:app --reload - Run the frontend:
npm run dev - Paste your CS notes and watch them transform
Code
GitHub Repository: github.com/rinwah/studygemma
Frontend: React + Vite + Custom CSS
Backend: FastAPI (Python)
Models: Gemma 4 via OpenRouter + Google AI Studio
The backend intelligently handles API availability — it tries OpenRouter first, and if rate limited, automatically falls back to Google's API. No manual switching, no broken flows.
How I Used Gemma 4
Why Gemma 4?
I chose Gemma 4 (specifically the 26B MoE and 31B Dense models) for three deliberate reasons:
Free tier access — I wanted to build something anyone could use without expensive API credits. Gemma 4 is free on OpenRouter and Google AI Studio.
Perfect for education — Gemma 4 is exceptional at explaining concepts, generating questions, and creating practice problems. Its 262K context window means students can paste long lecture notes without truncation.
Multiple model options — The Gemma 4 family spans from 2B to 31B. StudyGemma works across different tiers, letting users choose based on their hardware and needs.
Technical Implementation
Model Selection:
-
Primary:
google/gemma-4-26b-a4b-itvia OpenRouter (free tier) - Fallback: Same model via Google AI Studio (if rate limited)
- Context: 262K tokens per request (can handle entire lecture transcripts)
Why this works:
- Gemma 4 is instruction-tuned and excellent at following structured prompts
- The 26B MoE model is efficient without sacrificing quality
- Free tier means students aren't blocked by cost
- Fallback architecture means reliability
The system prompt emphasizes Gemma's strengths:
- Clear, example-driven explanations
- Structured outputs (quizzes, bullet points)
- Beginner-friendly language (no unnecessary jargon)
- Conciseness (respects students' time)
Key Features That Leverage Gemma 4
- Mode-specific prompting — Each study mode (Explain, Quiz, Notes, Practice, Interview) has a tailored instruction that plays to Gemma 4's strengths
- Fallback reliability — Gemma 4 via two providers ensures the app never breaks due to rate limits
- Long context handling — Students can paste entire lecture notes or textbook chapters without worrying about truncation
What Gemma 4 Unlocked
Without Gemma 4, this app would be expensive and limited. With it:
- ✅ Students can use it completely free
- ✅ No API key required (uses free tiers)
- ✅ Handles long-form educational content (262K tokens)
- ✅ Produces high-quality explanations and quizzes
- ✅ Runs reliably with fallback architecture
Why This Matters
CS students are drowning in scattered notes. StudyGemma brings them together and transforms them into focused, actionable study material in seconds. Gemma 4's capability and accessibility made this possible — it's powerful enough to understand nuanced concepts, but free enough that every student can use it.
Try it out: [GitHub Repo Link]
Questions? Drop a comment below!
Built with ❤️ using Gemma 4 for the Gemma 4 Challenge.




















