
How Much Does a RAG Chatbot Cost?
A demo costs a weekend. A version you can put in front of customers costs considerably more, and almost none of the difference is the model.

The default answer is pgvector, and it stays the right answer far longer than most comparisons imply. If you already run PostgreSQL, pgvector adds vector search to a database you are already backing up, monitoring and paying for.
That is not a claim that Pinecone is worse. It is a claim about sequencing: adopting a second datastore on day one buys operational overhead before you know whether you need the capability it brings.
| pgvector | Pinecone | |
|---|---|---|
| What it is | A Postgres extension | A managed vector database |
| Operational cost | None extra if you run Postgres | A new service, vendor and bill |
| Filtered search | A WHERE clause, fully transactional | Metadata filters, eventually consistent |
| Joins to your own data | Native — it is the same database | Application-side stitching |
| Scaling ceiling | High, with tuning | Higher, largely handled for you |
| Best at | Most products | Very large or very high-throughput indexes |
The third and fourth rows are the ones people underrate. In a RAG system you almost always need to filter by identity before retrieving — this user may see these documents. With pgvector that is a WHERE clause in the same transaction as the rest of your query. With a separate vector store it is a metadata filter in one system joined to permissions in another, and keeping those two in agreement is a real source of bugs, some of which leak data.
Most "pgvector does not scale" stories are missing an index. A sequential scan over a few hundred thousand embeddings is slow, and that is a configuration problem rather than a property of the extension.
Not volume alone. These are the specific conditions where a managed vector database starts to earn its cost:
That last one is a real reason and gets dismissed too readily. Choosing a managed service because you do not want to operate the alternative is a legitimate engineering decision, not a failure of nerve.
The reason to start with pgvector is that moving later is cheap if you build for it. Keep retrieval behind one interface — a function that takes a query and filters and returns passages with ids — and the store becomes an implementation detail.
Re-embedding is the part people fear, and it is usually a few dollars and an afternoon. Embedding models are far cheaper than generation models, which is why RAG costs are dominated by inference rather than by storage.
We start every RAG build on pgvector unless there is a concrete reason from the list above, and in practice most products never hit one. When a client arrives already running a managed vector database we usually leave it — migrating a working system to save a modest bill is rarely the highest-value work available.
The decision that actually affects answer quality is not where the vectors live. It is what you retrieve and how you evaluate it, which is where the engineering time should go.
For most products, yes. If you already run PostgreSQL, pgvector adds vector search to a database you are already backing up and monitoring, and it keeps permission filtering in the same transaction as retrieval. A managed vector database earns its cost past roughly ten million vectors, at very high write rates, or when nobody is available to own Postgres tuning.
Usually a missing or unused index. Run EXPLAIN: if you see a sequential scan, either no index exists, the operator class does not match your distance metric — an L2 index does not serve cosine queries — or the planner has a reason to ignore it. Build an HNSW index, match the operator class, and keep vectors in their own narrow table.
When index rebuilds past roughly ten million vectors become an operational event, when vector search competes with transactional load on the same instance, when you need index updates visible in milliseconds at high write rates, or when you have nobody to own Postgres tuning and a managed service costs less than the hire. Volume alone is not a reason.
Not very, if you keep retrieval behind one interface that takes a query plus filters and returns passages with ids. Then the store is an implementation detail. Re-embedding the corpus is usually a few dollars and an afternoon, because embedding models are far cheaper than generation models.