2 ms·
Why did you bundle Redis and not use one of the many key value libraries available for Rust (or even sqlite)?
by terhechte 1y ago
Why did you bundle Redis and not use one of the many key value libraries available for Rust (or even sqlite)?
- correa_brian 1y agoFor vector search we couldn't get my results to return meaningful entries. My preference would have been to use sqlite. Any others you recommend besides sqlite with the vss extension?
- tayo42 1y agoHow are you searching with redis? Aren't vector searches usuaully just like nearest values with some distance calculation? Are they not all implemented the same way?
- terhechte 1y agoYou could split it up in two separate entities. For vector search there's a myriad of good Rust projects. I've personally used: - https://crates.io/crates/lancedb https://crates.io/crates/lancedb - https://crates.io/crates/usearch https://crates.io/crates/usearch - https://crates.io/crates/simsimd https://crates.io/crates/simsimd search and simsimd are fast and lightweight, but I'd advise to use lancedb if you're a bit new to Rust as the other two are a bit trickier to handle due to the C dependency (e.g. usearch needs Vec::with_capacity and will otherwise crash, etc). And then, you take the result of this query and can combine it with a sqlite `in` query. Or you use SQLite with a vector search extension: https://crates.io/crates/rig-sqlite https://crates.io/crates/rig-sqlite
- turnsout 1y agoCame here to post this. So curious about the choice to NOT use sqlite.
- correa_brian 1y agoWould have loved to use sqlite if I could get good results. Maybe I botched the implementation.
- alexgarcia-xyz 1y agoCreator of sqlite-vec here, happy to help debug anything if you do attempt to try out SQLite vector search again. You mentioned "VSS" in another comment, which if that was my sqlite-vss extension, I more-or-less abandoned that extension for sqlite-vec last year. The VSS extension was more unstable and bloated (based on Faiss), but the new VEC extension is much more lightweight and easy to use (custom C vector functions). The new metadata column support is also pretty nice, and can be used for push-down filtering. That being said, sqlite-vec still doesn't have ANN yet (but can brute-force ~10k's-100k of vectors quick enough), and I've fallen behind on updates and new releases. Hoping to push out a desperately-needed update this week link: https://alexgarcia.xyz/sqlite-vec/ https://alexgarcia.xyz/sqlite-vec/ And there are a few other SQLite-based vector search extensions/tools out there, so the ecosystem is general might be worth another look.
- correa_brian 1y agoHey Alex - thanks for commenting. I'd be interested in giving this all another look. Like we mentioned in the post + comments, We went with redis because that's what got us the results we wanted. I'm open to revisiting our vector storage if it spares us needing to manage a separate db process.
- correa_brian 1y agoEnded up swapping out redis for sqlite-vec. Works great. Thanks