Inspiration
Although current accountability/focus apps are very popular, their strategy to helping users is to simply set rigid limits or outright block website access. By leveraging advanced generative AI and natural language processing capabilities of cutting edge LLMs, our team designed a chrome extension study buddy that delivers a dynamic and personalized experience to help users stay focused and on track.
How we built it
Our project was broadly split into two core abilities, which we incorporated into our extension's features. First, take the user's active page and parse out relevant keywords, strings, and descriptive content. Second, evaluate this content with a LLM to determine whether this website is focused on their topics of choice. We used these key features—alongside some secondary metrics—to build out a background service worker to notice when the user was straying from their intended task, a popup system to gently nudge them back on track, and a quiz on what they've explored to test them on how much they've learned.
Challenges we ran into
As our first Chrome extension project, we encountered several challenges. Below are the primary issues we faced and our strategies for overcoming them:
Unstructured Web Extraction Our initial method for extracting web data resulted in unstructured content, requiring larger token inputs to achieve accurate responses from the LLM. To address this, we integrated a dedicated LLM (jin.ai) that cleans and streamlines the content, significantly reducing the number of tokens required.
High Token Costs Similar to the extraction issue, we needed to optimize both input and output to the LLM API to manage token costs effectively. By employing jin.ai for cleaner data and refining our prompt designs, we drastically reduced token usage while ensuring accurate responses from the LLM.
JavaScript Fudgery And probably most challengingly, we had to content with... JavaScript Imports! No seriously, we probably spent a third of our time trying to debug import statements that refused to cooperate, then had an AI fill in a huge amount of message-passing boilerplate, later chose to tore it down, and after a 03:00 AM crash course on JavaScript Chrome Extension Contexts, realize that we did need to route 1 (one) of lines of communication through the chrome api instead of importing functions. Of course by this point a branch that was too far into bodgery to be rescued had somehow gotten nearly all the features implemented, so we massaged it into shape, leaving the cleaner main branch relatively feature-poor. But, the bodge works, and for that we praise JavaScript. The giver and destroyer of projects.
Accomplishments that we're proud of
Getting a working release out in just under 24 hours was a trying but fun and fulfilling endeavor. We are most proud to have stuck it through together through some trying troubleshoot and debugging.
What we learned
Through this trial, we have absorbed an immense trove of knowledge relating to the intricacies of ECMAScript modules, the frustrations of dynamic typing, JavaScript build systems, and how to integrate LLM backends effectively.
What's next for Huginn & Muninn - Remove Distractions when Browsing
Our team has made a working release that anyone can try for themselves. Our goal is to provide an users a better browsing experience that will help them navigate the internet more intentionally. We hope that you can try it and give us your feedback!
Built With
- chatgpt
- chrome
- gemini
- javascript
- jin.ai
- webpack
Log in or sign up for Devpost to join the conversation.