Fujitsu PostgreSQL blog

Improving RAG in PostgreSQL: From basic retrieval to smarter context

Written by Gary Evans | August 29, 2025

In my previous blog post, we built the simplest possible Retrieval Augmented Generation (RAG) pipeline inside PostgreSQL. We embedded our manuals, stored those vectors in a table, ran a similarity search, and handed the top 5 results straight to a Large Language Model.
The result was encouraging, we could already see the model drawing on our content rather than inventing information. But as with any first draft, it works and it’s reliable are two different things.