6 ms·
Ask HN: Alternatives to Vector DB?
A while back I was looking for a vector database that would work across Windows / Mac / Linux platforms. Some of the options required specific processors like Intel. I am curious if there are any alternatives to a Vector DB that can run cross platform and are easy to setup?
- bschmidt80 2y agoCan I ask what the use case is? Always fascinated to hear why people are using vector DBs, especially outside AI embeddings
- tmaly 2y agoI wanted something simple and easy to setup for RAG
- bschmidt80 2y agoLlamaIndex VectorStoreIndex defaults to in-memory which allows you to get up and running very quickly - had pretty great experiences with their TS repo and even contributed a little to it. fromDocuments -> VectorStoreIndex -> asQueryEngine it will be in-memory. Easily add pgvector as other recommend here when/if you need to persist embedded data.
- codingmoney 2y agoYou can try Milvus, Weaviate, or Qdrant. They all support multiple platforms and are relatively easy to set up.
- miZero0 2y ago+1 for Weaviate. It’s free, open source, cross platform and has a very active developer community with good docs/events/hackathons. Really friendly people to deal with in their community Slack too.
- romanhn 2y agoThere's Postgres with pgvector extension.
- dghlsakjg 2y agoThis would be my vote. There are probably more performant options, but for universality, you are best off going with a popular SQL DB that has vector extensions or support. SQLLite is another option if you want even more portability.
- muzani 2y agopgvector is very performant for tiny scale, especially if they don't expect to update the knowledge base constantly and don't care about millisecond differences in speed. It's also probably the only major vector db with ACID. And it's substantially cheaper than many others. I haven't looked into SQLite and such, but many of the other SQL type of options were not good last I checked. And it takes quite a bit of effort to dig through them because all of these will show research that puts themselves as the best lol.
- redskyluan 2y agoHow is pg performed on windows? Never tried before
- tmaly 2y agoI have used pg years ago on windows when it was like version 7, so I suspect it still works well.
- bilater 2y agoyup keep it simple. hybrid search on supabase with keyword + pg vector. use a good embedding model with inner product (not cosine so its faster). there was a good article about learnings in this space recently here https://news.ycombinator.com/item?id=43299659 https://news.ycombinator.com/item?id=43299659
- 2y ago
- schreiaj 2y agoSQLite via libsql is my go to for lightweight stuff. Has vector embedding columns out of the box.
- tmaly 2y agoThanks! I had no idea this existed.
- abraxas 2y agopostgres pgvector is a decent implementation by now which is likely available in most setups that postgres will run on. You can also use faiss if you want it all in memory at all times and have the RAM to support it. What's your use case and the volume of vectors you want to look up?
- tmaly 2y agoI have a knowledge store of all my notes in markdown. I wanted a way to incorporate them with RAG.
- abraxas 2y agoHow many vectors is that? If under 100K then keep it all in memory. Hell probably in the low millions would be OK. You can literally write them to a flat file and load into memory and do a full scan for every lookup and it will be fast enough. If not then use faiss with hnsw indexing and it will be screaming fast.
- samber 2y agoElasticsearch is a good bet, if you need to use multiple filters with your queries, and when you grow above the acceptable size of an in-memory database.
- softwaredoug 2y agoThere’s a bazillion python libraries and regular databases / search engines with vector indices that run cross platform. Postgres, hnswlib, Elasticsearch, etc.
- redskyluan 2y agoRunning everything on windows plaform is not easy... maybe just run with a container?
- ayende 2y agoStarting in v7.0, ravendb has ve tor search and ai integration Run on windows , linux and mac
- yawnxyz 2y agoif you have small data requirements (less than 100mb) I just run FAISS for embeddings and store the rows of data and vectors in JSON. I then have a small python script to run a vector similarity algo like cosine similarity or whatever. It's not the fanciest or most efficient, but it works surprisingly well. I use it to search/rank my own blog posts (~300+) for relevancy. So the entire thing is only like 10mb. Probably will get super slow for really large dataasets
- Prosammer 2y agoCheck out lanceDB, it looks awesome for this.
- geuis 2y agoPostgres with pgvector extension. Have been using it in production for months and it works great.
- andre-z 2y agoQdrant runs on Linux/Mac/Windows and on x86/ARM processors
- bobosha 2y agoWe used Qdrant in production - it's a solid vector db offering and highly recommend. However we are moving everything to Postgres with pgvector for simplicity i.e fewer moving parts. It was a PITA keeping data synced between pgsql <> qdrant.
- BenoitP 2y agoBrute force it. Gemm routines can give you a best dot product among 300k vectors well under a second
- vismit2000 2y agoExactly. See this for details: https://news.ycombinator.com/item?id=43162995 https://news.ycombinator.com/item?id=43162995
- jankovicsandras 2y agoPostgres is a good idea. Shameless plug: https://github.com/jankovicsandras/plpgsql_bm25 https://github.com/jankovicsandras/plpgsql_bm25 BM25 search implemented in PL/pgSQL, there's also an example of Hybrid (BM25+pgvector) search in the repo.
- OutOfHere 2y agoIf you strictly want things that are not vector databases, you can choose to categorize each item with multi-hierarchical categories. To query, just filter for items belonging to the categories that interest you. As a bonus, this approach is a lot more interpretable than using embeddings.
- kledru 2y agotwo years ago annoy library from spotify was good enough for small RAG, stored everything in single file...
- vismit2000 2y agoYou might also want to take a look at: The best way to use text embeddings portably is with Parquet and Polars - https://news.ycombinator.com/item?id=43162995 https://news.ycombinator.com/item?id=43162995
- jusob 2y agoI've been using sqlite-vec, a module for sqlite3: https://github.com/asg017/sqlite-vec https://github.com/asg017/sqlite-vec
- usgroup 2y agoThe correct answer is duckdb with the vec extension :-)
- carlbren 2y agoI use usearch for the engine https://github.com/unum-cloud/usearch/ https://github.com/unum-cloud/usearch/. It's fast. The vectors are stored in DB and added to usearch at startup for retreival. There is also FAISS.