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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Sqlite-vec: Work-in-progress vector search SQLite extension that runs anywhere

314 点作者 brylie9 个月前

15 条评论

alexgarcia-xyz9 个月前
Author here, happy to answer any questions! Been working on this for a while, so I&#x27;m very happy to get this v0.1.0 &quot;stable&quot; release out.<p>sqlite-vec works on MacOS, Linux, Windows, Raspberry Pis, in the browser with WASM, and (theoretically) on mobile devices. I focused a lot on making it as portable as possible. It&#x27;s also pretty fast - benchmarks are hard to do accurately, but I&#x27;d comfortable saying that it&#x27;s a very very fast brute-force vector search solution.<p>One experimental feature I&#x27;m working on: You can directly query vectors that are in-memory as a contiguous block of memory (ie NumPy), without any copying or cloning. You can see the benchmarks for that feature here under &quot;sqlite-vec static&quot;, and it&#x27;s competitive with faiss&#x2F;usearch&#x2F;duckdb <a href="https:&#x2F;&#x2F;alexgarcia.xyz&#x2F;blog&#x2F;2024&#x2F;sqlite-vec-stable-release&#x2F;index.html#benchmarks" rel="nofollow">https:&#x2F;&#x2F;alexgarcia.xyz&#x2F;blog&#x2F;2024&#x2F;sqlite-vec-stable-release&#x2F;i...</a>
评论 #41144962 未加载
评论 #41143562 未加载
评论 #41143590 未加载
simonw9 个月前
Lots more details in Alex&#x27;s blog post here: <a href="https:&#x2F;&#x2F;alexgarcia.xyz&#x2F;blog&#x2F;2024&#x2F;sqlite-vec-stable-release&#x2F;index.html" rel="nofollow">https:&#x2F;&#x2F;alexgarcia.xyz&#x2F;blog&#x2F;2024&#x2F;sqlite-vec-stable-release&#x2F;i...</a>
评论 #41140003 未加载
Cieric9 个月前
I feel like I&#x27;ve touched a lot of things where something like this is useful (hobby projects). In my case I&#x27;ve done a recommendation engine, music matching (I specifically use it for matching anime to their data), and perceptual hash matching.
评论 #41140581 未加载
评论 #41141690 未加载
cotega9 个月前
I absolutely love this, great work! For those that might find it useful, I created a Python notebook that shows how to extend this to perform Hybrid Search (Vector + BM25 based Full Text search) <a href="https:&#x2F;&#x2F;github.com&#x2F;liamca&#x2F;sqlite-hybrid-search">https:&#x2F;&#x2F;github.com&#x2F;liamca&#x2F;sqlite-hybrid-search</a>
pjot9 个月前
I’ve done something similar, but using duckDB as the backend.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;patricktrainer&#x2F;duckdb-embedding-search">https:&#x2F;&#x2F;github.com&#x2F;patricktrainer&#x2F;duckdb-embedding-search</a>
评论 #41140484 未加载
bodantogat9 个月前
This sounds useful (I do a lot of throw-away text analysis on my laptop)
评论 #41140357 未加载
1yefuwang19 个月前
Hi, nice work. I write a similar vector search extension <a href="https:&#x2F;&#x2F;github.com&#x2F;1yefuwang1&#x2F;vectorlite">https:&#x2F;&#x2F;github.com&#x2F;1yefuwang1&#x2F;vectorlite</a> inspired by sqlite-vss using C++17 and hnswlib.<p>I&#x27;d like to do a benchmark to compare it with sqlite-vec, but I guess it is not a fair comparison given that sqlite-vec uses brute-force only.<p>One thing I&#x27;d recommend is to include recall rate in your benchmark data.<p>Brute force approach is a good starting point but doesn&#x27;t scale with serious production workload.
dang9 个月前
Related:<p><i>I’m writing a new vector search SQLite Extension</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=40243168">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=40243168</a> - May 2024 (85 comments)
deepsquirrelnet9 个月前
I love this. I know how much work addressing the dependencies must be, but you’re really attacking the right problems. Looking forward to trying this out with my project.
huevosabio9 个月前
Been using this for video games and it&#x27;s absolutely awesome. Alex, the author, is also great and very approachable.<p>I&#x27;ve been looking for something like this for a while.
评论 #41146137 未加载
nattaylor9 个月前
I have a use case for this that I&#x27;m excited to try. I&#x27;m glad AlexG has put so much effort into this. Even the docs are pretty good!<p>My pyenv python3.12.2&#x27;s sqlite won&#x27;t load extensions even after installing with what I think are the correct command line flags. Argh!<p>My brew installed python3.12&#x27;s sqlite will load extensions though, so I can proceed.
mic479 个月前
Nice. Been waiting for this release to try it out.
pietz9 个月前
Is this also what turso uses in their &quot;AI feature&quot;?
评论 #41140447 未加载
haolez9 个月前
What&#x27;s the maximum vector size?
评论 #41141454 未加载
fsndz9 个月前
I love this. I am currently doing this tutorial of RAG where the vector DB is simply postgreSQL and pgvector. I guess I can try to reproduce that with SQLite and sqlite-vec now ! Awesome: <a href="https:&#x2F;&#x2F;www.lycee.ai&#x2F;courses&#x2F;91b8b189-729a-471a-8ae1-717033c77eb5&#x2F;chapters&#x2F;a8494d55-a5f2-4e99-a0d4-8a79549c82ad" rel="nofollow">https:&#x2F;&#x2F;www.lycee.ai&#x2F;courses&#x2F;91b8b189-729a-471a-8ae1-717033c...</a>
评论 #41144609 未加载