Back to Exploration Map
🔎
Course

Retrieval-Augmented Generation with Python

🐧 Linux-based⚡ Hands-on labs +1510 XP

Course Description

Give an AI Your Own Documents — and Trust Its Answers

Large language models are fluent, confident, and often wrong about anything they weren’t trained on — your notes, your runbooks, your codebase. Retrieval-Augmented Generation (RAG) is how the pros fix that: retrieve the passages that actually answer a question, hand them to the model, and get an answer grounded in your documents — with citations you can check.

In this course you build docchat, a real “chat with your documents” tool in Python, from scratch — no framework magic. It embeds your files, finds the passages that matter, and answers with sources, refusing to guess when the docs don’t cover it. You run it on your own machine against the free Mistral (LeChat) API.

What You’ll Build & Learn

  • How embeddings turn text into vectors, and how cosine similarity finds the passages that matter
  • Chunk documents well and build an in-memory vector store you fully understand
  • Retrieve the top matches and augment the prompt so the model answers from your docs, not its memory
  • Write a grounded system prompt that cites sources and says “I don’t know” instead of hallucinating
  • Persist your index, then swap in a real vector database (Chroma) — with pgvector as a bonus
  • Evaluate retrieval quality, then wrap it all in a “chat with your docs” CLI

How You’ll Learn

This is a build-on-your-machine project, not a lecture:

  • Assemble one real project — docchat — module by module
  • Lock in each concept with a quick quiz
  • Download the complete, tested solution code for every step
  • Everything runs locally against the free Mistral API — no GPU, no paid tooling

Where This Fits Your Journey

This is where you build your first real AI application. On the BytExplorer AI-Assisted Developer path it comes after Working Effectively with AI, and it sets up Building AI Agents with Python — where the RAG you just built becomes one of an agent’s tools.

Comfortable with basic Python? That’s all you need. By the end you’ll have a grounded, cited RAG system you actually trust — and you’ll understand every moving part.

Ready to make an AI answer from your documents? Jump in.

Get full access

This course — plus every other BytExplorer course — hands-on, on your own machine.

$29/mo · all courses included · cancel anytime

What's Included
  • Hands-on labs on your own Linux machine
  • Commented source code you can learn from
  • Quick quizzes to lock in each concept
  • Every project's source is yours to download and keep
  • Earn XP and level up as you go

Hands-on throughout. You won't just watch — you'll build, break, and fix real deployments.