Embeddings advice

Hello,
I have a two data sets, one rather small 500 units, each around 850 characters, and a larger one, 2500, each around 750 chars each.
I created indexed the embeddings for both data sets using text-search-ada-doc-001 and embedding the query with text-search-ada-query-001. These are 1024 dimensions embeddings.
The results are good in both cases, however for the smaller set is rather fast 5-7 seconds, for the larger one around 15-20. I guess it goes up linearly as i am doing the dot product using memory (in a ruby on rails app )
I would like to ask if anyone has experience with this and would like to share some advice improving this in any way.
One option i am considering is storing them in a milvus database and hopefully get better timings.
Second option would be to find a faster way of calculating the dot products for each query.

I would also be curios to know if for this sizes of my texts would i benefit from using babage or curie for larger dimensions 2000 or 4000, or is it not worth the extra overhead, considering the timings would also increase doing this, monetary part aside ?

There’s also FAISS which is open source. I’ll be experimenting with FAISS soon.

have read a bit about it but don’t know exactly the flow, will keep an eye on your youtube :smiley:

Okay I wrote a thing that should help. It is not optimized but it works!

2 Likes

The home page says file not found and does not show the github