by moonchrome · 3y ago · 0 comments
pgvector is even supported out of the box on Azure and AWS RDS.
Just spin up a docker container [1], add a vector column to your table and you're ready for embedding search.
[1] https://hub.docker.com/r/ankane/pgvector
If you're starting out with a prototype - do yourself a favour, steer clear of the chromadb examples with langchain. In fact steer clear of langchain in general :) Just go for OpenAI API and PostgreSQL+PGVector - you'll have to do some boilerplate - but the stuff in langchain is just terrible, you'll have to rewrite it and do the boilerplate at some point anyway and this stack is super simple to deploy.
AFAICT standalone optimized vector stores will still have their place, like super latency sensitive or high-throughput scenarios. Unfortunately for many stakeholders, venture-scale returns to justify the megarounds from the peak vc fomo of the last few years seems unclear. The TBD hail mary here may be generative AI: even if most modern vector search workloads are largely fine with regular DB extensions to support a few kinds of vector indexes, the continued growth of generative AI, knowledge graphs, etc., may somehow grow the pie for non-standard DBs here. That's not obvious to me. For example, with Databricks LakehouseIQ, a lot of the use case may be eaten by the data warehouses.
Even with pgvector, there's no good way to write a simple tutorial for embedding newbies.
I'm coming at this from a perspective of a competent dev trying to build a tool with OpenAI APIs - which, from what I can tell, is a growing topic.
If you're experienced with building APIs and new to the LLM stuff - skip the langchain and chromadb nonsense. Just use the OpenAI APIs and pgvector.
Chromadb and langchain are usefull when writing notebook prototypes to get an idea of how this stuff works - but discard immediately after that phase and save yourself the trouble of porting later.
MySQL is very attached to /etc/mysql, /var/log/mysql and /var/lib/mysql, which makes sense if one thinks of it as a piece of a distribution and makes no sense if one thinks of it as a service that stores data in a filesystem or directory that one sets up for the purpose. Apparmor and (don’t get me started) SELinux dig this in deeper. What if you want two MySQLs on one host? What if you don’t want to mount something on /var/lib/mysql?
If mysqld were invoked by pointing it at a configuration and data and it just worked, I’d be more okay with it.
The fact that I really don’t want to couple upgrades of MySQL to distro upgrades is just icing on the cake.
For development, perhaps. For production, absolutely not.
I wish HN had some bot that would just delete any comment from people recommending installing databases. Because 99.9% of the time it's from those who have no experience in running one in a Production environment. Keeping it secure and ensuring backup/restore cycle works is seriously non-trivial.
I think if you're past pgvector performance you won't be listening to a random guy talking about pgvector but have a good understanding of the space.
If you're new (like I was a few months ago) save yourself the time I wasted on the noobtraps I mentioned. It scales way better than the OpenAI API for my use cases.
Lucene (or rather elastic/open search) is way overkill for my needs
Managed Postgres is a thing, probably much more common than managed lucerne. I can name three managed Postgres providers off the top of my head (AWS, Vultr, Supabase).
There are search engines e.g. Solr, ElasticSearch but those aren't what this paper is proposing.
To be clear I object to this:
> I wish HN had some bot that would just delete any comment from people recommending installing databases.
Most applications already use a database. Pooh-poohing Postgres as a solution is silly. For many people, it’s actually going to be less complex to take to production than installing a library, especially one with its own complex storage needs.
Also: technically, isn’t Lucerne a database?
I am currently using it this way and it is really easy to just get started.
I don't know how well it compares with others, however.