Postgres extension for vector similarity search
Top 57.2% on sourcepulse
This PostgreSQL extension provides Hierarchical Navigable Small World (HNSW) indexing for efficient vector similarity search. It's designed for developers and data scientists working with high-dimensional vector data within PostgreSQL, enabling fast nearest neighbor searches for applications like recommendation systems and semantic search.
How It Works
The extension implements the HNSW algorithm, a graph-based approach for approximate nearest neighbor search. It constructs a multi-layered graph where each layer is a subset of the previous one. Searches start at the top layer and navigate downwards, efficiently converging on the most similar vectors. This method offers a strong balance between search speed and accuracy, outperforming brute-force methods.
Quick Start & Requirements
CREATE EXTENSION embedding;
within a PostgreSQL database.dims
, m
, efconstruction
, and efsearch
parameters.Highlighted Details
m
, efconstruction
, efsearch
) for performance trade-offs.Maintenance & Community
Neon is no longer committing to pg_embedding
as of September 29, 2023. Support is maintained for existing users, with a strong recommendation to migrate to pgvector
. Migration instructions are available in the Neon documentation.
Licensing & Compatibility
The extension's license is not explicitly stated in the README. Compatibility with commercial or closed-source applications should be verified.
Limitations & Caveats
Neon has ceased active development and recommends migration to pgvector
. While existing users will be supported, new development and feature enhancements are unlikely.
1 year ago
1 week