PostgreSQL and pgvector for AI Applications
The default move is a separate vector database. I didn't take it.
Every AI stack article assumes a dedicated vector store. But Kilele Archade's vectors describe rows that already live in PostgreSQL — documents, subjects, competences. Splitting them across two systems meant two security models, two backups and a sync problem I did not need.
What one database buys you
Joins between embeddings and metadata are just SQL. Row-level security covers vectors and documents identically. Transactions mean a document and its embeddings appear or fail together. pgvector's index keeps similarity search fast enough for an app at this scale, and operational overhead stays close to zero.
What it costs
At very large scale, dedicated vector engines offer features pgvector does not: advanced quantisation, GPU search, complex filtering strategies. The honest engineering answer is that the platform is nowhere near the point where that matters, and the simpler system is the correct one until evidence says otherwise.
Practical notes
Pick an embedding dimension once and store it in a column, because changing models means re-embedding everything. Index after the corpus is big enough to matter, not before. Measure retrieval quality with a fixed question set before tuning anything.