Menu

1 / 2

Your RAG Agent Is Quoting Deleted Documents (Postgres + pgvector Fix)

DEV Community: postgres·Node & Neural·1 day ago
#pwceTiYH
#devtopostgresql#devto#dev#embedding#query
Reading 0:00
15s threshold

Your AI agent just quoted a contract to a customer. That contract was terminated six weeks ago and deleted from Postgres the same day. Its embedding wasn't. It was still sitting in a separate vector database, and nobody owned the sync job.

Two databases, one sync job

Most RAG tutorials start the same way: documents live in Postgres, and their embeddings go to a dedicated vector database. Two systems means a sync job. Every insert, update and delete has to reach both, in order, or your agent retrieves things that no longer exist.

It also means two security models. Postgres knows this user can only see their own company's contracts. The vector database doesn't, so permissions get copied into metadata filters, and the copies drift.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.