Making use of Alpes bit embedding in a vector database
As part of the Ozonetel Hackathon for WhatsApp and generative AI, we have released a couple of examples to create embeddings using AlpesAI and use them in vector DBs.
This will allow you to create a semantic search for your own knowledge bases. An example of a semantic search on Wikipedia data hosted locally is here, https://speech-kws.ozonetel.com/wiki/
We have given three examples:
Direct with numpy(as it is bit embedding, you can easily serve 1-3 million embeddings in 1GB RAM). This will be the easiest way in which you can start using the embeddings as there are no dependencies other than numpy. You can support full CRUD on your embeddings as its direct numpy manipulations.
Using Faiss. If you have lot more embeddings but dont want to deal with a vector DB you can just use Faiss. This will give you the advantage of having an index which can serve results fast, but every time you add or delete data you will have to rebuild the index.
Using a vectorDB: There are a host of vector DBs you can choose from and each have their pros and cons. We are giving an example with Milus because Milvus supports bit embeddings natively leading to memory storage savings. You cana dapt this code to fit to your vector DB of choice.
If you are interested in trying this out, reach out to support@kookoo.in and we will setup API access for you to start embedding your documents.