3 ms·
Yes it is! Sorry for not following up there. Actually, when I first read that ticket, it started me down the rabbit-hole of "how can I make sqlite-vss" better,
by alexgarcia-xyz 2y ago
Yes it is! Sorry for not following up there. Actually, when I first read that ticket, it started me down the rabbit-hole of "how can I make sqlite-vss" better, which eventually turned into "I should make sqlite-vec." So thanks for helping me go down this path!
With sqlite-vec's builtin binary quantization, you should be able to do something like:
CREATE VIRTUAL TABLE vec_files USING vec0 (
contents_embedding bit[1536]
);
INSERT INTO vec_files(rowid,contents_embedding)
VALUES (
(1, vec_quantize_binary( /* 1536-dimension float vector here*/))
)
- ComputerGuru 2y agoHey, you’re welcome! Looking forward to trying this at some point. Sooner if rust bindings are available, later if I have to contribute them. My embedding is already binary, presumably I can bind a blob instead of the call to vec_quantize_binary?
- alexgarcia-xyz 2y agoYup, you'll be able to bind blobs, you'll currently have to do use vec_bit(?) which is a bit awkward, but it works!