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

60 points by trueduke 2 years ago on hackernews | 25 comments

itronitron | 2 years ago

is there an easy way to disable the multiplayer cursors on that page?
please that.

Cyuonut | 2 years ago

My ADHD brain prevents me from understanding anything I read when the cursors and flags dance around the FOV.

barrenko | 2 years ago

'brain' will suffice here.

psini | 2 years ago

Reader view on Firefox does the trick for me

pelagicAustral | 2 years ago

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

onemiketwelve | 2 years ago

I think the website itself has that product. But why would it be enabled on their blog... I don't know.

notnaut | 2 years ago

I bet there were a few people who said something like that the first time someone made music

baxtr | 2 years ago

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…

Dunedan | 2 years ago

Don't enable JavaScript.

omegabravo | 2 years ago

open dev tools, right click cursors.js - block this URL. refresh

BozeWolf | 2 years ago

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.

bambax | 2 years ago

I disabled JS with uBlock Origin and the site became usable again. What a bizarre idea to have this animation running by default.

linsomniac | 2 years ago

Oh... Is that why the page is suffering from the hug of death...?

aruggirello | 2 years ago

Why, just patch the page to add the famous Cursor Monster! https://simurai.com/projects/cursor-monster/

Semaphor | 2 years ago

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.

llm_trw | 2 years ago

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 | 2 years ago

Why does Google need to be afraid? They index the entire web!

infecto | 2 years ago

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.

impostervt | 2 years ago

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

firejake308 | 2 years ago

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

jillesvangurp | 2 years 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.

sbarre | 2 years ago

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.

billywhizz | 2 years ago

partykit was recently acqui-hired by cloudflare.

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

amelius | 2 years ago

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