[01] Overview
Most students study by rereading, one of the least effective ways to study. Goldfish makes you teach instead. You add a chapter, explain each idea in your own words to Finn, a cartoon goldfish, and Finn takes a hidden exam using nothing but your explanation.
When Finn gets a question wrong, Goldfish shows the sentence of yours that misled him, or tells you that you never taught that point. Finn forgets everything overnight, so each review starts with you explaining the chapter again from memory.
I built it for Google's #BuildHybridAI 2026 hackathon, which asks for apps that use Firebase AI Logic's hybrid inference: a small model on the device where it can do the job, and Gemini in the cloud where it must. Goldfish is an iOS entry.
The study loop puts several proven learning methods to work:
| Method | Where it shows up in Goldfish |
|---|---|
| Feynman Technique | You explain each idea in plain words to Finn, who knows nothing else. A gap in your explanation shows up as a question he cannot answer. |
| Active recall | Fresh Water hides your old lesson so you re-teach from memory, and Your Turn makes you type what you recall before you see the choices. |
| Spaced repetition | Reviews come back 1, 3, 7 and 14 days apart, fitted to your exam date. An idea is mastered after correct answers on three different days. |
| Confidence ratings | In Your Turn you say how sure you are, so confident mistakes stand out and get fixed first. |
| On-device RAG | Orla, the tutor, searches your deck on the phone by keywords (BM25) and by meaning (Apple's sentence embeddings). The on-device model then writes a hint from the passages it found. |
Teach the goldfish. Ace the exam.
Learn a chapter by explaining it. Your own unaided answers, not Finn's score, decide what you have mastered.
[02] A Study Session
You paste a chapter or add a PDF. Gemini reads it and writes a hidden exam of 6 to 10 ideas, and code checks every question before it is stored. Then a session runs in these steps.
| Step | What happens |
|---|---|
| The Bowl | You explain each idea in your own words, with a word limit. Pasting is blocked, and a sentence that copies 8 or more words from the chapter is flagged "Say it your way" and does not count. |
| Pop Quiz | Finn answers the hidden exam one question at a time, using only your lesson, and quotes the sentence he relied on. |
| Miss review | A mix-up highlights your sentence that misled him. A gap says what was never taught. The right answer shows only after two misses. |
| Fresh Water | When a chapter is due, Finn has forgotten it and your old lesson is hidden. You teach it again from memory. |
| Your Turn | You answer questions Finn never saw. You type what you recall first, then choose, and say how sure you are. An idea is mastered after correct answers on three different days. |
Reviews are spaced over days and fitted to your exam date, with a daily reminder. Decks keep subjects apart, and Orla, a tutor fish, answers questions with a hint and a passage to reread, never the answer. Friends can share a chapter and hold a teach-off, where each fish takes the same questions from its own student's lesson. Only scores are shared; lessons never leave the phone.
[03] How It Uses Hybrid AI
Every model call goes through Firebase AI Logic's hybrid inference, with Apple's on-device model as the primary and Gemini as the fallback. The cloud does the long reading and careful writing. The iPhone handles the many short, repeated calls that make the game playable. Rules that must be exact, like grading and the review schedule, are plain code.
| Job | Where it runs | Why |
|---|---|---|
| Write the hidden exam | Gemini in the cloud (gemini-3.8-flash), with a JSON schema | Needs long context and strong reasoning |
| Play the fish | Apple's on-device model, with Gemini (gemini-3.5-flash-lite) as the fallback | Free and offline, so you can re-quiz after every edit. A small model is a good pupil, because it needs clear explanations |
| Check that each question is fair | Apple's on-device model only | Runs in the background while you read |
| Write your Report Card | Gemini in the cloud | Sums up the whole session |
The limits of a small phone model turn into the method. It has no memory between sessions, so Finn forgets and every review is re-teaching from memory. It takes about 4,096 tokens a request, so the Bowl holds 600 words and you have to choose what matters. It is weaker than cloud models, so vague notes fail and you see why. And it is free and offline, so you can re-quiz as often as you like.
Every answer shows where it ran, "On this iPhone" or "Cloud", and each quiz keeps a running count.
[04] Grading by Code
Finn's answers are graded by code, not by a model. An answer counts only if Finn quotes a sentence of 3 to 30 words that appears word for word in your lesson and contains the key term of the option he chose. Anything else counts as "not taught". This stops the model from passing on what it already knew instead of what you taught it.
A hidden Diagnostics screen runs the Fish Check: 20 cell-biology questions asked with a good lesson, a lesson with a fact missing, a lesson with a fact wrong, and an empty lesson. It measures whether the on-device model answers from the lesson rather than from what it already knows.
[05] Build & Requirements
Goldfish is a SwiftUI app with its logic in a separate Swift package. It uses Firebase AI Logic for the models, App Check, and Remote Config for model names and limits. Anonymous sign-in and Firestore are used only for the optional friends features. Lessons and progress stay on the phone.
It needs an iPhone that supports Apple Intelligence (iPhone 16 or later) on iOS 26. Without Apple Intelligence, Finn runs in the cloud. Once a chapter's exam is stored, the app works offline, and the built-in sample chapter needs no connection at all.
Goldfish is an iPhone app, so there is no web version to launch from this site. The full overview covers the hackathon, every screen in light and dark, and the UI kit.