Pinecone Introduces Open Source Vector Search Extension for PostgreSQL
Pinecone has announced pg_pinecone, an open source PostgreSQL extension that adds vector search to existing pgvector columns without requiring a Pinecone account. Its native engine uses an IVF index with RaBitQ quantization and applies filters during search rather than after candidate retrieval, addressing a limitation of pgvector's HNSW approach for selective queries. By Renato Losio
Pinecone has unveiled pg_pinecone, an open-source PostgreSQL extension that enables vector search capabilities within the existing pgvector columns without necessitating a Pinecone account. Unlike pgvector's HNSW approach, which retrieves a large set of candidates before filtering, pg_pinecone's native engine applies filters during the search process, yielding faster results even with selective queries.
Harshita Daddala, staff product manager at Pinecone, and Anthony Mahanna, software engineer at Pinecone, explain that the extension indexes the vector columns already present in the database. Instead of using a graph, it stores a compact summary of each vector, ensuring a fast search while maintaining a small memory footprint. The index is built swiftly due to its usage of the IVF index and RaBitQ quantization, which compresses vectors to a single bit per dimension.
Compared to traditional pg_vector, which applies filters post-retrieval of nearest neighbors, pg_pinecone's approach allows for more accurate and efficient searches. For instance, with 10% of rows matching a filter, pg_pinecone achieves 1.000 recall in 12.3 milliseconds, whereas HNSW with iterative scans only reaches 0.920 recall in 5.9 milliseconds.
The native engine adjusts its filtering strategy based on selectivity, storing the value of each filter column next to each row's RaBitQ code. At build time, it counts how many rows contain each value. The extension supports existing pgvector indexes and also offers an optional remote engine that can offload search to Pinecone's managed service without requiring changes to SQL queries.
Pinecone CEO and founder Adam Hevenor remarks that filtering during search without leaving Postgres is a valuable combination. The extension's performance is based on Pinecone's own benchmarks, which have not been independently verified yet. However, it shows promise, with a 136 MB index for one million 768-dimensional vectors, as opposed to 2 GB for pgvector HNSW using half-precision vectors.
Rewritten by urgent.news; may contain errors — check the original.
Source: infoq.com