Neon x LangChain: HNSW in Postgres with pg_embedding
Neon has collaborated with LangChain to release the pg_embedding extension and PGEmbedding integration in LangChain for vector similarity search in Postgres. The new implementation, PGEmbedding, is faster than existing vector stores due to its use of the Hierarchical Navigable Small World (HNSW) index graph-based approach to indexing high-dimensional data. This results in a time complexity of O(log(rows)), compared to search with IVFFlat optimal parameters which often has a time complexity of O(sqrt(rows)). PGEmbedding performs 20x faster for 99% accuracy, making it an attractive option for scalable LLM applications. However, the choice between PGEmbedding and other vector stores should be informed by the specific demands of your application.
Company
LangChain
Date published
July 12, 2023
Author(s)
-
Word count
648
Hacker News points
None found.
Language
English