by youngbum · 2y ago · 0 comments
We’ve also added vector search to our product, which is really useful.
OpenAI’s official examples of embedding search use cosine similarity. But here’s the cool part: since OpenAI embeddings are unit vectors, you can just run the dot product instead!
DuckDB has a super fast dot product function that you can use with SQL.
In our product, we use duckdb-wasm to do vector searches on the client side.
Curious, what is your product?
Edit: Nevermind, your recent post explained it quite well: https://news.ycombinator.com/item?id=40520073