About StudyBuddy AI

Inspiration

As university students in Bogotá, we constantly juggle reading assignments, research papers, and online tutorials. The problem is that consuming content and actually learning from it are two different tasks. After reading a 20-page article, we still have to manually extract key points, create flashcards, and write practice questions. Existing AI tools either cost money, require cloud uploads (raising privacy concerns), or produce generic summaries that miss the nuances we need for exams. When Google announced the Chrome Built-in AI Challenge, we saw an opportunity to solve this with on-device intelligence that respects privacy and works offline.

What It Does

StudyBuddy AI transforms any web page or personal note into a complete learning kit in seconds. You click the extension, and it generates a summary, key takeaways, flashcards, study questions, and an action plan. The Quiz tab creates mastery-level questions (multiple choice, true/false, short answer) that adapt to the concepts extracted from your content. The Upload tab accepts text, markdown, or images (with OCR), translates non-English material, and builds quizzes from your own notes. Every feature runs entirely on-device using Chrome's Gemini Nano APIs, so no data leaves your machine.

How We Built It

We designed a hybrid architecture that prioritizes speed without sacrificing quality. The popup orchestrates all UI interactions and generates instant fallback results (local summaries, template-based quizzes) while Gemini Nano processes the real content in the background. Once the AI finishes, the UI upgrades seamlessly. We use the Prompt API for concept extraction and quiz generation, the Summarizer API for condensing long pages, the Translator and Language Detector APIs for multilingual support, and the Writer/Rewriter APIs as fallback enhancements. To keep latency low, we trim payloads to 6,000 characters, cache API sessions across the popup lifecycle, and use DOM heuristics to extract only high-signal paragraphs from web pages. The entire tech stack is vanilla JavaScript with no external dependencies, ensuring judges can audit and run the extension without setup hassles.

Challenges We Faced

Latency vs Quality: Gemini Nano models can take 5-10 seconds on first run, which feels slow for a demo. We solved this with instant fallbacks that render in under a second, then silently upgrade when AI responses arrive.

Prompt Engineering: Early quiz questions were irrelevant or repetitive. We refined prompts to act as an "instructional designer," demanding exam-relevant concepts, precise key facts, and assessment cues, all in structured JSON. This dramatically improved output quality.

Service Worker Limits: Initially, we ran AI logic in the background script, which caused "no response" errors due to Chrome's execution time limits. Moving all heavy processing to the popup eliminated this issue.

Content Capture: Raw innerText from web pages includes navigation menus, ads, and footers. We built a heuristic that prioritizes <p>, <li>, and <blockquote> elements with meaningful length, then joins the top 20 blocks. This improved relevance and cut AI processing time.

Multilingual Support: Not all students read in English. We integrated language detection and translation so Spanish, French, or Portuguese notes automatically convert to English for quiz generation, then store the original for reference.

What We Learned

On-device AI is incredibly powerful when you design around its constraints. Caching sessions, trimming inputs, and using structured prompts (JSON-only responses) can turn a 10-second wait into a 2-second upgrade. We also learned that users perceive performance differently: showing instant feedback (even if it's a simple fallback) makes the app feel fast, even when the real AI is still working. Finally, building for a hackathon taught us to prioritize demo impact. Every feature needed a clear "wow" moment for judges, so we focused on visible intelligence (adaptive quizzes, multilingual notes, progress tracking) over invisible optimizations.

What's Next

We plan to add spaced repetition reminders, collaborative study packs that students can share via JSON export, and support for video transcripts (YouTube, lecture recordings). We're also exploring the Rewriter API to paraphrase difficult concepts at different reading levels and the Writer API to generate practice essay outlines. Long-term, we want StudyBuddy AI to become the default learning companion for Chrome, turning every tab into a potential study session.

Built With

  • chrome-built-in-ai-apis-(prompt-api
  • chrome-extension-manifest-v3
  • chrome-storage-api
  • chrome-tabs-api
  • css3
  • html5
  • javascript-(es6+)
  • language-detector-api
  • rewriter-api)
  • scripting
  • summarizer-api
  • translator-api
  • writer-api
Share this project:

Updates