[HN Gopher] Show HN: Pinbot - An extension to privately search o...
       ___________________________________________________________________
        
       Show HN: Pinbot - An extension to privately search one's browser
       history with AI
        
       Hello HN, I'm Kamil.  The past months have been filled with news
       about ChatGPT, Bard, etc. Thankfully, there are some heroic
       attempts to bring that power to the users.  I wanted to contribute
       to that effort with my side project, an extension for Chrome: it
       makes searching the history by meaning - instead of the exact words
       - possible.  This is only a proof of concept, building on the
       excellent transformers.js[0], and running entirely in the browser.
       My goal here is to explore the possibilities unlocked by a client-
       side AI.  I would love to have your feedback, to know which
       direction that project should follow!  [0]
       https://xenova.github.io/transformers.js
        
       Author : klavinski
       Score  : 78 points
       Date   : 2023-05-17 13:28 UTC (9 hours ago)
        
 (HTM) web link (getpinbot.com)
 (TXT) w3m dump (getpinbot.com)
        
       | scetron wrote:
       | Sadly not related to the 1990 NES Game
       | (https://en.wikipedia.org/wiki/Pin_Bot_(video_game))
        
         | classichasclass wrote:
         | Or the Williams original, which was the first pin I ever played
         | (at the local roller rink, no less).
        
       | visarga wrote:
       | Does it work for PDFs too? It would be amazing to find any
       | paragraph.
       | 
       | I noticed it doesn't remember tweets directly, just twitter.com
       | as url if you check the feed. It's hard to find again a tweet at
       | that location.
        
         | klavinski wrote:
         | It does not work yet for PDFs, but I agree it would be amazing.
         | Full-text search for one's library and documents!
         | 
         | Thank you for reporting the bug regarding Twitter. I will
         | investigate.
        
           | squarefoot wrote:
           | Probably a separate application extendable with plugins to
           | search different media would be a better solution than a
           | browser based one. Say an user wants to find a song suitable
           | for a certain mood while reading a book on a certain subject,
           | then one day someone could add a plugin that connects to the
           | house IoT network to choose the best lighting and aromas
           | based on the same information used by the above plugins, etc.
           | The point is that the user input might not be a text line but
           | a combination of it plus other data obtained by sensors like
           | weather, temperature, .. pretty much everything, heart rate,
           | etc.
        
         | [deleted]
        
       | jimmySixDOF wrote:
       | Hey Nice idea I like the concept as someone who does sometimes go
       | back through old history files to find that site I was on last
       | week/month and knows how frustrating it can be as an experience.
       | 
       | One question I have is about the persistence of this extension
       | when Im not using it and influence on other browsing loads like
       | if I visit a WebGPU heavy shader site will having Pinbot
       | installed drop my available framerate for example ?
       | 
       | Otherwise its a great Idea and will definitely put it on at least
       | one machine I use so thanks for putting this out into the world
       | and good luck with it !
        
         | dublinben wrote:
         | Firefox is much better at resurfacing sites that you've been to
         | before. There's even a built-in address bar search shortcut of
         | '^' which searches within just your history.
         | 
         | Chrome is obviously incentivized to push you to making a Google
         | search anytime you're trying to find something, instead of
         | looking within your browser.
        
         | klavinski wrote:
         | The extension uses an SQLite database in the Origin Private
         | File System[0]. Disabling the extension keeps the database,
         | while removing it deletes the database.
         | 
         | Regarding performance, here is how it works: the extension
         | accumulates page changes (thanks to a Mutation Observer[1], so
         | I do not have to regularly read and compare the page) for some
         | time, then checks if the sentences are in the database. Only
         | unknown sentences are converted to embeddings.
         | 
         | The extension is CPU-only currently (WebGPU support was not
         | merged yet in transformers.js), so it may be slow. I understand
         | your concern, while that is a proof of concept, I consider a
         | good performance to be vital to a good user experience.
         | 
         | [0] https://developer.chrome.com/blog/sqlite-wasm-in-the-
         | browser... [1] https://developer.mozilla.org/en-
         | US/docs/Web/API/MutationObs...
        
       | int_19h wrote:
       | This is a great idea, but one thing that I immediately wished for
       | is that it's not tied to a specific browser instance or even a
       | browser. I'd much prefer some kind of central indexing server
       | that maintains the embeddings along with metadata from all the
       | various sources and allows querying, setting retention periods
       | etc, and with extensions like this one transparently feeding data
       | into it.
        
       | [deleted]
        
       | Freebytes wrote:
       | I would like something similar to VoidTools Everything that
       | allows a person to search their own computer using AI to generate
       | answers instead. (But it should not send any information to third
       | parties such as OpenAI.)
        
         | klavinski wrote:
         | VoidTools Everything is truly an excellent tool! I have indeed
         | considered making a desktop version. It is more complex than
         | the current proof of concept, but a private one-stop shop for
         | AI search is definitely a great vision!
        
       | [deleted]
        
       | visarga wrote:
       | Does it keep history only for 2 weeks?
       | 
       | > The current extension keeps your history for only two weeks.
       | Accounts keep all your history and synchronize it across your
       | devices, while maintaining your privacy. Upcoming in a future
       | version!
        
         | klavinski wrote:
         | Yes, for the proof of concept. It is an arbitrary limit, as I
         | am not completely sure how people would use the extension: it
         | may fill the users' storage too quickly. In the future, I may
         | consider adding a counter instead (removing websites which have
         | not been visited/searched for X days).
        
           | visarga wrote:
           | After an hour my laptop was about to crash so I uninstalled
           | it. It was using 8Gb of ram out of 8.
        
             | klavinski wrote:
             | That information is very important for me, thank you.
             | 
             | Currently, to avoid computing the embedding of a sentence
             | twice, I put them in a JS Map as a cache. I will find a way
             | to empty the cache.
        
       | havaloc wrote:
       | I think you can only search pages that you visited after you
       | installed the plugin, is that correct?
        
         | klavinski wrote:
         | Currently, yes. Allowing a user to crawl his recent history
         | just after installing the extension is a great idea! I added it
         | on the Discord server.
        
       | swarfield wrote:
       | Did anyone else think Pinball?
        
       | kej wrote:
       | Any plans for a Firefox version? There are dozens of us.
        
         | klavinski wrote:
         | I targeted Chrome for the proof of concept because of its
         | market share, but to be honest, I use and prefer Firefox as my
         | default browser.
         | 
         | Manifest v3 is a remarkably hostile development environment:
         | Google knows that people block advertisements with extensions
         | and want to limit their scope. I had to adapt a lot of code,
         | and as such, making it work cross-browser would require more
         | than a few changes. But I understand your point and want Pinbot
         | to run on more browsers, especially Firefox!
        
       | super256 wrote:
       | Would be great if you could create this for bookmarks.
        
         | klavinski wrote:
         | How would you want to do it? Among the fields, have a checkbox
         | "search among the bookmarks"?
        
       | havaloc wrote:
       | I like this a lot, but I would like it to be easier to:
       | 
       | Prevent it from indexing sites I say, such as my banking website,
       | etc. I think that should be a top priority. And having a strong
       | privacy policy on the site (I know you say it's local, etc), but
       | this is pretty great and I am already enjoying it.
        
         | klavinski wrote:
         | Thank you the for the idea! I will add "allow a user-defined
         | forbidden list of websites" to the ideas on the Discord server.
         | 
         | Regarding the privacy policy, you have a point: I did not put
         | one on the website, as everything works offline, but people may
         | indeed look for one.
        
       | havaloc wrote:
       | Update. Unfortunately I noticed my Mac getting hot, and I checked
       | the activity monitor, energy impact was several thousand
       | (whatever units Apple uses). Typically energy impact of Chrome is
       | 120 or so. I removed the plugin (which also crashed once) and as
       | soon as I did, the energy use dropped back to normal.
        
         | klavinski wrote:
         | Thank you for letting me know, this information is crucial. The
         | CPU-only compatibility of transformers.js might make it too
         | slow for text-heavy websites. I will immediately study a way to
         | throttle it.
         | 
         | However, the Chrome web store review might take some time to
         | allow the update.
        
       | mrwnmonm wrote:
       | How is that private?
       | 
       | You are fetching the browsing data, push it back to your server
       | to be fed to AI, then receive queries.. right?
        
         | klavinski wrote:
         | No, that is what I find exciting! The AI model runs entirely on
         | your device, and your data is never sent anywhere. You can
         | inspect the Developer tools of the extension if you are
         | interested: it works offline!
        
           | mrwnmonm wrote:
           | Perfect
        
       ___________________________________________________________________
       (page generated 2023-05-17 23:01 UTC)