
This course includes our updated coding exercises so you can practice your skills as you learn.
See a demo
Overview. Advanced RAG in Python: the measured pipeline, running. The finished project running first, then the plan for the course, what you need, and the course code (attached here as a download).
Hands-on. Vector databases in Python: Qdrant, sqlite-vec, FAISS, HNSW and IVF. Practical for this section: top_k() + recall_at_k(): benchmark an index before you trust it.
Hands-on. Chunking and metadata filters for RAG in Python, measured. Practical for this section: build_filter() + keep(): current versions only, never drop docs without the field.
Hands-on. Hybrid search in Python: BM25 from scratch + vectors + RRF. Practical for this section: fuse(): RRF of a dense and a BM25 list.
Hands-on. Rerankers and query rewriting in Python: one prompt change decides. Practical for this section: mmr(): relevant AND different.
Hands-on. GraphRAG in Python: knowledge graph, communities, map-reduce. Practical for this section: two_hop(): Riverton -> vendor -> account manager.
Hands-on. Agentic RAG in Python: route, grade, retry or refuse. Practical for this section: corrective(): grade, retry once, refuse.
Quick note: if this course has been useful so far, an honest review helps other learners decide whether it is right for them. It takes about 10 seconds, and you can update it any time as you go further. Questions or anything unclear? Ask in the Q&A, I reply to every one.
Hands-on. Evaluate and ship your RAG app in Python: 3 pipelines, a quality gate. Practical for this section: quality_gate(): per-type floors + wrong refusals.
Hands-on. Enterprise RAG in Python: LangChain, access control, audit log. Practical for this section: first_bad_line(): verify a hash-chained audit log.
This course contains the use of artificial intelligence.
Most RAG tutorials stop at a vector search and a prompt. This course starts there and takes you through what real systems need, with every step measured on 42 questions with known answers. Everything runs on an ordinary laptop with local models through Ollama (qwen2.5:0.5b for answers, all-minilm for embeddings) and embedded vector stores: no API key, no server, no Docker.
You work on one realistic document set: 118 documents from a fictional logistics company, with look-alike error codes, policies that were replaced by newer versions, a long manual, and facts that only connect across documents. You store and search vectors in Qdrant local mode, sqlite-vec and FAISS, and benchmark exact against HNSW and IVF indexes; compare four chunking strategies and build metadata filters from the question; build BM25 from scratch and combine it with vectors using reciprocal rank fusion; build a reranker from a local model's yes/no probabilities and test HyDE, multi-query and MMR; build a knowledge graph with a local model, merge entity names, find communities, and answer questions about whole collections with map-reduce; build an agent that routes, grades, retries and refuses; evaluate three pipelines end to end and add a quality gate; and finally add the enterprise layer: the same pipeline as a LangChain chain (it gives the same 42 answers), a per-user access filter inside the search in numpy and Qdrant, a hash-chained audit log written by a LangChain callback, and a permission gate that fails a release when any person can reach a document they may not read.
The models are small on purpose, and you see their real failures: a reranker prompt that made ranking worse (0.26 right-document-first) until one layout change made it better (0.92), a filter form that removed every current policy, a knowledge graph that tied with plain hybrid search, and a filter applied after the search that left one user with no passages at all. Every number shown is from a real run: sections one to seven on 31 October 2026, section eight on 8 November 2026 (its model replies replayed from the recorded cache); the code, logs, tests, practicals and cheat sheets are included. Narration is AI-voiced; the code, runs and results are real.
The course is 2 h 29 min of video in 9 sections. Section 1 is the overview and setup; the other sections are hands-on, and every program is run for real on screen. Each hands-on section comes with a one-page cheat sheet (PDF), a short quiz, a practical with starter and solution files and an assignment with a model answer; 5 coding exercises let you write the code yourself.