Closed paulbricman closed 3 years ago
Yes indeed rust-sbert and ngt-rs are meant to be used in tandem for semantic search. Basically all you have to do is to push the sbert embeddings (vectors of size 512) into an NGT index (you can check the doc for that but it's pretty straightforward).
Thanks @lerouxrgd for the quick reply! I'll look into it and comment a link to a combined implementation here soon.
Here is the really messy result: https://github.com/Psionica/Dual/blob/933e2f2e2a3ea9d401f32449c2d644d9e7766dd5/rust-backend/src/sbert_test.rs
Hi @cpcdoy,
I was wondering whether there are any plans to also port some of the auxiliary code around the models from sentence-transformers, like semantic_search. This is probably one of the main use cases of both libraries, so many people might be interested in it in the future.
edit: I saw a contributor also works on https://github.com/lerouxrgd/ngt-rs which should do the trick. @lerouxrgd, an example of combining rust-sbert and ngt-rs would be really really useful for this!