HN.zip

Show HN: DuckDB community extension for prefiltered HNSW using ACORN-1

Hey folks! As someone doing hybrid search daily and wishing I could have a pgvector-like experience but with actual prefiltered approximate nearest neighbours, I decided to just take a punt on implementing ACORN on a fork of the DuckDB VSS extension. I had to make some changes to (vendored) usearch that I'm thinking of submitting upstream. But this does the business. Approximate nearest neighbours with WHERE prefiltering.Edit: Just to clarify, this has been accepted into the community extensions repo. So you can use it like:```INSTALL hnsw_acorn FROM community;LOAD hnsw_acorn;```

50 points by cigrainger - 4 comments

4 Comments

swaminarayan [3 hidden]5 mins ago
Does your method work better than standard ANN when filters are very strict—and how does it affect speed vs accuracy?
wolfgangK [3 hidden]5 mins ago
Nice ! My most pressing request for VSS would be efficient binary vectors : is this on the table ?
cigrainger [3 hidden]5 mins ago
I haven't given binary vectors a lot of thought, but I'm exploring RaBitQ[1].

[1] https://arxiv.org/abs/2405.12497

esafak [3 hidden]5 mins ago
Please upstream it.