The `pg_embedding` extension for Postgres and LangChain offers a 20x speed boost for graph-based approximate nearest neighbor search while maintaining 99% accuracy, outperforming the popular IVFFlat indexing technique used in pgvector. The new extension uses the Hierarchical Navigable Small Worlds (HNSW) index to unlock new levels of efficiency in high-dimensional similarity search. pg_embedding can be easily implemented in applications, and prior knowledge of vector indexes is optional. Its performance is comparable to IVFFlat but with better speed and accuracy. The choice between `pg_embedding` and pgvector with IVFFlat depends on specific use cases and requirements, including memory constraints, search speed, accuracy, distance metrics, and index construction speed.