Adds vector search capabilities to Orama#462
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
Awesome addition! One question: have you tested the performance? Like, how much time would it take to search among 30k vectors, 100k vectors, etc.? 🤔 I was trying to write a vector search implementation this week and it was taking about 80ms to perform a search among 30k vectors (1536 dimensions) on my MacBook M1. I was also indexing the vectors with their precalculated magnitudes like you did. That performance worried me because in production it would make the server stuck, unable to process anything else while performing a search (and would probably be slower than on my M1). I believe one way to improve the performance would be to reduce the number of dimensions. I was looking for how to do that and found this Gist: https://gist.github.com/sepans/419d413f786b27872b34. Not sure how much impact it has on the quality of the search though, but I'm leaving the link here so you can check if you want. |
|
Hey @gustavopch, thank you so much! I share your concerns; I made some tests locally and found no significant performance problems. I am sure though that we will find some edge cases and will eventually implement something similar to the gist you shared if we see that it's becoming more and more challenging to scale performances. With that being said, I'd like to highlight a couple of things:
Hope that helps :) |
This PR introduces vector search capabilities in Orama. This will be part of Orama
v1.2.0, the next major release.New Vector API
Orama adds support for Vector search by adding a new datatype:
vector[<size>]:After you create your Orama instance, you can insert and search for vectors using the new
searchVectorfunction: