Inspiration
I was inspired by MongoDB’s documentation, which uses an AI LLM assistant capable of providing interactive explanations and answering questions. That made me curious, what if this kind of intelligent assistant could be applied to all coding documentations? That’s how Salvadorii was born.
What it does
First, the extension downloads the Gemini Nano API if the user doesn’t have it, allowing the extension to run completely offline. Second, when a user opens a documentation page, the extension scrapes the page to gather knowledge data. Third, the scraped data is chunked and stored in the extension’s local database for efficiency. Fourth, these chunks are embedded for semantic search. Finally, when the user types a query, the system retrieves the relevant context from the embeddings and sends it to the model for prompting and response generation. The extension can also delete old chunks and fetch new knowledge automatically when the user navigates to a different page.
How we built it
During the scraping process, we use the Chrome API to get the current active page and LangChain to handle both data scraping and chunking. The scraped data is stored locally using the Chrome Extension API. For embeddings, we use Xenova/bge-base-en-v1.5 from Hugging Face, which runs fully offline. The embeddings are kept in memory, a structure we call the VectorStore, for querying user inputs and retrieving contextual information. Finally, we use the Prompt API, which also runs offline, to serve as the AI assistant that interacts with the user.
Challenges we ran into
Working solo on this project was quite challenging, especially since I’m stronger in AI and backend development than frontend or UI design. However, I overcame this by continuously learning and referring to documentation, with the help of Salvadorii itself, which was still in prototype form at the time!
Accomplishments that we're proud of
I’m proud that the extension works exactly as intended, it can function across any documentation and runs fully offline. Building a system that doesn’t require paid API servers or internet connectivity was a huge milestone for me.
What we learned
This was my first RAG (Retrieval-Augmented Generation) project, and I built it because I genuinely needed such a tool myself. I learned how to properly handle chunking, embedding, and prompting to get accurate contextual responses. At one point, I encountered issues with irrelevant answers, but after refining the prompt structure, the results improved significantly. I was also amazed to discover that LLMs could run completely offline with Chrome’s built-in AI, breaking my previous assumption that AI applications always require expensive infrastructure.
What's next for Salvadorii
Currently, the embeddings are stored only in memory, and the Chrome Extension database doesn’t yet support persistent object storage for them. If we achieve persistent embeddings, the extension’s efficiency will improve since users won’t need to re-embed data each time they reopen the app. I also plan to improve the UI/UX to make Salvadorii more seamless and user-friendly.
Built With
- gemini-nano
- huggingface
- langchain
- react
- typescript
Log in or sign up for Devpost to join the conversation.