Inspiration
We've all been there: you read an entire article, get to the bottom, and realize you've retained almost nothing. Passive reading is a terrible way to learn.
The most effective learning method, the Feynman Technique, is simple: can you explain this concept to a beginner? I was inspired to build a tool that forces you to do just that, right in the browser.
The problem was always privacy and speed. Who wants to send every paragraph they're studying to a cloud server? The Google Chrome Built-in AI Challenge was the "Aha!" moment. With Gemini Nano running entirely on-device, we could finally build the perfect, private, and instant learning coach.
What it does
This FeymanCoach extension transforms your browser into a personal, always-ready learning companion. Highlight any text, and with a simple right-click, our built-in AI student, powered by Gemini Nano directly in Chrome, will immediately ask you a clarifying question. This forces you to explain the concept in your own words, cementing your understanding using the proven Feynman Technique.
No cloud, no privacy concerns, just instant, intelligent engagement right on your device. Feyman Friend isn't just an extension; it's your brain's new best friend, turning every webpage into a powerful learning opportunity. Give your users the gift of true comprehension – effortlessly, privately, and right where they learn.
How I built it
Feynman Friend is built with a minimalist and powerful stack, using the Chrome built-in AI APIs.
manifest.json: This is the skeleton. I defined contextMenus for the right-click action, scripting and activeTab to interact with the page, and the all-important "ai" permission to get access to the on-device models.
background.js: This service worker listens for the user to right-click on selected text. When our menu item is clicked, it injects the main content.js script into the active page and passes it the highlighted text.
content.js: This is the brain. It dynamically creates the floating UI window, then calls the Prompt API. The "secret sauce" is my prompt engineering: I use a systemPrompt to command the AI to act as a "curious beginner student," ensuring the question it generates is simple, clarifying, and perfectly aligned with the Feynman method.
Challenges I ran into
I have no computer engineering background so I vibe-coded the entire thing. When I tried to add new features to it sometimes I get errors that is hard to debug using Gemini. And version management is a bit of challenge too since I was not too familiar with Git. (Despite knowing Linus personally)
Accomplishments that I am proud of
It Actually Works! In a hackathon, getting a functional product with brand-new, experimental technology is a massive win. It’s not a mockup; it’s a real tool that uses on-device AI. I am super proud of myself independently finished and open sourced this project all on my own. The feature right now is simpler than I wanted but I will going on working on it.
Nailing the "Student" Persona: The AI doesn't just give a generic summary. Thanks to our prompt engineering, it genuinely feels like a curious student asking for help.
What I learned
On-Device AI is a Game-Changer: The speed is incredible. There's no network lag, no loading spinner. The response is instant. This, combined with the inherent privacy, opens up a new world of "proactive" AI features, just like the challenge suggested.
The systemPrompt is Everything: A few well-written sentences in a systemPrompt transformed a generic text model into a specific, believable "Feynman Friend." In this new AI-powered world, prompt engineering is just as important as code.
Check Your Flags. Twice. When you're on the bleeding edge, your browser's experimental flags are as critical as your code's syntax.
What's next for Feynman Friend
I've only scratched the surface. The next logical step is to make Feynman Friend truly interactive.
The Full Conversation: I plan to add a text box allowing the user (the "teacher") to type their answer. The AI "student" will then read their explanation and either say, "Thanks, I get it now!" or ask a follow-up question, creating a full conversational loop.
Adaptive Coaching: The AI could track the complexity of your explanations and adjust its questions, getting "smarter" as you do.
Persona Pack: Allow users to select who they're explaining to. Imagine the difference between explaining a concept to a "Curious 10-Year-Old" versus a "Skeptical Expert."
Built With
- gemini
- gemininano
- html/css
- javascript
- json
Log in or sign up for Devpost to join the conversation.