Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
alexgarcia-xyz
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
5 ms
·
1.
▲
by
alexgarcia-xyz
11mo ago
Official docs for this endpoint: https://docs.github.com/en/rest/meta/meta?apiVersion=2022-11...
2.
▲
by
alexgarcia-xyz
1y ago
Creator 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 ext
3.
▲
by
alexgarcia-xyz
2y ago
I really dig more content about how vector databases/tools handle problems like this! In sqlite-vec, there's only a flat brute-force index (though DiskANN/IVF will be coming soon). But we do have a concept of partition keys[0
4.
▲
by
alexgarcia-xyz
2y ago
will fix up those links this weekend, thanks for pointing it out! the cvec0.all file can be ignored. i was debugging a issue and uploaded a mscv compiled version as that, but its not part of the official release. prefer the tar.gz version a
5.
▲
by
alexgarcia-xyz
2y ago
vec0 virtual tables have a hard-coded max of 8192 dimensions, but I can raise that very easily (I wanted to reduce resource exhaustion attacks). But if you're comparing vectors manually, then the `vec_distance_ls()` and related functio
6.
▲
by
alexgarcia-xyz
2y ago
Really curious to hear about what kind of music embedding models/tools you used! I've tried finding some good models before but they were all pretty difficult to use
7.
▲
by
alexgarcia-xyz
2y ago
You can generate "text embeddings" (ie vectors) from your text with an embedding model. Once you have your text represented as vectors, then "closest vector" means "more semantically similar", as defined by the
8.
▲
by
alexgarcia-xyz
2y ago
Author here, happy to answer any questions! Been working on this for a while, so I'm very happy to get this v0.1.0 "stable" release out. sqlite-vec works on MacOS, Linux, Windows, Raspberry Pis, in the browser with WASM, and
9.
▲
by
alexgarcia-xyz
2y ago
No, libsql added custom vector search directly into their library, while sqlite-vec is a separate SQLite extension. The libsql vector feature only works in libsql, sqlite-vec works in all SQLite versions. The libsql vector feature works kin
10.
▲
by
alexgarcia-xyz
2y ago
Because of SQLite. The SQLite official WASM build is a very complicated emscripten build, so if you want to write a SQLite extension for the WASM build, you need to statically compile it into the complex emscripten build process. This is ha
11.
▲
by
alexgarcia-xyz
2y ago
This isn't a complete extension, as mentioned in the README several times. I wanted a poc to use the new jiff library in SQL functions to test if it works. It did, so I put it in a repo for others to see. Definitely not production read
12.
▲
by
alexgarcia-xyz
2y ago
I think so - I wrote my own Rust FFI bindings for SQLite extensions, and I tried to make it as fast as possible, but a "hello world" extension was still 10-15% slower in Rust than C[0]. That being said, it depends what the extensi
13.
▲
by
alexgarcia-xyz
2y ago
Agreed, though the topic of timezone+DST support has come up a few times in the SQLite forums, and the SQLite team has never expressed much interest in it. Which I don't blame them, they would need to write it from scratch in C (for li
14.
▲
by
alexgarcia-xyz
2y ago
Even though it's written in Rust, you can still use it in other languages like Python or Node.js. It compiles to a shared library file, which most SQLite clients support with `.loadExtension()` or another similarly named method. This e
15.
▲
by
alexgarcia-xyz
2y ago
Ya you'll be able to do things like: SELECT rowid, distance FROM vec_items WHERE rowid IN (SELECT rowid FROM ...) AND title_embeddings MATCH ? ORDER BY distance LIMIT 10 ^ This would do a KNN style query, k=
16.
▲
by
alexgarcia-xyz
2y ago
Ya I'll put a license soon, will be MIT
17.
▲
by
alexgarcia-xyz
2y ago
Internally vectors (at least float vectors) get converted to float * arrays, where the vectors lengths are manually checked. If you provide a vector in JSON form, then it parses that JSON into a float * array. Vectors must be the same lengt
18.
▲
by
alexgarcia-xyz
2y ago
Ya I worded this part awkwardly - I was hinting that querying a vector index and joining with metadata with sqlite + sqlite-vec (in a single SQL join) will probably be faster than other methods, like txtai, which do the joining phase in a h
19.
▲
by
alexgarcia-xyz
2y ago
Yup, you'll be able to bind blobs, you'll currently have to do use vec_bit(?) which is a bit awkward, but it works!
20.
▲
by
alexgarcia-xyz
2y ago
re distance functions: current L2+cosine for float/int8 vectors, and hamming for bit vectors. There are explicit vec_distance_l2()/vec_distance_cosine()/vec_distance_hamming() SQL functions, and the vec0 table will implicitly
21.
▲
by
alexgarcia-xyz
2y ago
Ya dynamically linking extensions in WASM would be amazing, but really hard to see how it would work. DuckDB was able to figure it out[0], but I struggle to see how it would work for SQLite. Though if anything, I think your library would ma
22.
▲
by
alexgarcia-xyz
2y ago
I plan to have v0.1.0 in about a month or so! Definitely will include a ton of docs and a quickstart guide. There's an undocumented pip package "sqlite-vec" that you might be able to use now, if you wanted to call it from you
23.
▲
by
alexgarcia-xyz
2y ago
Went back, and forth a lot, but the short version: 1. Having directly access to SQLite's C APIs is really useful, especially for BLOB I/O and some rarely-used APIs that sqlite-vec uses and aren't available in some SQLite/
24.
▲
by
alexgarcia-xyz
2y ago
It will! I've neglected that project a bit, but in some of the alpha builds I was able to get WASM to work, I just have documented or blogged about it yet. SQLite extensions in WASM written with sqlite-loadable-rs are a bit large, most
25.
▲
by
alexgarcia-xyz
2y ago
Only public SQLite APIs! So no need to append to amalgamation. I'm a big fan of your wazero SQLite bindings! I actually plan on providing 1) CGO bindings to sqlite-vec and 2) a custom WASI build sqlite-vec that can be used in go-sqlite
26.
▲
by
alexgarcia-xyz
2y ago
Benchmarking for this project is a bit weird, since 1) only linear scans are supported, and 2) it's an "embeddable" vector search tool, so it doesn't make a lot of sense to benchmark against "server" vector dat
27.
▲
by
alexgarcia-xyz
2y ago
Thanks for the kinds words! Really cool to hear that people were able to use sqlite-vss, lol.
28.
▲
by
alexgarcia-xyz
2y ago
Hey really cool to see re sqlite-vss+langchain! You could try a langchain integration now, there's an (undocumented) sqlite-vec pypi package you can install that's similar to the sqlite-vss one. Though I'd only try it for dev
29.
▲
by
alexgarcia-xyz
2y ago
As of now for this beta release not really, but after v0.1.0 is released, will definitely have contributing guides + issues that people could tackle!
30.
▲
by
alexgarcia-xyz
2y ago
Oooh I haven't thought of seperating the SQLite stuff and the vector search stuff. Good idea, will keep that in mind!
More ›