-
PostgreSQL + AI: I Tested pgvector Search and a Read-Only MCP Tool on Made-Up Tickets — Hi DBAs, this one started with a support ticket that said "my dashboard data is stale". Our runbook calls the same problem a "delayed refresh". Different words, same issue. A minute later someone asked me how many open tickets each queue has. Both sound like things you'd type into an AI assistant, but they're really two different jobs. The first one needs the right document. The second one needs a count from a table. So I built a small support lab in PostgreSQL 17 and tried both: pgvector for the runbook search, and Google's MCP Toolbox for Databases for the ticket count, with one fixed SQL statement behind it. Everything below is what I ran, what I expected, what came back, and the places where the demo is simpler than real life. The code is on GitHub: dba-ai-lab / experiments/postgresql-pgvector-mcp , with the lab SQL, the MCP Toolbox config, a tiny stdio test client and a one-command run script. 1. The lab, command by command Piece ...
-
New to AI? RAG: Letting AI Answer From Your Own Docs — Hi all. Here's where vector search starts paying off. A model on its own only knows what it learned in training, and nothing about your systems. RAG (retrieval-augmented generation) fixes that: before the model answers, you retrieve the right pieces of your own documents and put them in its context window. The model answers from those, and can show where the answer came from. For DBAs that's runbooks, past incident notes, architecture docs, vendor notes. "How do we fail over the billing database?" answered from our runbook, not from a blog post somewhere. The five steps Chunk. Split the documents into pieces of a few hundred words. Too big and the search gets fuzzy; too small and the answer loses context. Embed. Turn every chunk into a vector with an embedding model (see part 3). Store. Put text, vector and metadata (source, date, owner) in a table with a vector index. Retrieve. Embed the question and fetch the top few closest chunks. Generate...