Vector Databases and Embeddings
Semantic search and retrieval with pgvector, Pinecone and FAISS.
Taught by Rohan Maharjan · ML Engineer
What you'll learn
- Explain what an embedding is and compute similarity between texts with a local model
- Choose an embedding model and chunking strategy using measured retrieval quality
- Build flat, IVF and HNSW indexes in FAISS and explain their speed and recall trade-offs
- Store and query vectors in Postgres with pgvector, including HNSW indexes and metadata filters
- Use a managed vector database and implement hybrid search with reciprocal rank fusion
- Add a cross-encoder reranker and evaluate retrieval with recall@k and MRR
About this course
Vector Databases and Embeddings is a hands-on course on the retrieval layer that sits underneath every RAG application, semantic search box and recommendation feature. It is for developers and data engineers who know Python and basic SQL and want to build search that understands meaning rather than matching keywords. You will learn what embeddings are and how to choose and run an embedding model, how to chunk documents so retrieval stays precise, how approximate nearest-neighbour indexes such as HNSW and IVF work and when to use each, and how to implement vector search in FAISS, in Postgres with pgvector, and in a managed service such as Pinecone. You will then combine vector and keyword search into hybrid retrieval, add a reranker, and evaluate the whole pipeline with recall and ranking metrics. Every lesson includes runnable code, and you finish with a measured retrieval service you can plug into any LLM app.
Course content
7 lessons- 1Why Search Needed VectorsKeyword search limits, what embeddings represent, and your first similarity computation with a local model.Preview
- 2Embedding Models: Choosing and Running OneCompare open and hosted embedding models on dimension, cost, language and quality, and batch-encode a corpus.
- 3Chunking Documents for RetrievalWhy chunk size matters, splitting strategies, overlap and metadata, and how to measure the effect on retrieval quality.
- 4Indexing: Flat, IVF and HNSW with FAISSHow approximate nearest-neighbour indexes trade recall for speed, built and benchmarked in FAISS.
- 5pgvector: Vectors Inside PostgresStore embeddings next to your data, query with distance operators, add HNSW indexes and combine with SQL filters.
- 6Managed Vector Databases and Hybrid SearchUse Pinecone as a managed index with namespaces and metadata, then fuse vector and keyword results with reciprocal rank fusion.
- 7Reranking and Evaluating RetrievalAdd a cross-encoder reranker, build a labelled query set, and measure recall@k, MRR and latency end to end.