Unlock the potential of semantic search and AI with this immersive, hands-on training in vector search with PostgreSQL. Over two intensive days, you’ll go from “What is an embedding?” to a fully functional Retrieval-Augmented Generation (RAG) chatbot built entirely on PostgreSQL—no external vector database required.
Why Vector Search with PostgreSQL?
Workshop Content
To start, you’ll explore how traditional keyword-based search often fails to capture meaning. We’ll explain how semantic search, powered by embeddings, changes the game by focusing on intent and context instead of just matching words.
Mapping a Real-World RAG Architecture
Next, we’ll dive into the big picture. You’ll see how data flows through a RAG system—from the user’s query, through embedding and retrieval, and finally to the language model. This helps clarify exactly where PostgreSQL fits in this modern AI pipeline.
Getting Started with pgvector
Then, you’ll get hands-on. With step-by-step instructions and ready-to-use scripts, you’ll install pgvector and set up your first embedding table. You can follow along on your laptop or in the cloud.
Choosing the Right Similarity Operator
After that, we’ll look at performance. You’ll compare similarity methods like cosine, Euclidean, and inner product. Through live SQL demos, you’ll understand how each option affects speed, accuracy, and storage.
Backend Integration with Python or Node
Once your vector search is working, you’ll learn how to connect it to real applications. Using LangChain and LangFlow templates, you’ll integrate SQL calls, filters, rankings, and LLM prompts into Python or Node backends.
Building a Minimal RAG Chatbot
Finally, you’ll bring it all together. You’ll embed a sample FAQ dataset, retrieve top-k matches, and pass them to an OpenAI function. The result? A fully working chatbot that gives users grounded, real-time answers.
Objectives
- Understand the limits of keyword-based search and the role of semantic vectors
- Install and configure pgvector with a starter OpenAI embedding workflow
- Write effective SQL for vector similarity, filtering, ranking, and pagination
- Build and deploy a minimal RAG pipeline using only PostgreSQL
- Apply best practices for performance, privacy, and storage optimization
Training approach
This workshop uses a hands-on blend of short talks, live SQL walkthroughs, and practical labs. First, you’ll be introduced to the core concepts through short, focused presentations. Then, you’ll immediately apply what you’ve learned in guided exercises—either in a cloud VM or on your own laptop.
Moreover, each topic builds on the previous one, reinforcing your understanding step by step. Finally, you’ll bring everything together in a capstone project: building a fully functional Q&A chatbot backed entirely by PostgreSQL.
Target audience
- DBAs ready to expand into semantic AI search
- Backend and full-stack developers
- Analytics engineers and platform teams
- Anyone new to vector search or RAG who seeks a single-database solution
Prerequisites
- Basic SQL knowledge
- Ability to access and navigate a PostgreSQL instance
- Beginner-level familiarity with Python
Key Benefits
- One-stack simplicity: Store vectors, metadata, and business data in one PostgreSQL cluster
- Faster prototyping: Use notebooks and LangChain blueprints to accelerate time to value
- Operational confidence: Learn storage sizing, cost control, and observability from day one
Ressources & Documentation
- Introduction to Vector Databases, Introduction to vector databases during the Future Data Driven 2024 event
- PostgreSQL and AI Blog Series, dbi services Blog posts about PostgreSQL
- Glossary: What is RAG?, pgvector, a guide for DBA – Part3 AI agent and workflows
- pgvector GitHub Repository, Learn how to install and use pgvector with PostgreSQL
- PostgreSQL Docs, Official guide to using PostgreSQL
- LangChain Docs, Use LangChain to connect SQL, vectors, and LLMs
- OpenAI API Docs, Learn how to use OpenAI APIs for your chatbot
- LangFlow GitHub, Visual programming tool for LLM orchestration
5% discount for SOUG, SwissPUG and DOAG members.