Catalogue
/
Databases
/
pgvector for Vector Search and AI Applications with PostgreSQL

pgvector for Vector Search and AI Applications with PostgreSQL

A practical two day technical course for participants who are new to pgvector and want to add vector search capabilities directly to PostgreSQL. The agenda progresses from extension setup, vector data types, embeddings, and SQL similarity queries through HNSW and IVFFlat indexing, filtering, query optimization, Python integration, semantic search, and RAG applications. The course focuses on combining familiar relational database capabilities with efficient vector retrieval.

What will you learn?

You will learn how pgvector extends PostgreSQL with vector storage, similarity operators, and approximate nearest-neighbor indexing. You will work with embeddings, SQL vector queries, HNSW and IVFFlat indexes, filtering, execution plans, and performance tuning. You will also learn how to integrate pgvector with Python applications and use PostgreSQL as the retrieval layer for semantic search and RAG systems.

  • Store and query vector embeddings directly in PostgreSQL
  • Implement exact and approximate similarity search with SQL, HNSW, and IVFFlat
  • Combine vector retrieval with relational filters and optimize query performance
  • Integrate pgvector with Python, semantic search, and RAG applications

Requirements:

  • Working knowledge of PostgreSQL, relational databases, and SQL
  • Experience creating tables, querying data, and working with database indexes
  • Basic understanding of vector embeddings and similarity search
  • Basic Python programming experience for application integration

Course Outline*:

*We customize the course outline and content to your specific needs and relevant use cases.

Module 1: pgvector architecture and setup

  • Understanding pgvector as a PostgreSQL extension for vector similarity search
  • Installing and enabling the vector extension in PostgreSQL
  • Working with vector, halfvec, bit, and sparsevec data types
  • Designing relational tables that combine embeddings with structured application data

Module 2: Embeddings and SQL vector queries

  • Storing and retrieving embeddings in PostgreSQL
  • Understanding Euclidean distance, cosine distance, and inner product
  • Using pgvector distance operators in SQL queries
  • Implementing exact nearest-neighbor search with ordering, limits, and distance thresholds

Module 3: HNSW and IVFFlat indexing

  • Understanding approximate nearest-neighbor search and its performance tradeoffs
  • Creating HNSW indexes and tuning search parameters
  • Creating IVFFlat indexes and configuring lists and probes
  • Choosing between exact search, HNSW, and IVFFlat based on data size and workload

Module 4: Filtering and query optimization

  • Combining vector similarity search with relational WHERE conditions
  • Using conventional PostgreSQL indexes alongside vector indexes
  • Understanding filtered approximate search and iterative index scans
  • Using EXPLAIN ANALYZE and execution plans to diagnose vector query performance

Module 5: Python integration with pgvector

  • Connecting Python applications to PostgreSQL with pgvector support
  • Working with Psycopg or SQLAlchemy to store and query vectors
  • Registering vector types and performing parameterized similarity searches
  • Organizing reusable ingestion and retrieval code for application development

Module 6: Building semantic search applications

  • Generating embeddings and storing documents with relational metadata
  • Converting user queries into embeddings and retrieving semantically similar records
  • Combining metadata filters with vector similarity ranking
  • Designing database schemas for documents, chunks, embeddings, and source metadata

Module 7: pgvector in RAG architectures

  • Positioning PostgreSQL and pgvector within ingestion, retrieval, context construction, and generation workflows
  • Designing chunking and metadata strategies for retrieval
  • Combining vector search with PostgreSQL full-text search for hybrid retrieval
  • Evaluating retrieval quality and identifying irrelevant or incomplete context

Module 8: Performance and production considerations

  • Monitoring recall, latency, index size, and PostgreSQL resource usage
  • Tuning HNSW and IVFFlat parameters based on search requirements
  • Using reduced precision or quantization approaches where appropriate
  • Building a practical production checklist covering indexing, filtering, maintenance, monitoring, backups, scaling, and retrieval quality

Hands-on learning with expert instructors at your location for organizations.

3,072€*
Graph Icon - Education X Webflow Template
Level:
intermediate
Clock Icon - Education X Webflow Template
Duration:
14
Hours (days:
2
)
Camera Icon - Education X Webflow Template
Training customized to your needs
Star Icon - Education X Webflow Template
Immersive hands-on experience in a dedicated setting
*Price can range depending on number of participants, change of outline, location etc.

Master new skills guided by experienced instructors from anywhere.

2,037€*
Graph Icon - Education X Webflow Template
Level:
intermediate
Clock Icon - Education X Webflow Template
Duration:
14
Hours (days:
2
)
Camera Icon - Education X Webflow Template
Training customized to your needs
Star Icon - Education X Webflow Template
Reduced training costs
*Price can range depending on number of participants, change of outline, location etc.

Upcoming Sessions

4-5 Feb 2027
Zurich
23-24 Mar 2027
Brussels
13-14 Apr 2027
Amsterdam
29-30 Apr 2027
Frankfurt
11-12 May 2027
London
25-26 May 2027
Barcelona
17-18 Jun 2027
Milan
1-2 Jul 2027
Stockholm

Can't find a suitable date? Get in touch and we'll arrange one that works for you.

We use cookies to improve site navigation, analyse how the site is used, and support our marketing. You can accept all cookies, reject non-essential ones, or choose individual categories. Read our Cookie Notice