Udemy
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Advanced RAG & Enterprise AI Engineering
New

Advanced RAG & Enterprise AI Engineering

Build an enterprise-grade RAG system from scratch in Python with local models: search, citations, security, evals
Created byAnil Kumar
Last updated 11/2026
English

What you'll learn

  • Build an enterprise-grade RAG system from scratch in plain Python, with local open-source models and no RAG framework
  • Load and clean text, web pages, PDFs and tables, and attach each document's facts as metadata
  • Chunk documents with different strategies and measure which one helps the search, with real numbers
  • Turn text into vectors with an embedding model and search by meaning with cosine similarity and top K
  • Measure retrieval with a fixed question set: hit rate at K and mean reciprocal rank
  • Combine BM25 keyword search and meaning search with rank fusion, rewrite questions, and re-rank with a cross-encoder
  • Write grounded prompts that cite every sentence and say "I do not know", and check citations with a model judge
  • Run Qdrant in Docker with incremental ingestion, filters, fresh document versions and exact counts from tables
  • Secure a RAG system: access control per person, personal data masking, a prompt-injection guard and an audit log
  • Score whole answers for facts, refusals and sources, and test the judge itself against a person's labels
  • Tune chunk size, overlap, top K, hybrid search and re-ranking, and lock the best settings in with a quality gate
  • Serve the assistant as a FastAPI service with a cache, started with Docker Compose

Course content

9 sections • 23 lectures • 6h 1m total length
  • Why Companies Need RAG12:04
  • How RAG Works, End to End10:16
  • Build Your Local RAG Lab18:02

Requirements

  • Basic Python: functions, running scripts, installing packages.
  • Basic terminal use: moving between folders and running commands.
  • A computer with Linux, or Windows 10/11 with WSL (Ubuntu). Lecture 1.3 sets everything up.
  • About 6 GB of free disk space for the two local models (4.7 GB chat model, 274 MB embedding model) and the packages.

Description

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.


Who this course is for:

  • Python developers who want to build real RAG systems, not only call a framework.
  • ML and AI engineers who need retrieval, evaluation and security for assistants that run on company data.
  • Security-minded engineers who want to see access control, data masking and prompt-injection defence in a real RAG system.
  • Students who want a complete, portfolio-ready AI project that runs on their own computer.