All Topics
All Topics
Technology
Technology
Design
Design
Programming
Programming
Science
Science
News
News
Gaming
Gaming
Entertainment
Entertainment
Business
Business
Finance
Finance
Sports
Sports
Health
Health
Food
Food
Travel
Travel
Art
Art
Music
Music
Books
Books
Education
Education
Politics
Politics
Personal
Personal
No algorithm. No AI slop. No ads. Just RSS. Pro-human. Indie writers. Real journalism. Open web. Chronological. Hand toasted.

DuckDB Extension for Filtered HNSW Vector Search with ACORN-1 and Binary Quantization

By

cigrainger

2mo ago· 4 min readenCode

Summary

This article describes a DuckDB extension called duckdb-hnsw-acorn that implements ACORN-1 pre-filtered HNSW search for vector similarity search. The extension addresses two key limitations of the upstream duckdb-vss extension: broken filtered search (WHERE clauses applied after index returns results) and lack of vector compression (vectors stored as full F32). The fork fixes both issues by implementing proper filtered HNSW search with ACORN-1 pre-filtering and adding RaBitQ binary quantization for vector compression, making it more memory-efficient for high-dimensional vector data.

Key quotes

· 5 pulled
The upstream duckdb-vss extension has two limitations: Filtered search is broken. WHERE clauses are applied after the HNSW index returns results, so SELECT ... WHERE category = 'X' ORDER BY distance LIMIT 10 often returns fewer than 10 rows.
No vector compression. Every vector is stored as full F32, so the index memory scales linearly with dimensions.
This fork fixes both: implements proper filtered HNSW search with ACORN-1 pre-filtering and adds RaBitQ binary quantization for vector compression.
A DuckDB extension for vector similarity search with filtered HNSW (ACORN-1) and RaBitQ binary quantization.
Fork of duckdb/duckdb-vss.
Snippet from the RSS feed
ACORN-1 pre-filtered HNSW search for DuckDB. Contribute to cigrainger/duckdb-hnsw-acorn development by creating an account on GitHub.

You might also wanna read