TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Faster semantic search with HNSW indexes in pgvector

7 点作者 pashkinelfe超过 1 年前

2 条评论

pashkinelfe超过 1 年前
Pgvector 0.5.0 got HNSW indexes that is much faster for AI application than IVF in most cases. We measured pgvector performance in Supabase and present recommendations on its efficient usage.<p>- HNSW preserves index quality even after massive table updates and doesn&#x27;t need to be rebuilt<p>- HNSW search is several times faster than IVF for high accuracy. For lower accuracy likely even more.<p>- Pgvector&#x2F;HNSW became faster than qdrant<p>- IVFflat build time decreased two-times in 0.5.0<p>- HNSW index could be built incrementally, you don&#x27;t need to add all embeddings before index build
egorr超过 1 年前
hey hn, supabase engineer and blogpost coauthor here.<p>we made our first experiments with HNSW index for vector search and noticed about 5 times better performance compared to IVF with high dimensional vectors, such as embedding-ada by OpenAI.<p>we haven’t included results for smaller models like gte-small (384d) just yet, but we’re currently running those benchmarks as i write this comment. in our smoke tests the difference in performance isn’t as pronounced, but it still appears promising, suggesting that switching to HNSW could be beneficial for the majority of use cases.<p>oh there have been improvements with IVF as well, with index building times decreasing by roughly half. So, if you’re considering sticking with IVF, it’s advisable to upgrade to the latest version for these enhancements.<p>you can find extended version of ann testing framework in the GitHub [0]. its just the original one with a lil bit of code for pgvector and vecs lib.<p>[0] <a href="https:&#x2F;&#x2F;github.com&#x2F;egor-romanov&#x2F;vector-db-benchmark&#x2F;tree&#x2F;feat&#x2F;vecs">https:&#x2F;&#x2F;github.com&#x2F;egor-romanov&#x2F;vector-db-benchmark&#x2F;tree&#x2F;fea...</a>