Skip to content
All paths
Intermediate → AdvancedData & AI

Generative AI, Agentic AI and RAG

Build one fictional internal knowledge assistant three times: a model-only baseline, fixed retrieval-augmented generation (RAG) over PostgreSQL and pgvector, and a bounded agent with typed read-only tools. Then compare all three on the same questions. The path goes deeper than the introduction in AI Engineering with Python, focusing on retrieval quality, permission-aware search, verifiable citations, agent decisions and evaluation, in plain Python before any framework. Modules 1–2 are beginner, modules 3–7 are intermediate and modules 8–11 are advanced. You should know Python functions and type hints, Git, JSON, HTTP and basic SQL; Python from Zero, SQL & PostgreSQL and AI Engineering with Python cover those. Every lab runs locally with a deterministic model stub and small synthetic documents; a hosted or local model is optional.

What you will be able to do

  • Choose between rules, a single model call, fixed RAG and an agent for a given workflow
  • Build a versioned ingestion and retrieval pipeline in PostgreSQL with pgvector
  • Return answers with validated citations, or abstain with a clear reason
  • Design a bounded agent with typed, read-only, permission-checked tools and budgets
  • Evaluate model-only, fixed RAG and agentic RAG on the same fixture set
  • Serve the assistant through a reproducible, authenticated FastAPI service

Roadmap

Bar length shows each module's share of study time.

  1. 1

    Models, tasks and a baseline

    Beginner. Where generative models fit a workflow, how inference behaves, and a first typed model call against a deterministic stub.

    7h 30m3 topics
    Not started
    Show topics
  2. 2

    Prompts and output guarantees

    Beginner. Versioned prompts, schema-validated output and a measured baseline with success criteria set before retrieval or tools.

    8h 30m3 topics
    Not started
    Show topics
  3. 3

    Prepare, index and maintain your sources

    Intermediate. A versioned synthetic corpus, chunking and embeddings in PostgreSQL with pgvector, and an index that stays fresh.

    10h3 topics
    Not started
    Show topics
  4. 4

    Find the right evidence

    Intermediate. Lexical, vector and hybrid search, reranking within a context budget, and permission filtering at retrieval time.

    10h 30m3 topics
    Not started
    Show topics
  5. 5

    Ground, cite and abstain

    Intermediate. Answers with validated citations, handling of conflicting and outdated sources, and retrieval evaluation by failure stage.

    9h3 topics
    Not started
    Show topics
  6. 6

    Give agents bounded choices

    Intermediate. When an agent beats a workflow, typed read-only tools, run state and memory, and a decision loop with hard limits.

    12h 30m4 topics
    Not started
    Show topics
  7. 7

    Let an agent choose how to retrieve

    Intermediate. Routing questions, aggregating evidence across retrieval steps, and serving the agent behind a typed FastAPI endpoint.

    10h3 topics
    Not started
    Show topics
  8. 8

    Review tools, routing and failure modes

    Advanced. Single versus multi-agent trade-offs, trust-boundary tests, and fallbacks when models, tools or budgets fail.

    9h 30m3 topics
    Not started
    Show topics
  9. 9

    Measure answer and tool quality

    Advanced. A versioned golden dataset, trajectory scoring for tool use, and regression baselines across all three versions.

    11h3 topics
    Not started
    Show topics
  10. 10

    Deploy, observe and maintain

    Advanced. Tracing and cost tracking without sensitive content, safe index and model releases, and reproducible deployment with recovery drills.

    10h 30m3 topics
    Not started
    Show topics
    Module resources:Docker Compose ↗
  11. 11

    Ship an evaluated knowledge assistant

    Advanced. Design, build and verify a knowledge assistant over 10–20 synthetic documents in two scopes, compared across all three versions.

    23h3 topics
    Not started
    Show topics