Using Vectorize to build an unreasonably good search engine in 160 lines of code

60 points by trueduke 1 year, 7 months ago on hackernews | 25 comments
is there an easy way to disable the multiplayer cursors on that page?
please that.
My ADHD brain prevents me from understanding anything I read when the cursors and flags dance around the FOV.
'brain' will suffice here.
Reader view on Firefox does the trick for me

pelagicAustral | 1 year, 7 months ago

What can compel a person to think something like this could be a good idea?

onemiketwelve | 1 year, 7 months ago

I think the website itself has that product. But why would it be enabled on their blog... I don't know.
I bet there were a few people who said something like that the first time someone made music
What a mess. It’s basically impossible to use the site now.

I guess it looked kinda nice with 1-2 visitors per minute but now…

Don't enable JavaScript.
open dev tools, right click cursors.js - block this URL. refresh
tbh I think it is very funny. Sent it to a few friends because of that. Was chased by a cursor for a minute and then did the same to him/her. Childish, but funny.

It only works well when the site is busy. The frontpage of HN makes it work very very well.

No idea what the article is about though.

I disabled JS with uBlock Origin and the site became usable again. What a bizarre idea to have this animation running by default.
Oh... Is that why the page is suffering from the hug of death...?

aruggirello | 1 year, 7 months ago

Why, just patch the page to add the famous Cursor Monster! https://simurai.com/projects/cursor-monster/
Block this: https://cursor-party.labs.partykit.dev/cursors.js

Unlike the recently frontpaged page, this one loads the annoying effects as 3rd party JS, so uMatrix automatically blocked it for me.

I had a discussion at work today about completely replacing the old search engine with vector embeddings because they work so well.

I think google needs to be very afraid in the coming few years because this use of AI is relatively cheap to run, simple to deploy and the models are small enough that you can build one customized based on your personal ranking of several thousand pieces of text.

temp20240604 | 1 year, 7 months ago

Why does Google need to be afraid? They index the entire web!
1) They work really well but not in all the cases and most likely the better approach is some augment between the two. OpenSearch/Elasticsearch already include hybrid approaches.

2) The moat is having a snapshot of the web and being able to search through it efficiently.

I'm confused about the "AI" part. Are vector databases, in themselves, AI? Are embeddings?

firejake308 | 1 year, 7 months ago

Embeddings are generated by neural networks, so yes, I would consider them as AI

jillesvangurp | 1 year, 7 months ago

Only indirectly. A lot of popular models used for generating vectors are nowhere near as smart as LLMs. Also, the vectors themselves are not machine learning models. They are just lists of numbers intended for comparing to other lists of numbers. Typically using some similarity algorithm like cosine similarity.

Vector search embeddings are only as good as the models you use, the content you have, and the questions you ask.

This is a bit of a pitfall when you use them for search. Especially if you have mobile users because most of them are not going to thumb in full sentences in a search box. I.e. the questions the ask are going to be a few letters or words at best and not have a lot of context. And users will still expect good results. Vector search is not great for those type of use cases because there just isn't a whole lot of semantics in these short queries. Sometimes, all you need is just a simple prefix search.

So under the hood this relies on Cloudflare, if I understand it? Is it making calls to a CF API in the cloud, or running locally?

That part isn't clear to me.

partykit was recently acqui-hired by cloudflare.

https://blog.cloudflare.com/cloudflare-acquires-partykit

Unreasonably good maybe. But then you'll hit a brick wall when you want something slightly better.