I have experimented with both pgvector (through supabase) and elasticsearch.
Both are great from a dev UX perspective and allow you to get the ball rolling quickly. You still have to generate the vectors yourself, so your LLM+VDB is only as good as your embedding algorithm. (I tried both OpenAI embeddings and using a random BERT-based model from huggingface).
I would say if you use either of PG or ES already in your stack, then as the article says they're very decent solutions. Better than adding a new piece of infra to your stack.
It really boils down to which stack you are familiar with / which stack integrates better with the rest of your infrastructure / use case.
If you're already ingesting a lot of data to ES and you want to vectorize it, it has a good support for cosine similarity in its indexes.
If you store data in a PG database and you want to make it searchable by similarity, then pgvector is a good choice. It's especially powerful coupled with the ease of use of the supabase platform. You can make a document-based chatbot very very quickly.
In both cases it is more of a datatype and a lot of your logic will still reside in your application layer.
In my case I was already ingesting data into elastic, so I just added a dense_vector property to my index, and a vectorization step in my external code by calling the openAI api and saving the result into dense_vector.
In the future, I'm planning to build an AI powered webapp and my stack of choice will be supabase + pgvector because it's a better option as a public app backend.
> It's especially powerful coupled with the ease of use of the supabase platform
Just as you said, I followed their Clippy tutorial (which utilizes pgvector and OpenAI embedding) and was able to spin up a document-based chatbot quickly. In my specific use case, I stored portions of my knowledge base as embeddings in a normal Postgres table. The next step would be to implement a Row-Level Security for extra security (in case I screwed up somewhere). Thankfully, all my data and auth info are integrated with Supabase, so it's straightforward to do.
Both are great from a dev UX perspective and allow you to get the ball rolling quickly. You still have to generate the vectors yourself, so your LLM+VDB is only as good as your embedding algorithm. (I tried both OpenAI embeddings and using a random BERT-based model from huggingface).
I would say if you use either of PG or ES already in your stack, then as the article says they're very decent solutions. Better than adding a new piece of infra to your stack.