AI Instructor Live Labs Included

OpenAI: Embeddings & Retrieval Systems (RAG)

Build production RAG pipelines with OpenAI embeddings, pgvector, hybrid BM25+vector search, and the native File Search API.

Intermediate
10h 20m
10 Lessons
OPENAI-202
OpenAI RAG Developer Badge

View badge details

About This Course

Build production-grade RAG pipelines using OpenAI embeddings, pgvector, hybrid search, and the native File Search API. Learn to compute semantic similarity with text-embedding-3-small, store and query vectors at scale with pgvector, combine BM25 keyword search with vector search using Reciprocal Rank Fusion, and build an enterprise RAG assistant with hallucination detection and source attribution.

Course Curriculum

10 Lessons
01
AI Lesson
AI Lesson

Text Embeddings & Semantic Similarity

30m

Learn what embeddings are and how they represent meaning as vectors. Covers text-embedding-3-small vs text-embedding-3-large, the dimensions parameter for cost optimization, cosine similarity computation, and when semantic search outperforms keyword search.

02
Lab Exercise
Lab Exercise

Semantic Similarity Search Engine - Lab Exercises

1h 25m 2 Exercises

Build a semantic search engine over a 20-product catalog. Implement get_embedding() with text-embedding-3-small, cosine_similarity() with numpy, build_product_index() to embed all products, and semantic_search() to return the top-k most similar products for any natural language query.

03
AI Lesson
AI Lesson

Vector Storage with pgvector

30m

Learn to set up pgvector in Python with psycopg2, create embeddings tables with vector columns, index vectors with HNSW and IVFFlat, and run nearest-neighbor queries using the cosine distance operator.

04
Lab Exercise
Lab Exercise

Persistent Embedding Store - Lab Exercises

1h 45m 3 Exercises

Build a persistent embedding store using pgvector. Set up the database schema with HNSW index, chunk and embed a documentation corpus, store embeddings with psycopg2, and query with the cosine distance operator to retrieve semantically similar chunks.

05
AI Lesson
AI Lesson

Hybrid Search & Re-Ranking

30m

Learn why vector search alone misses exact keyword matches, how to combine BM25 with vector search using Reciprocal Rank Fusion, cross-encoder re-ranking, retrieval compression, and how to measure retrieval quality with precision@k, recall@k, and MRR.

06
Lab Exercise
Lab Exercise

Hybrid Search Pipeline - Lab Exercises

1h 30m 2 Exercises

Build a hybrid search pipeline combining BM25 keyword search with vector similarity search, fused using Reciprocal Rank Fusion. Implement bm25_search(), vector_search(), reciprocal_rank_fusion(), and the full hybrid_search() pipeline.

07
AI Lesson
AI Lesson

OpenAI File Search & Vector Stores API

30m

Learn OpenAI's native Vector Stores API — when to use it vs self-hosted pgvector, how to create vector stores, upload files with automatic chunking, query using the Responses API file_search tool, manage vector store lifecycle, and understand the cost model.

08
Lab Exercise
Lab Exercise

File Search Integration - Lab Exercises

1h 25m 2 Exercises

Build a document Q&A assistant using the OpenAI Responses API file_search tool. Create a vector store, upload technical documents, and query them using the built-in file_search tool — no external vector database required.

09
AI Lesson
AI Lesson

Capstone Briefing: Enterprise RAG Assistant

20m

Reviews all Course 202 concepts: embeddings, pgvector, hybrid search, re-ranking, and file search. Previews the capstone architecture — a hybrid RAG assistant with source attribution, hallucination detection, and retrieval quality evaluation.

10
Lab Exercise
Lab Exercise

Capstone Project: Enterprise RAG Assistant - Lab Exercises

1h 55m 3 Exercises

Build a complete enterprise RAG assistant with hybrid BM25+vector retrieval using RRF, grounded answer generation with source attribution, a hallucination detection guard using a second LLM call, and precision@3 evaluation across test queries.

This course includes:

  • 24/7 AI Instructor Support
  • Live Lab Environments
  • 5 Hands-on Lessons
  • Completion Badge
OpenAI RAG Developer Badge

Earn Your Badge

Complete all lessons to unlock the OpenAI RAG Developer achievement badge.

Skill Level Intermediate
Total Duration 10h 20m
OpenAI RAG Developer Badge
Achievement Badge

OpenAI RAG Developer

Awarded for completing Embeddings and Retrieval Systems. Demonstrates ability to build semantic search with text embeddings, store vectors in pgvector, implement hybrid BM25+vector search with RRF, use the File Search API, and build hallucination-guarded RAG pipelines.

Course OpenAI: Embeddings & Retrieval Systems (RAG)
Criteria Complete all lessons and exercises in OPENAI-202: Embeddings and Retrieval Systems
Valid For 730 days

Skills You'll Earn

Text Embeddings Semantic Search pgvector BM25 Hybrid Search RAG Hallucination Detection

Complete all lessons in this course to earn this badge