4 ms·
There isn't a best universal choice for all situations. If you're already using Postgres and all you want is to add vector search, pgvector might be good enough
by dmezzetti 3y ago
There isn't a best universal choice for all situations. If you're already using Postgres and all you want is to add vector search, pgvector might be good enough.
txtai (https://github.com/neuml/txtai https://github.com/neuml/txtai) sets out to be an all-in-one embeddings database. This is more than just being a vector database with semantic search. It can embed text into vectors, run LLM workflows, has components for sparse/keyword indexing and graph based search. It also has a relational layer built-in for metadata filtering.
txtai currently supports SQLite/DuckDB for relational data but can be extended. For example, relational data could be stored in Postgres, sparse/dense vectors in Elasticsearch/Opensearch and graph data in Neo4j.
I believe modular solutions like this where internal components can be swapped in and out are the best option but given I'm the author of txtai, I'm a bit biased. This setup enables the scaling and reliability of existing solutions balanced with someone being able get started quickly with a POC to evaluate the use case.
- drawnwren 3y agoAm I reading this right? You’ve written a vector database in python? Are there any performance benchmark comparisons for me to look at?
- dmezzetti 3y agotxtai is in Python but much of the underlying code isn't. For example, PyTorch/Transformers uses C/C++/CUDA for most operations. The approximate nearest neighbor (ANN) libraries for vector indexes are Faiss, Hnswlib and Annoy. They are all C/C++. Much of the sparse vectors code is NumPy and uses Python's array module for storing term vectors. There are no 3rd party benchmarks for txtai as of now. You would have to compare how it does on your own data to judge.