pgvector
A linear, one-concept-per-lesson path through pgvector, the Postgres extension that turns an ordinary relational database into a place to store and search embeddings, from your first vector column to a production-shaped FastAPI RAG service. 28 lessons · 3 tiers.
Prerequisites: Completion of LangChain & Agent Building Lessons 27-29, where notes.txt was loaded, split into chunks, embedded, and searched with InMemoryVectorStore. That lesson was honest about its own limit: fine for learning, not for production. This course picks up exactly there and builds the durable, production-shaped version, on Postgres.
Lessons use Google's Gemini free tier (gemini-embedding-001 for embeddings, gemini-3.5-flash-lite for chat), the same models as the other courses. Setup also needs a local Postgres with pgvector, run via `docker compose up -d` from the project root, a normal Postgres 17 with the vector extension already compiled in, exposed on localhost:5433 to avoid clashing with any other Postgres already running.
Built on pgvector, the Postgres extension this course teaches.

Beginner
Postgres as a place to store and search vectors.
- 01What Is pgvector?GitHub
- 02Connecting With psycopgGitHub
- 03The vector(N) Column TypeGitHub
- 04Storing Real EmbeddingsGitHub
- 05The Three Distance OperatorsGitHub
- 06Similarity Search BasicsGitHub
- 07Filtering With MetadataGitHub
- 08Updating and Deleting VectorsGitHub
- 09Checkpoint: Notes Semantic Search CLIGitHub
Intermediate
Indexing, hybrid search, and talking to Postgres like an app would.
- 10Exact vs. Approximate SearchGitHub
- 11The ivfflat IndexGitHub
- 12The hnsw IndexGitHub
- 13Choosing a Distance MetricGitHub
- 14EXPLAIN ANALYZE for Vector QueriesGitHub
- 15Batch Inserts and UpsertsGitHub
- 16Hybrid Search: Text and VectorGitHub
- 17Reranking ResultsGitHub
- 18Connection PoolingGitHub
- 19Checkpoint: Hybrid Search APIGitHub
Advanced
Production concerns, and closing the loop with LangChain.
- 20LangChain pgvector IntegrationGitHub
- 21A Persistent RAG PipelineGitHub
- 22Schema Design for Multi-Tenant VectorsGitHub
- 23Partitioning Large TablesGitHub
- 24Index Build Performance and MaintenanceGitHub
- 25Quantization and halfvecGitHub
- 26Monitoring and ObservabilityGitHub
- 27Migrations and Re-Embedding DriftGitHub
- 28Capstone: A FastAPI RAG ServiceGitHub