News for hackers. Stuff that matters.
Re:I'm writing a new vector search SQLite Extension by bendavis381 on Friday May 03, 2024 @04:15PM (#40251878)
Very very excited by this! I saw on the repo that `sqlite-vec` will support `row in`?
Re:I'm writing a new vector search SQLite Extension by alexgarcia-xyz on Friday May 03, 2024 @04:45PM (#40252194)
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=10, but only include results where the item's rowid is included in the (...) subquery. This is a half-measure for metadata filtering, by pre-filtering which items should be considered in the KNN search.

It's currently a bit slow, and not the best solution. Eventually there will be support for metadata column in vec0 tables, which with trickery should be much faster, but isn't planned for v0.1.0.

Re:I'm writing a new vector search SQLite Extension by bendavis381 on Friday May 03, 2024 @05:40PM (#40252706)
Nice. So if I understand correctly, pre-filtering means we'd get 10 results here if there are at least 10 returned from the subquery?