
This course contains the use of artificial intelligence
Ask a language model about your own company, and it will answer with confidence, and often get it wrong. It has never
read your policies, tickets or playbooks. Retrieval-augmented generation (RAG) fixes this: the assistant first finds the right pages in your documents, then answers only from them, with sources. In this course you build an enterprise-Ask a language model about your own company, and it will answer with confidence, and often get it wrong. It has never read your policies, tickets or playbooks. Retrieval-augmented generation (RAG) fixes this: the assistant first finds the right pages in your documents, then answers only from them, with sources. In this course you build an enterprise-grade RAG system from scratch, on your own computer, with open-source models.
You build one private AI assistant. from a single question to a local model up to a secured, measured service. Every module is yours, written in plain Python, with no RAG framework hiding the work, Ollama runs the local chat and embedding models, and you write everything else.
You learn to:
Load and clean real company documents (text, web pages, PDF files and tables) and attach their facts as metadata.
Cut documents into chunks, turn text into vectors with an embedding model, and search by meaning.
Measure retrieval with a fixed question set: hit rate and mean reciprocal rank.
Combine meaning search with BM25 keyword search, merge the lists, rewrite questions, and re-rank with a cross-encoder.
Write grounded prompts that answer only from the sources, cite every sentence, and say "I do not know".
Check citations, judge faithfulness with a model, and answer follow-up questions in a conversation.
Move to a real vector database (Qdrant in Docker) with incremental ingestion, filters, fresh versions and exact counts.
Secure it, access control per person, personal data masking, a guard against poisoned pages, and an audit log.
Score whole answers, test the judge itself, tune chunk size, overlap, top K and search, and build a quality gate.
Serve it as a FastAPI web service with a cache, started with Docker Compose.
How the course is taught
Problem first, every lecture starts with what goes wrong, shown as an animated picture before any code.
Code explained block by block: every file opens in a real terminal, and its path is drawn as a state machine first.
Real output only: every answer, score and timing on screen comes from a real run; surprises are kept and explained.
Measured, not claimed: every improvement is shown as a before and after on the same questions.
Beginner friendly and deep: every term is explained the first time it appears, with an everyday picture.
What you need
Basic Python and a terminal. Everything runs on your own computer with open-source, commercial-safe models: no cloud
account and no paid API. An Nvidia GPU makes the model fast; the same code also runs on the processor, only slower.