Hacker News new | ask | show | jobs
Show HN: MiniSearch, a minimalist search engine with integrated browser-based AI (huggingface.co)
17 points by felladrin 976 days ago
Hey everyone!

I’m excited to announce the release of my last project, MiniSearch.

I admire Perplexity.ai, Phind.com, You.com, Bing, Bard and all these search engines integrated with AI chatbots. And as a curious developer, I took the chance and created my own version.

Using Web-LLM and Transformers.js to provide browser-based text-generation models on desktop and mobile, I built a minimalist self-hosted search app on which an AI analyses the results, comments on them and responds to your query summarising the info. In the backend, it still queries a real search engine, but besides that, there's no other remote connection happening.

For running in the browser and on mobiles, lightweight models are required, so we can't expect them to give stellar answers, but there are a few advantages of using this over the services as mentioned earlier:

- Availability: The AI will always be available and respond with the maximum available speed from the device. - Privacy: Besides the queries that go anonymously to the actual search engine, nothing else leaves your device. - No ads/trackers: Get the relevant links clean and fast without being tracked. - Customization: As it's open-source, you can fork it and re-style it any way you want.

You can get started with MiniSearch by cloning the repository from GitHub (https://github.com/felladrin/MiniSearch) and running it locally or by using it online on this HugginFace Space: https://felladrin-minisearch.hf.space (Alternative Space address: https://huggingface.co/spaces/Felladrin/MiniSearch)

You can even set it as your browser's address-bar search engine using the query pattern `https://felladrin-minisearch.hf.space/?q=%s` (where your query replaces %s).

At the moment of this writing, the app is using TinyLlama and LaMini-Flan-T5 models, but there's an option to try to use larger models like Mistral 7B (not recommended, though, as it could be slow and break the fast-search experience).

That's what I had to share. Thanks for reading!

Your feedback means the world to me! Please don't hesitate to reach out if you have any questions or suggestions or want to learn more.

2 comments

To anyone trying this, the first search is slow. After the first load, it gets much better!

> - Privacy: Besides the queries that go anonymously to the actual search engine, nothing else leaves your device.

This is one of the main problems I have with my current search engine. The AI features partly use APIs from companies I really don't trust with my data (e.g., OpenAI).

Regarding the actual search engine: the server appears to use DuckDuckGo on the backend, which would be Bing. If I'd run this, I'd probably try to point it at a searx-ng instance or something.

Woah! Wish I knew about searx-ng before! Thanks for sharing. I’ll give it a try!
It's now using searx-ng!
That's cool! Sad to see your post didn't get much traction...
Awesome project. I have it installed using Docker. Is there a way of having just show the links, instead of waiting for the details to load. Seems that this would make it much faster. Is there an option to choose an alternative search engine. Edit: Ok. Found it in the code. `https://links.duckduckgo.com/d.js?q=${query}&o=json&vqd=${vq...`
Ah! It was first implemented writing only the summary of the link results, as you mentioned, but I noticed the responses were not as good as they are now. Summarizing each link and then rewriting the response based on them made a noticeable difference for that small-sized model. But I'll take note of that, as it can indeed be added as a configurable setting.

Regarding the search engine, currently, there's no way to use a different one. At that point, the only search engine I knew could work was DuckDuckGo, but after the suggestion from @hackideiomat in the comments, I already started looking into adding it as a customization.

Thanks for your feedback!