Get the latest tech news

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


PartyKit now includes a vector database and access to an embedding model. Here’s a guide on how to use them to build a search engine.

Semantic search like this used to be hard to build, and now get it for free by indexing our documents as embeddings and storing them in a vector database. If you’ve cloned the braggoscope-search repo and followed along by creating the vector database, and populating it with the indexing step, you can even do this when developing locally: The final step is to wire up an input box on your website to call the query API, and display results in a dropdown using your favourite framework.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Code

Code

Photo of lines

lines

Photo of Vectorize

Vectorize

Related news:

News photo

Mesh Spreadsheet: A data and code editor that feels like a spreadsheet

News photo

What do I think about Lua after shipping a project with 60k lines of code?

News photo

Go: Sentinel errors and errors.Is() slow your code down by 3000%