1. How to use this course
What it is
Read in order. Tick the box when you finish a lesson. Your progress is saved in your browser. Each lesson has the same shape: What it is, Why it matters, Code to copy, Try it yourself, and Check questions with answers you can open. This page covers the whole program: 56 hours, 3 courses, 80 lessons, 3 projects. You go from Generative AI fundamentals, to LLMs and RAG, to multimodal apps with text, images, audio, and video.
Why it matters
You do not need to do everything in one day. Ten minutes a day is enough. Do one lesson, try its code, then stop.
Code to copy (runs offline, standard Python only)
# No code needed in this lesson - use the sidebar to jump to any lesson.
print("Welcome! Start with Course 1, Lesson 1.")
print("Tick Done when you finish a lesson.")
Try it yourself
Open the sidebar and find Course 1. Tick this lesson Done.
Check
How long is this program?
56 hours in total: Course 1 is 21 hours, Course 2 is 17 hours, Course 3 is 18 hours. Go at your own pace: at 5 hours a week, that is about 11 weeks.
Do I need an API key for this page?
No. The practice code here runs offline with small simulations. You need accounts and keys only for the real OpenAI / Gemini / cloud parts.
2. Setup — what you need
What it is
You need: Python 3.11 or newer, a text editor, and, for the real parts, an OpenAI account and API key, a Google account for Gemini, and installs like PyTorch, Hugging Face Transformers, and ChromaDB. Plain warning: the real APIs and cloud use can cost money, and API keys are secrets — never share them and never put them in code you share. The practice on this page needs nothing else: every code block runs offline with standard Python only.
Why it matters
If setup is hard, learning stops. So setup is kept simple: Python, and the practice code on this page needs nothing else.
Code to copy (runs offline, standard Python only)
import sys
print("Python version:", sys.version.split()[0])
print("You need Python 3.11 or newer for the real tools.")
# Real installs (NOT needed for this page - run only when ready):
# pip install torch transformers chromadb
# Real keys (never share this file):
# OPENAI_API_KEY=your-key-here
# GOOGLE_API_KEY=your-key-here
Try it yourself
Run the code above and write down your Python version.
Check
Do I need an account for this page?
No. The practice code runs offline. You need accounts only for the real OpenAI, Gemini, and Hugging Face parts.
Where do I put an API key?
In a file called .env that you never share. Never paste a key into code you share with others.
3. What you will learn
What it is
In plain words: you learn to pick the right model, control its cost, adapt it cheaply, connect it to your own data with RAG, check its quality, and build apps that use text, images, audio, and video.
Why it matters
These are the skills of a Generative AI Engineer — the role this program builds toward. Each course teaches one part, and the three projects join them together.
Code to copy (runs offline, standard Python only)
courses = ["1. Generative AI Fundamentals (21h, 19 lessons)",
"2. LLMs and RAG (17h, 17 lessons)",
"3. Multimodal AI Applications (18h, 44 lessons)"]
for c in courses:
print(c)
print("Total: 56 hours, 80 lessons, 3 projects.")
Try it yourself
Write down the three courses above, in your own words, in your notebook.
Check
What job does this program build toward?
Generative AI Engineer.
What does 'production-grade' mean?
AI that works reliably in a real product: correct, affordable, checked, and monitored — not just a demo.
4. Prerequisites — the 12 things you need first
What it is
Before you start, you should have: 1) Generative AI Fluency, 2) Database Fundamentals, 3) Deep Learning, 4) Intermediate Python, 5) Hugging Face, 6) Parameter-Efficient Fine-Tuning, 7) Transformer Neural Networks, 8) PyTorch, 9) Implementing Role-Based Prompting, 10) Foundation Models, 11) Prompt Engineering, 12) Basic Python. You also need to communicate fluently and professionally in written and spoken English.
Why it matters
These are the entry requirements. If a few are new to you, start with those lessons first — this page explains each one in plain words as it comes up.
Code to copy (runs offline, standard Python only)
prereqs = ["Generative AI Fluency", "Database Fundamentals", "Deep Learning",
"Intermediate Python", "Hugging Face", "Parameter-Efficient Fine-Tuning",
"Transformer Neural Networks", "PyTorch", "Implementing Role-Based Prompting",
"Foundation Models", "Prompt Engineering", "Basic Python"]
for i, p in enumerate(prereqs, 1):
print(f"{i}. {p}")
print("Plus: fluent written and spoken English.")
Try it yourself
Tick the prerequisites you already have. Circle the ones you need to learn first.
Check
How many prerequisites are there?
12, plus fluent English.
I do not know PyTorch yet. Can I still start?
Learn the basics first — Course 1 Lesson 11 teaches PyTorch from tensors up, in plain steps.
5. Skills, tools, and career
What it is
Skills: Course 1 — Foundation Model Concepts, Generative AI Fluency, Generative AI Evaluation, Text generation, Basic PyTorch, Prompt Engineering, Foundation Models, Neural network basics, Deep learning, Prompt Engineering for Classification, Model Adaptation, Applying Generative AI to Use Cases, Generative AI Awareness, Reinforcement Fine-Tuning using GRPO, Ethical AI Awareness. Course 2 — Retrieval-Augmented Generation, Large Language Models, LLM Analysis and Capabilities, Prompt Engineering. Course 3 — Image pre-processing, Word embeddings, Ethical AI, AI Audio and Speech Analysis, Yolo algorithm, Model evaluation, Text generation, Computer vision fluency, Image classification, Large Language Models, Image generation, Image segmentation, Computer Vision Transformers, Diffusion Models, Gemini API, Tokenization, Multimodal AI Implementation. Tools: Python, PyTorch, Hugging Face Transformers, OpenAI API, Gemini API, PEFT / SFT / LoRA, GRPO, ChromaDB, HNSW, HyDE, RAGAS, Pydantic AI, Gradio, Arize Phoenix, CLIP, DINOv2, SAM, RT-DETR, YOLO, Whisper, CLAP, librosa, Veo 3. Companies hiring for these skills: OpenAI, Anthropic, Google, Meta, Nvidia, Adobe, Cohere, Databricks.
Why it matters
Employers want people who can build and run AI in production, not just talk about it. These skills and tools are the proof you practised exactly that.
Code to copy (runs offline, standard Python only)
skills = ["Prompt Engineering", "RAG", "PEFT / LoRA", "GRPO", "CLIP", "Whisper", "Pydantic AI", "Gradio"]
tools = ["Python", "PyTorch", "Hugging Face", "OpenAI API", "Gemini API", "ChromaDB", "RAGAS"]
print("Skills to learn:", ", ".join(skills))
print("Tools to learn:", ", ".join(tools))
Try it yourself
Tick the skills you already have, and circle the three you most want to learn.
Check
Which tools will I learn?
Python, PyTorch, Hugging Face, OpenAI API, Gemini API, ChromaDB, RAGAS, Pydantic AI, Gradio, and more — see the list above.
6. Projects overview — what you will build
What it is
Three projects, one per course. 1) Teach an LLM to Count — teach a model to count letters in a word using GRPO. 2) NASA RAG Chat System — build an end-to-end RAG chatbot: ingest NASA mission data, build a vector search pipeline, generate answers, and evaluate quality. 3) OmniTrainer Multimodal AI Agent — create an AI agent that simulates customer service scenarios, with monitoring agents that analyze text, images, video, and audio. There is no separate capstone: OmniTrainer, the third project, is the final project.
Why it matters
Reading about AI is not the same as building it. The projects are where the learning becomes a skill you can show.
Code to copy (runs offline, standard Python only)
projects = ["1. Teach an LLM to Count (GRPO)", "2. NASA RAG Chat System", "3. OmniTrainer Multimodal AI Agent"]
for p in projects:
print(p)
print("Project submissions are reviewed by industry professionals.")
Try it yourself
Copy the three project names into your notebook. Which one excites you most?
Check
Is there a capstone?
There is no separate capstone. The final project is OmniTrainer in Course 3.
7. Course 1: Generative AI Fundamentals (21 hours)
What it is
Employ the abilities of Generative AI with a deep dive into fundamentals. This course examines how various models are developed, how they work, and how to use them to their full potential.
Why it matters
This course is one third of the program. Work through its lessons in order — each one builds on the one before it.
Code to copy (runs offline, standard Python only)
# Course 1: Generative AI Fundamentals (21 hours)
# 19 lessons + 1 project.
print("Course 1: Generative AI Fundamentals")
print("Hours:", "21 hours")
print("Lessons:", 19)
Try it yourself
Read the course description above, then start its first lesson.
Check
How many lessons in this course?
19 lessons, plus one project.
How long is this course?
21 hours.
8. Introduction to Generative AI Foundations
What it is
Explore core principles, tools, and ethical use of Generative AI, and discover its real-world impact and foundational models powering creative applications.
Why it matters
This is the foundation. Everything later — RAG, multimodal apps, deployment — builds on knowing what a foundation model is and how to judge it.
Code to copy (runs offline, standard Python only)
# Generative AI in one page, offline simulation of "Introduction to Generative AI Foundations"
# Text, image, audio, video: one idea - learn patterns, then make new data.
# Text, image, audio, video: one idea - learn patterns, then make new data.
modalities = {"text": "write a summary", "image": "draw a picture",
"audio": "read text aloud", "video": "make a short clip"}
for kind, job in modalities.items():
print(f"{{kind}}: {{job}}")
print("LLM-assisted coding idea: ask for code, run it, check it, fix it.")
print("Always validate AI output - a confident answer can still be wrong.")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Explore core principles, tools, and ethical use of Generative AI, and discover its real-world impact and foundational models powering creative applications.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
9. Generative AI Overview
What it is
Explore the fundamentals of generative AI, its key modalities, advanced capabilities, and essential ethical considerations shaping responsible AI development.
Why it matters
This is the foundation. Everything later — RAG, multimodal apps, deployment — builds on knowing what a foundation model is and how to judge it.
Code to copy (runs offline, standard Python only)
# Generative AI in one page, offline simulation of "Generative AI Overview"
# Text, image, audio, video: one idea - learn patterns, then make new data.
# Text, image, audio, video: one idea - learn patterns, then make new data.
modalities = {"text": "write a summary", "image": "draw a picture",
"audio": "read text aloud", "video": "make a short clip"}
for kind, job in modalities.items():
print(f"{{kind}}: {{job}}")
print("LLM-assisted coding idea: ask for code, run it, check it, fix it.")
print("Always validate AI output - a confident answer can still be wrong.")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Explore the fundamentals of generative AI, its key modalities, advanced capabilities, and essential ethical considerations shaping responsible AI development.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
10. Accessing OpenAI API Keys
What it is
This lesson is about getting your OpenAI API key — the secret code that lets your programs use OpenAI's models. Keep it private, never share it, and never put it in code you share. (The real lesson needs an OpenAI account and may cost money.)
Why it matters
This is the foundation. Everything later — RAG, multimodal apps, deployment — builds on knowing what a foundation model is and how to judge it.
Code to copy (runs offline, standard Python only)
# Key ideas of "Accessing OpenAI API Keys", as a checklist
# Run this, then try changing one line and running it again.
ideas = ["What it is: see the lesson text above.",
"Why it matters: it is one step toward building real AI apps.",
"Try it: run this code, change the words, run it again."]
for i, idea in enumerate(ideas, 1):
print(f"{i}. {idea}")
print("Lesson:", "Accessing OpenAI API Keys")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
It teaches how to access (get and use) an OpenAI API key, safely.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
11. Applications of Generative AI
What it is
Explore real-world applications of Generative AI, including LLM-assisted coding, and learn to prompt, validate, and improve AI-generated code and tests.
Why it matters
This is the foundation. Everything later — RAG, multimodal apps, deployment — builds on knowing what a foundation model is and how to judge it.
Code to copy (runs offline, standard Python only)
# Generative AI in one page, offline simulation of "Applications of Generative AI"
# Text, image, audio, video: one idea - learn patterns, then make new data.
# Text, image, audio, video: one idea - learn patterns, then make new data.
modalities = {"text": "write a summary", "image": "draw a picture",
"audio": "read text aloud", "video": "make a short clip"}
for kind, job in modalities.items():
print(f"{{kind}}: {{job}}")
print("LLM-assisted coding idea: ask for code, run it, check it, fix it.")
print("Always validate AI output - a confident answer can still be wrong.")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Explore real-world applications of Generative AI, including LLM-assisted coding, and learn to prompt, validate, and improve AI-generated code and tests.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
12. Introduction to Foundation Models
What it is
Discover foundation models: large, versatile AI systems trained on massive datasets that generalize across tasks, surpassing traditional models in scalability and adaptability.
Why it matters
This is the foundation. Everything later — RAG, multimodal apps, deployment — builds on knowing what a foundation model is and how to judge it.
Code to copy (runs offline, standard Python only)
# Foundation models, offline simulation of "Introduction to Foundation Models"
# One big model, many jobs: the same "model" below answers three tasks.
def foundation_model(task, text):
if task == "classify":
return "positive" if "love" in text or "great" in text else "negative"
if task == "summarize":
return text.split(".")[0] + "."
return "I can classify, summarize, and more - one model, many tasks."
print(foundation_model("classify", "I love this product, it is great."))
print(foundation_model("summarize", "The Moon landing was in 1969. It changed history."))
print("Zero-shot = no examples given. Few-shot = a few examples in the prompt.")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Discover foundation models: large, versatile AI systems trained on massive datasets that generalize across tasks, surpassing traditional models in scalability and adaptability.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
13. Building Applications using Foundation Models
What it is
Learn to build text classifiers with foundation models, using zero-shot and few-shot prompt engineering for tasks like sentiment and spam detection, and evaluate classifier accuracy.
Why it matters
This is the foundation. Everything later — RAG, multimodal apps, deployment — builds on knowing what a foundation model is and how to judge it.
Code to copy (runs offline, standard Python only)
# Foundation models, offline simulation of "Building Applications using Foundation Models"
# One big model, many jobs: the same "model" below answers three tasks.
def foundation_model(task, text):
if task == "classify":
return "positive" if "love" in text or "great" in text else "negative"
if task == "summarize":
return text.split(".")[0] + "."
return "I can classify, summarize, and more - one model, many tasks."
print(foundation_model("classify", "I love this product, it is great."))
print(foundation_model("summarize", "The Moon landing was in 1969. It changed history."))
print("Zero-shot = no examples given. Few-shot = a few examples in the prompt.")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Learn to build text classifiers with foundation models, using zero-shot and few-shot prompt engineering for tasks like sentiment and spam detection, and evaluate classifier accuracy.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
14. How Generative AI Works
What it is
Learn how generative AI creates new data with architectures like Transformers and diffusion models, and how training enables creativity, reasoning, and task-specific abilities.
Why it matters
This is the foundation. Everything later — RAG, multimodal apps, deployment — builds on knowing what a foundation model is and how to judge it.
Code to copy (runs offline, standard Python only)
# Foundation models, offline simulation of "How Generative AI Works"
# One big model, many jobs: the same "model" below answers three tasks.
def foundation_model(task, text):
if task == "classify":
return "positive" if "love" in text or "great" in text else "negative"
if task == "summarize":
return text.split(".")[0] + "."
return "I can classify, summarize, and more - one model, many tasks."
print(foundation_model("classify", "I love this product, it is great."))
print(foundation_model("summarize", "The Moon landing was in 1969. It changed history."))
print("Zero-shot = no examples given. Few-shot = a few examples in the prompt.")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Learn how generative AI creates new data with architectures like Transformers and diffusion models, and how training enables creativity, reasoning, and task-specific abilities.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
15. Evaluating Generative AI Models
What it is
Learn how to assess generative AI using human evaluation, exact metrics, AI judges, and benchmarks, ensuring robust performance for open-ended, probabilistic model outputs.
Why it matters
This is the foundation. Everything later — RAG, multimodal apps, deployment — builds on knowing what a foundation model is and how to judge it.
Code to copy (runs offline, standard Python only)
# Model evaluation, offline simulation of "Evaluating Generative AI Models"
# Exact Match, ROUGE-style overlap, and LLM-as-a-Judge, by hand.
def exact_match(a, b):
return 1 if a.strip().lower() == b.strip().lower() else 0
def overlap(a, b):
wa, wb = set(a.lower().split()), set(b.lower().split())
return round(len(wa & wb) / max(len(wa | wb), 1), 2)
print("Exact Match 'Paris' vs 'paris':", exact_match("Paris", "paris"))
print("Exact Match 'Paris' vs 'London':", exact_match("Paris", "London"))
print("Word overlap 'the cat sat' vs 'the cat slept':", overlap("the cat sat", "the cat slept"))
print("Pass@k idea: if 3 of 5 tries are right, Pass@5 = 1, Pass@1 = 0.6.")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Learn how to assess generative AI using human evaluation, exact metrics, AI judges, and benchmarks, ensuring robust performance for open-ended, probabilistic model outputs.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
16. Implementing Evaluations for Generative AI Models
What it is
Learn practical techniques to evaluate generative AI models, from Exact Match to ROUGE, semantic similarity, code correctness, Pass@k, and LLM-as-a-Judge scoring.
Why it matters
This is the foundation. Everything later — RAG, multimodal apps, deployment — builds on knowing what a foundation model is and how to judge it.
Code to copy (runs offline, standard Python only)
# Model evaluation, offline simulation of "Implementing Evaluations for Generative AI Models"
# Exact Match, ROUGE-style overlap, and LLM-as-a-Judge, by hand.
def exact_match(a, b):
return 1 if a.strip().lower() == b.strip().lower() else 0
def overlap(a, b):
wa, wb = set(a.lower().split()), set(b.lower().split())
return round(len(wa & wb) / max(len(wa | wb), 1), 2)
print("Exact Match 'Paris' vs 'paris':", exact_match("Paris", "paris"))
print("Exact Match 'Paris' vs 'London':", exact_match("Paris", "London"))
print("Word overlap 'the cat sat' vs 'the cat slept':", overlap("the cat sat", "the cat slept"))
print("Pass@k idea: if 3 of 5 tries are right, Pass@5 = 1, Pass@1 = 0.6.")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Learn practical techniques to evaluate generative AI models, from Exact Match to ROUGE, semantic similarity, code correctness, Pass@k, and LLM-as-a-Judge scoring.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
17. Neural Networks and Multilayer Perceptrons
What it is
Explore neural networks from perceptrons to multilayer perceptrons, learning how they adapt via training, gradient descent, and backpropagation to solve complex AI tasks.
Why it matters
This is the foundation. Everything later — RAG, multimodal apps, deployment — builds on knowing what a foundation model is and how to judge it.
Code to copy (runs offline, standard Python only)
# Tiny neural network, offline simulation of "Neural Networks and Multilayer Perceptrons"
# Real version: PyTorch tensors, loss, optimizer, training loop.
# Here: one perceptron, one training step, plain Python + math.
import math
def sigmoid(x):
return 1 / (1 + math.exp(-x))
# Learn: output 1 when input is big, 0 when small.
w, bias = 0.5, 0.0
for x, target in [(0.0, 0), (1.0, 1), (2.0, 1)]:
pred = sigmoid(w * x + bias)
error = target - pred
w += 0.5 * error * x # gradient descent, one small step
print(f"input {x} -> prediction {pred:.2f} (target {target}), weight now {w:.2f}")
print("Final weight:", round(w, 2))
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Explore neural networks from perceptrons to multilayer perceptrons, learning how they adapt via training, gradient descent, and backpropagation to solve complex AI tasks.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
18. Implementing Neural Networks using Pytorch
What it is
Learn to implement neural networks in PyTorch by mastering tensors, model building, loss functions, optimizers, data loading, and complete training loops for practical machine learning.
Why it matters
This is the foundation. Everything later — RAG, multimodal apps, deployment — builds on knowing what a foundation model is and how to judge it.
Code to copy (runs offline, standard Python only)
# Tiny neural network, offline simulation of "Implementing Neural Networks using Pytorch"
# Real version: PyTorch tensors, loss, optimizer, training loop.
# Here: one perceptron, one training step, plain Python + math.
import math
def sigmoid(x):
return 1 / (1 + math.exp(-x))
# Learn: output 1 when input is big, 0 when small.
w, bias = 0.5, 0.0
for x, target in [(0.0, 0), (1.0, 1), (2.0, 1)]:
pred = sigmoid(w * x + bias)
error = target - pred
w += 0.5 * error * x # gradient descent, one small step
print(f"input {x} -> prediction {pred:.2f} (target {target}), weight now {w:.2f}")
print("Final weight:", round(w, 2))
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Learn to implement neural networks in PyTorch by mastering tensors, model building, loss functions, optimizers, data loading, and complete training loops for practical machine learning.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
19. Model Interpretability and Ethics
What it is
Explore AI model interpretability and ethics, including bias, misinformation, environmental impact, and fairness for responsible development and deployment of AI technologies.
Why it matters
This is the foundation. Everything later — RAG, multimodal apps, deployment — builds on knowing what a foundation model is and how to judge it.
Code to copy (runs offline, standard Python only)
# Ethics check, offline simulation of "Model Interpretability and Ethics"
# A tiny bias check: does the fake model treat two groups the same?
def fake_model_score(text):
return 0.8 if "engineer" in text else 0.5
group_a = fake_model_score("she is an engineer")
group_b = fake_model_score("he is an engineer")
print("Score for 'she is an engineer':", group_a)
print("Score for 'he is an engineer':", group_b)
print("Gap:", round(abs(group_a - group_b), 2), "- a gap here means bias to fix.")
print("Also check: misinformation, privacy, and environmental cost (training energy).")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Explore AI model interpretability and ethics, including bias, misinformation, environmental impact, and fairness for responsible development and deployment of AI technologies.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
20. Generating Text using LLMs
What it is
Discover how LLMs generate text token by token using Hugging Face's Transformers, from tokenization to model use, and explore hands-on demos with efficient generation methods.
Why it matters
This is the foundation. Everything later — RAG, multimodal apps, deployment — builds on knowing what a foundation model is and how to judge it.
Code to copy (runs offline, standard Python only)
# Key ideas of "Generating Text using LLMs", as a checklist
# Run this, then try changing one line and running it again.
ideas = ["What it is: see the lesson text above.",
"Why it matters: it is one step toward building real AI apps.",
"Try it: run this code, change the words, run it again."]
for i, idea in enumerate(ideas, 1):
print(f"{i}. {idea}")
print("Lesson:", "Generating Text using LLMs")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Discover how LLMs generate text token by token using Hugging Face's Transformers, from tokenization to model use, and explore hands-on demos with efficient generation methods.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
21. Role-Based Prompting
What it is
Explains the theory of using roles or personas to control the tone, style, and expertise of an LLM's output.
Why it matters
This is the foundation. Everything later — RAG, multimodal apps, deployment — builds on knowing what a foundation model is and how to judge it.
Code to copy (runs offline, standard Python only)
# Prompting and inference, offline simulation of "Role-Based Prompting"
# Real version: LLM call with temperature, top-p, max_tokens, stop sequences.
# Here: a prompt template + a fake "model" that follows the instruction.
prompt = """Role: dietary consultant.
Task: check this recipe for nuts.
Context: the user is allergic to nuts.
Output format: JSON with keys 'safe' and 'reason'."""
recipe = "peanut butter cookies"
# Fake model: it follows the role + output format, no real LLM involved.
result = {"safe": False, "reason": "peanut butter contains peanuts (nuts)"}
print("Prompt sent:"); print(prompt)
print("Recipe:", recipe)
print("Structured answer:", result)
print("Temperature 0 = same answer every time; higher = more random.")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Explains the theory of using roles or personas to control the tone, style, and expertise of an LLM's output.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
22. Implementing Role-Based Prompting with Python
What it is
Provides hands-on practice in iteratively developing a role-based prompt to create a believable historical figure persona.
Why it matters
This is the foundation. Everything later — RAG, multimodal apps, deployment — builds on knowing what a foundation model is and how to judge it.
Code to copy (runs offline, standard Python only)
# Prompting and inference, offline simulation of "Implementing Role-Based Prompting with Python"
# Real version: LLM call with temperature, top-p, max_tokens, stop sequences.
# Here: a prompt template + a fake "model" that follows the instruction.
prompt = """Role: dietary consultant.
Task: check this recipe for nuts.
Context: the user is allergic to nuts.
Output format: JSON with keys 'safe' and 'reason'."""
recipe = "peanut butter cookies"
# Fake model: it follows the role + output format, no real LLM involved.
result = {"safe": False, "reason": "peanut butter contains peanuts (nuts)"}
print("Prompt sent:"); print(prompt)
print("Recipe:", recipe)
print("Structured answer:", result)
print("Temperature 0 = same answer every time; higher = more random.")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Provides hands-on practice in iteratively developing a role-based prompt to create a believable historical figure persona.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
23. Adapting Foundation Models
What it is
Learn to adapt foundation models for specialized tasks using prompt engineering, RAG, fine-tuning, model compression, and agentic AI tools for efficient, tailored AI solutions.
Why it matters
This is the foundation. Everything later — RAG, multimodal apps, deployment — builds on knowing what a foundation model is and how to judge it.
Code to copy (runs offline, standard Python only)
# LoRA idea, offline simulation of "Adapting Foundation Models"
# Real version: PEFT + LoRA on a Hugging Face model (needs GPU, PyTorch).
# LoRA freezes the big model and trains only two small matrices A and B.
# Here: a tiny "weight" plus a small low-rank update.
base = [1.0, 2.0, 3.0]
a = [0.1, 0.2, 0.3] # small matrix A (learned)
b = [0.5, 0.5, 0.5] # small matrix B (learned)
updated = [w + x * y for w, x, y in zip(base, a, b)]
print("Base weights: ", base)
print("After LoRA update:", updated)
print("Only A and B were trained - the big base model stayed frozen.")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Learn to adapt foundation models for specialized tasks using prompt engineering, RAG, fine-tuning, model compression, and agentic AI tools for efficient, tailored AI solutions.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
24. Applying PEFT on Foundation Models
What it is
Learn to efficiently customize foundation models with PEFT and SFT, using LoRA to teach LLMs new skills like spelling via hands-on data preparation and fine-tuning.
Why it matters
This is the foundation. Everything later — RAG, multimodal apps, deployment — builds on knowing what a foundation model is and how to judge it.
Code to copy (runs offline, standard Python only)
# LoRA idea, offline simulation of "Applying PEFT on Foundation Models"
# Real version: PEFT + LoRA on a Hugging Face model (needs GPU, PyTorch).
# LoRA freezes the big model and trains only two small matrices A and B.
# Here: a tiny "weight" plus a small low-rank update.
base = [1.0, 2.0, 3.0]
a = [0.1, 0.2, 0.3] # small matrix A (learned)
b = [0.5, 0.5, 0.5] # small matrix B (learned)
updated = [w + x * y for w, x, y in zip(base, a, b)]
print("Base weights: ", base)
print("After LoRA update:", updated)
print("Only A and B were trained - the big base model stayed frozen.")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Learn to efficiently customize foundation models with PEFT and SFT, using LoRA to teach LLMs new skills like spelling via hands-on data preparation and fine-tuning.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
25. Post-Training Foundation Models
What it is
Explore post-training for foundation models, including supervised and preference fine-tuning, to align AI with human values, improve usability, and ensure responsible interactions.
Why it matters
This is the foundation. Everything later — RAG, multimodal apps, deployment — builds on knowing what a foundation model is and how to judge it.
Code to copy (runs offline, standard Python only)
# LoRA idea, offline simulation of "Post-Training Foundation Models"
# Real version: PEFT + LoRA on a Hugging Face model (needs GPU, PyTorch).
# LoRA freezes the big model and trains only two small matrices A and B.
# Here: a tiny "weight" plus a small low-rank update.
base = [1.0, 2.0, 3.0]
a = [0.1, 0.2, 0.3] # small matrix A (learned)
b = [0.5, 0.5, 0.5] # small matrix B (learned)
updated = [w + x * y for w, x, y in zip(base, a, b)]
print("Base weights: ", base)
print("After LoRA update:", updated)
print("Only A and B were trained - the big base model stayed frozen.")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Explore post-training for foundation models, including supervised and preference fine-tuning, to align AI with human values, improve usability, and ensure responsible interactions.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
26. Reinforcement Fine-tuning on Foundation Models
What it is
Learn to fine-tune LLMs for structured tasks like counting and spelling using GRPO and LoRA, applying reinforcement-based reward functions for targeted skill improvements.
Why it matters
This is the foundation. Everything later — RAG, multimodal apps, deployment — builds on knowing what a foundation model is and how to judge it.
Code to copy (runs offline, standard Python only)
# GRPO reward, offline simulation of "Reinforcement Fine-tuning on Foundation Models"
# Real version: fine-tune a model with GRPO + LoRA (needs GPU, PyTorch,
# Hugging Face TRL). Here we simulate the reward function only.
# Reward = 1 if the model counts the letters right, else 0.
def reward(word, answer):
return 1 if answer == len(word) else 0
for word, guess in [("banana", 6), ("banana", 5), ("rocket", 6), ("moon", 4)]:
print(word, "has", len(word), "letters. Guess", guess,
"-> reward", reward(word, guess))
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Learn to fine-tune LLMs for structured tasks like counting and spelling using GRPO and LoRA, applying reinforcement-based reward functions for targeted skill improvements.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
27. Project: Teach an LLM to Count
What it is
Teaching an LLM to count the number of letters in a word using GRPO. Apply GRPO reinforcement learning and custom reward functions to fine-tune model behavior. Tags: LLMs, Reinforcement Learning, Fine-Tuning.
Why it matters
This project is the proof for its course. If you can build it, you can do the work, not just read about it.
Code to copy (runs offline, standard Python only)
# GRPO reward, offline simulation of "Reinforcement Fine-tuning on Foundation Models"
# Real version: fine-tune a model with GRPO + LoRA (needs GPU, PyTorch,
# Hugging Face TRL). Here we simulate the reward function only.
# Reward = 1 if the model counts the letters right, else 0.
def reward(word, answer):
return 1 if answer == len(word) else 0
for word, guess in [("banana", 6), ("banana", 5), ("rocket", 6), ("moon", 4)]:
print(word, "has", len(word), "letters. Guess", guess,
"-> reward", reward(word, guess))
Try it yourself
Build the project step by step, using the lessons of its course. Test each part before moving on.
Check
What must I build?
Teaching an LLM to count the number of letters in a word using GRPO. Apply GRPO reinforcement learning and custom reward functions to fine-tune model behavior. Tags: LLMs, Reinforcement Learning, Fine-Tuning.
28. Course 2: Large Language Models (LLMs) and Retrieval Augmented Generation (RAG) (17 hours)
What it is
Master Large Language Models (LLMs) and build sophisticated text generation applications in this hands-on course. You'll master prompt engineering techniques, optimize model selection and costs, and dive deep into Retrieval-Augmented Generation (RAG), using vector databases to ground AI responses in external data and eliminate hallucinations. Finally, you'll evaluate system performance with RAGAS and showcase your skills by building an end-to-end RAG application.
Why it matters
This course is one third of the program. Work through its lessons in order — each one builds on the one before it.
Code to copy (runs offline, standard Python only)
# Course 2: Large Language Models (LLMs) and Retrieval Augmented Generation (RAG) (17 hours)
# 17 lessons + 1 project.
print("Course 2: Large Language Models (LLMs) and Retrieval Augmented Generation (RAG)")
print("Hours:", "17 hours")
print("Lessons:", 17)
Try it yourself
Read the course description above, then start its first lesson.
Check
How many lessons in this course?
17 lessons, plus one project.
How long is this course?
17 hours.
29. Introduction to LLMs and Retrieval Augmented Generation (RAG)
What it is
Introduces Large Language Models (LLMs), their core concepts, and the course structure. Covers prerequisites, environment setup, and defines Retrieval-Augmented Generation (RAG).
Why it matters
RAG is the skill that stops an AI from inventing answers. It connects the model to real documents, so answers can be checked.
Code to copy (runs offline, standard Python only)
# Tiny RAG, offline simulation of "Introduction to LLMs and Retrieval Augmented Generation (RAG)"
# Real version: ChromaDB vector database + embeddings + LLM (needs an API
# key and may cost money). Here: keyword scores stand in for embeddings.
docs = ["Apollo 11 landed on the Moon in 1969.",
"Voyager 1 left the Solar System in 2012.",
"The James Webb telescope looks at infrared light."]
question = "When did Apollo 11 land on the Moon?"
q_words = set(question.lower().replace("?", "").split())
scored = sorted(docs, key=lambda d: len(q_words & set(d.lower().split())), reverse=True)
print("Question:", question)
print("Best document:", scored[0])
print("Answer (grounded in the document): Apollo 11 landed on the Moon in 1969. [Source 1]")
print("Rule: if no document matches, say 'I do not know' - never invent an answer.")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Introduces Large Language Models (LLMs), their core concepts, and the course structure. Covers prerequisites, environment setup, and defines Retrieval-Augmented Generation (RAG).
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
30. The Large Language Model Landscape
What it is
Explore the four core capabilities of LLMs: generation, summarization, classification, and reasoning. Real-world applications and the importance of RAG for building trust.
Why it matters
RAG is the skill that stops an AI from inventing answers. It connects the model to real documents, so answers can be checked.
Code to copy (runs offline, standard Python only)
# Key ideas of "The Large Language Model Landscape", as a checklist
# Run this, then try changing one line and running it again.
ideas = ["What it is: see the lesson text above.",
"Why it matters: it is one step toward building real AI apps.",
"Try it: run this code, change the words, run it again."]
for i, idea in enumerate(ideas, 1):
print(f"{i}. {idea}")
print("Lesson:", "The Large Language Model Landscape")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Explore the four core capabilities of LLMs: generation, summarization, classification, and reasoning. Real-world applications and the importance of RAG for building trust.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
31. Implementing a Chatbot with an LLM
What it is
Learn to build a stateful chatbot using an LLM. Covers managing conversation history, using system prompts to define behavior, and understanding message roles (system, user, assistant).
Why it matters
RAG is the skill that stops an AI from inventing answers. It connects the model to real documents, so answers can be checked.
Code to copy (runs offline, standard Python only)
# Stateful chatbot, offline simulation of "Implementing a Chatbot with an LLM"
# Real version: an LLM call with a messages list (OpenAI / Gemini API).
# Here: a tiny rule-based bot that remembers the conversation history.
history = [{"role": "system", "content": "You are a helpful NASA assistant."}]
def chat(user_text):
history.append({"role": "user", "content": user_text})
if "moon" in user_text.lower():
reply = "Apollo 11 landed on the Moon in 1969."
else:
reply = "I can help with NASA missions. Ask me about the Moon."
history.append({"role": "assistant", "content": reply})
return reply
print(chat("Tell me about the Moon."))
print(chat("Thanks!"))
print("History kept:", len(history), "messages (system + user + assistant).")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Learn to build a stateful chatbot using an LLM. Covers managing conversation history, using system prompts to define behavior, and understanding message roles (system, user, assistant).
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
32. LLM Prompting & Inference
What it is
Defines prompt engineering and its components. Explains how to control LLM outputs using inference parameters like temperature, top-p, max tokens, and stop sequences.
Why it matters
RAG is the skill that stops an AI from inventing answers. It connects the model to real documents, so answers can be checked.
Code to copy (runs offline, standard Python only)
# Prompting and inference, offline simulation of "LLM Prompting & Inference"
# Real version: LLM call with temperature, top-p, max_tokens, stop sequences.
# Here: a prompt template + a fake "model" that follows the instruction.
prompt = """Role: dietary consultant.
Task: check this recipe for nuts.
Context: the user is allergic to nuts.
Output format: JSON with keys 'safe' and 'reason'."""
recipe = "peanut butter cookies"
# Fake model: it follows the role + output format, no real LLM involved.
result = {"safe": False, "reason": "peanut butter contains peanuts (nuts)"}
print("Prompt sent:"); print(prompt)
print("Recipe:", recipe)
print("Structured answer:", result)
print("Temperature 0 = same answer every time; higher = more random.")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Defines prompt engineering and its components. Explains how to control LLM outputs using inference parameters like temperature, top-p, max tokens, and stop sequences.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
33. Applied Prompting and Inference
What it is
Apply prompting techniques hands-on. Implement Chain of Thought (CoT) prompting to improve reasoning and test how different inference parameters change model behavior.
Why it matters
RAG is the skill that stops an AI from inventing answers. It connects the model to real documents, so answers can be checked.
Code to copy (runs offline, standard Python only)
# Prompting and inference, offline simulation of "Applied Prompting and Inference"
# Real version: LLM call with temperature, top-p, max_tokens, stop sequences.
# Here: a prompt template + a fake "model" that follows the instruction.
prompt = """Role: dietary consultant.
Task: check this recipe for nuts.
Context: the user is allergic to nuts.
Output format: JSON with keys 'safe' and 'reason'."""
recipe = "peanut butter cookies"
# Fake model: it follows the role + output format, no real LLM involved.
result = {"safe": False, "reason": "peanut butter contains peanuts (nuts)"}
print("Prompt sent:"); print(prompt)
print("Recipe:", recipe)
print("Structured answer:", result)
print("Temperature 0 = same answer every time; higher = more random.")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Apply prompting techniques hands-on. Implement Chain of Thought (CoT) prompting to improve reasoning and test how different inference parameters change model behavior.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
34. Prompt Instruction Refinement
What it is
Explains the theory of systematically refining prompt instructions by modifying components like Role, Task, Context, Examples, and Output Format.
Why it matters
RAG is the skill that stops an AI from inventing answers. It connects the model to real documents, so answers can be checked.
Code to copy (runs offline, standard Python only)
# Prompting and inference, offline simulation of "Prompt Instruction Refinement"
# Real version: LLM call with temperature, top-p, max_tokens, stop sequences.
# Here: a prompt template + a fake "model" that follows the instruction.
prompt = """Role: dietary consultant.
Task: check this recipe for nuts.
Context: the user is allergic to nuts.
Output format: JSON with keys 'safe' and 'reason'."""
recipe = "peanut butter cookies"
# Fake model: it follows the role + output format, no real LLM involved.
result = {"safe": False, "reason": "peanut butter contains peanuts (nuts)"}
print("Prompt sent:"); print(prompt)
print("Recipe:", recipe)
print("Structured answer:", result)
print("Temperature 0 = same answer every time; higher = more random.")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Explains the theory of systematically refining prompt instructions by modifying components like Role, Task, Context, Examples, and Output Format.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
35. Applying Prompt Instruction Refinement with Python
What it is
Provides hands-on practice iteratively refining a prompt to transform a generic recipe analyzer into a precise dietary consultant that produces structured JSON.
Why it matters
RAG is the skill that stops an AI from inventing answers. It connects the model to real documents, so answers can be checked.
Code to copy (runs offline, standard Python only)
# Prompting and inference, offline simulation of "Applying Prompt Instruction Refinement with Python"
# Real version: LLM call with temperature, top-p, max_tokens, stop sequences.
# Here: a prompt template + a fake "model" that follows the instruction.
prompt = """Role: dietary consultant.
Task: check this recipe for nuts.
Context: the user is allergic to nuts.
Output format: JSON with keys 'safe' and 'reason'."""
recipe = "peanut butter cookies"
# Fake model: it follows the role + output format, no real LLM involved.
result = {"safe": False, "reason": "peanut butter contains peanuts (nuts)"}
print("Prompt sent:"); print(prompt)
print("Recipe:", recipe)
print("Structured answer:", result)
print("Temperature 0 = same answer every time; higher = more random.")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Provides hands-on practice iteratively refining a prompt to transform a generic recipe analyzer into a precise dietary consultant that produces structured JSON.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
36. Tokens, Embeddings, and Vector Search
What it is
Covers the foundations of NLP for LLMs. Defines tokenization, embeddings as semantic vectors, and vector search (similarity search) as the basis for finding relevant information.
Why it matters
RAG is the skill that stops an AI from inventing answers. It connects the model to real documents, so answers can be checked.
Code to copy (runs offline, standard Python only)
# Tokens and embeddings, offline simulation of "Tokens, Embeddings, and Vector Search"
# Real version: a tokenizer + embedding model (Hugging Face / OpenAI API).
# Here: a word becomes a small list of numbers; similar words get similar lists.
import math
def fake_embed(word):
# Toy "embedding": length, vowels, first-letter code.
return [len(word), sum(c in "aeiou" for c in word), ord(word[0]) % 10]
def cosine(a, b):
dot = sum(x * y for x, y in zip(a, b))
na = math.sqrt(sum(x * x for x in a)); nb = math.sqrt(sum(y * y for y in b))
return round(dot / (na * nb), 2)
for w in ["moon", "mars", "banana"]:
print(w, "->", fake_embed(w))
print("Similarity moon/mars: ", cosine(fake_embed("moon"), fake_embed("mars")))
print("Similarity moon/banana:", cosine(fake_embed("moon"), fake_embed("banana")))
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Covers the foundations of NLP for LLMs. Defines tokenization, embeddings as semantic vectors, and vector search (similarity search) as the basis for finding relevant information.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
37. Implementing Tokens, Embeddings, and Vector Search
What it is
Hands-on practice with tokenization. Implementing embedding generation and vector search to build a semantic search system from scratch.
Why it matters
RAG is the skill that stops an AI from inventing answers. It connects the model to real documents, so answers can be checked.
Code to copy (runs offline, standard Python only)
# Tokens and embeddings, offline simulation of "Implementing Tokens, Embeddings, and Vector Search"
# Real version: a tokenizer + embedding model (Hugging Face / OpenAI API).
# Here: a word becomes a small list of numbers; similar words get similar lists.
import math
def fake_embed(word):
# Toy "embedding": length, vowels, first-letter code.
return [len(word), sum(c in "aeiou" for c in word), ord(word[0]) % 10]
def cosine(a, b):
dot = sum(x * y for x, y in zip(a, b))
na = math.sqrt(sum(x * x for x in a)); nb = math.sqrt(sum(y * y for y in b))
return round(dot / (na * nb), 2)
for w in ["moon", "mars", "banana"]:
print(w, "->", fake_embed(w))
print("Similarity moon/mars: ", cosine(fake_embed("moon"), fake_embed("mars")))
print("Similarity moon/banana:", cosine(fake_embed("moon"), fake_embed("banana")))
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Hands-on practice with tokenization. Implementing embedding generation and vector search to build a semantic search system from scratch.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
38. Strategic Model Selection & Economics
What it is
Learn the business trade-offs of model selection. Covers performance, cost, speed, and control (TCO). Compares general-purpose (generation) vs. specialized (reasoning) models.
Why it matters
RAG is the skill that stops an AI from inventing answers. It connects the model to real documents, so answers can be checked.
Code to copy (runs offline, standard Python only)
# Model selection and cost, offline simulation of "Strategic Model Selection & Economics"
# TCO = Total Cost of Ownership: price + cost of mistakes.
models = {"small": {"price": 0.001, "error_rate": 0.10},
"big": {"price": 0.010, "error_rate": 0.01}}
calls, error_cost = 10000, 1.00 # $1 lost each time the model is wrong
for name, m in models.items():
total = calls * m["price"] + calls * m["error_rate"] * error_cost
print(f"{name}: ${total:.0f} total for {calls} calls (price + errors)")
print("Rule: the cheap model is not cheap if its mistakes cost more.")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Learn the business trade-offs of model selection. Covers performance, cost, speed, and control (TCO). Compares general-purpose (generation) vs. specialized (reasoning) models.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
39. Applying Model Selection and Economics
What it is
Apply model selection theory. Calculate Total Cost of Ownership (TCO) including error costs. Implement a hybrid model routing system to balance cost and quality.
Why it matters
RAG is the skill that stops an AI from inventing answers. It connects the model to real documents, so answers can be checked.
Code to copy (runs offline, standard Python only)
# Model selection and cost, offline simulation of "Applying Model Selection and Economics"
# TCO = Total Cost of Ownership: price + cost of mistakes.
models = {"small": {"price": 0.001, "error_rate": 0.10},
"big": {"price": 0.010, "error_rate": 0.01}}
calls, error_cost = 10000, 1.00 # $1 lost each time the model is wrong
for name, m in models.items():
total = calls * m["price"] + calls * m["error_rate"] * error_cost
print(f"{name}: ${total:.0f} total for {calls} calls (price + errors)")
print("Rule: the cheap model is not cheap if its mistakes cost more.")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Apply model selection theory. Calculate Total Cost of Ownership (TCO) including error costs. Implement a hybrid model routing system to balance cost and quality.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
40. Retrieval Augmented Generation (RAG) Workflow
What it is
Introduces the RAG architecture. Compares naive vs. advanced modular RAG. Covers the data ingestion pipeline, focusing on data formats and intelligent chunking strategies.
Why it matters
RAG is the skill that stops an AI from inventing answers. It connects the model to real documents, so answers can be checked.
Code to copy (runs offline, standard Python only)
# Tiny RAG, offline simulation of "Retrieval Augmented Generation (RAG) Workflow"
# Real version: ChromaDB vector database + embeddings + LLM (needs an API
# key and may cost money). Here: keyword scores stand in for embeddings.
docs = ["Apollo 11 landed on the Moon in 1969.",
"Voyager 1 left the Solar System in 2012.",
"The James Webb telescope looks at infrared light."]
question = "When did Apollo 11 land on the Moon?"
q_words = set(question.lower().replace("?", "").split())
scored = sorted(docs, key=lambda d: len(q_words & set(d.lower().split())), reverse=True)
print("Question:", question)
print("Best document:", scored[0])
print("Answer (grounded in the document): Apollo 11 landed on the Moon in 1969. [Source 1]")
print("Rule: if no document matches, say 'I do not know' - never invent an answer.")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Introduces the RAG architecture. Compares naive vs. advanced modular RAG. Covers the data ingestion pipeline, focusing on data formats and intelligent chunking strategies.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
41. Semantic Search with Vector Databases for RAG
What it is
Explains semantic search and the role of vector databases. Covers indexing algorithms (HNSW) for speed and advanced retrieval techniques like HyDE and re-ranking.
Why it matters
RAG is the skill that stops an AI from inventing answers. It connects the model to real documents, so answers can be checked.
Code to copy (runs offline, standard Python only)
# Tiny RAG, offline simulation of "Semantic Search with Vector Databases for RAG"
# Real version: ChromaDB vector database + embeddings + LLM (needs an API
# key and may cost money). Here: keyword scores stand in for embeddings.
docs = ["Apollo 11 landed on the Moon in 1969.",
"Voyager 1 left the Solar System in 2012.",
"The James Webb telescope looks at infrared light."]
question = "When did Apollo 11 land on the Moon?"
q_words = set(question.lower().replace("?", "").split())
scored = sorted(docs, key=lambda d: len(q_words & set(d.lower().split())), reverse=True)
print("Question:", question)
print("Best document:", scored[0])
print("Answer (grounded in the document): Apollo 11 landed on the Moon in 1969. [Source 1]")
print("Rule: if no document matches, say 'I do not know' - never invent an answer.")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Explains semantic search and the role of vector databases. Covers indexing algorithms (HNSW) for speed and advanced retrieval techniques like HyDE and re-ranking.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
42. Prompt Engineering for RAG Synthesis
What it is
Learn to write prompts for RAG. Covers grounding answers in context, handling conflicts, managing uncertainty, and enforcing verifiability by generating inline citations.
Why it matters
RAG is the skill that stops an AI from inventing answers. It connects the model to real documents, so answers can be checked.
Code to copy (runs offline, standard Python only)
# Tiny RAG, offline simulation of "Prompt Engineering for RAG Synthesis"
# Real version: ChromaDB vector database + embeddings + LLM (needs an API
# key and may cost money). Here: keyword scores stand in for embeddings.
docs = ["Apollo 11 landed on the Moon in 1969.",
"Voyager 1 left the Solar System in 2012.",
"The James Webb telescope looks at infrared light."]
question = "When did Apollo 11 land on the Moon?"
q_words = set(question.lower().replace("?", "").split())
scored = sorted(docs, key=lambda d: len(q_words & set(d.lower().split())), reverse=True)
print("Question:", question)
print("Best document:", scored[0])
print("Answer (grounded in the document): Apollo 11 landed on the Moon in 1969. [Source 1]")
print("Rule: if no document matches, say 'I do not know' - never invent an answer.")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Learn to write prompts for RAG. Covers grounding answers in context, handling conflicts, managing uncertainty, and enforcing verifiability by generating inline citations.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
43. Implementing RAG with Vector Databases
What it is
Build a complete RAG system. Practice vector database operations in ChromaDB, including adding documents, applying metadata filters, and implementing a retrieval and generation pipeline.
Why it matters
RAG is the skill that stops an AI from inventing answers. It connects the model to real documents, so answers can be checked.
Code to copy (runs offline, standard Python only)
# Tiny RAG, offline simulation of "Implementing RAG with Vector Databases"
# Real version: ChromaDB vector database + embeddings + LLM (needs an API
# key and may cost money). Here: keyword scores stand in for embeddings.
docs = ["Apollo 11 landed on the Moon in 1969.",
"Voyager 1 left the Solar System in 2012.",
"The James Webb telescope looks at infrared light."]
question = "When did Apollo 11 land on the Moon?"
q_words = set(question.lower().replace("?", "").split())
scored = sorted(docs, key=lambda d: len(q_words & set(d.lower().split())), reverse=True)
print("Question:", question)
print("Best document:", scored[0])
print("Answer (grounded in the document): Apollo 11 landed on the Moon in 1969. [Source 1]")
print("Rule: if no document matches, say 'I do not know' - never invent an answer.")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Build a complete RAG system. Practice vector database operations in ChromaDB, including adding documents, applying metadata filters, and implementing a retrieval and generation pipeline.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
44. Evaluating RAG Systems
What it is
Learn to evaluate RAG system quality. Introduces key metrics: Context Precision, Context Recall, Faithfulness, and Answer Relevancy. Covers frameworks like RAGAS.
Why it matters
RAG is the skill that stops an AI from inventing answers. It connects the model to real documents, so answers can be checked.
Code to copy (runs offline, standard Python only)
# RAG evaluation, offline simulation of "Evaluating RAG Systems"
# Real version: RAGAS framework (needs an LLM + embeddings, may cost money).
# Here: score a fake answer against the retrieved context, by hand.
context = "Apollo 11 landed on the Moon on 20 July 1969."
answer = "Apollo 11 landed on the Moon in 1969."
words_a = set(answer.lower().replace(".", "").split())
words_c = set(context.lower().replace(".", "").split())
faithfulness = len(words_a & words_c) / max(len(words_a), 1)
print("Context:", context)
print("Answer: ", answer)
print("Faithfulness (shared words / answer words):", round(faithfulness, 2))
print("Context Precision, Context Recall, Answer Relevancy work the same way: compare answer vs. context vs. question.")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Learn to evaluate RAG system quality. Introduces key metrics: Context Precision, Context Recall, Faithfulness, and Answer Relevancy. Covers frameworks like RAGAS.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
45. RAG Evaluation Implementation
What it is
Implement a RAG evaluation pipeline using the RAGAS framework. Learn to calculate and interpret quality metrics to diagnose and improve your RAG system's performance.
Why it matters
RAG is the skill that stops an AI from inventing answers. It connects the model to real documents, so answers can be checked.
Code to copy (runs offline, standard Python only)
# RAG evaluation, offline simulation of "RAG Evaluation Implementation"
# Real version: RAGAS framework (needs an LLM + embeddings, may cost money).
# Here: score a fake answer against the retrieved context, by hand.
context = "Apollo 11 landed on the Moon on 20 July 1969."
answer = "Apollo 11 landed on the Moon in 1969."
words_a = set(answer.lower().replace(".", "").split())
words_c = set(context.lower().replace(".", "").split())
faithfulness = len(words_a & words_c) / max(len(words_a), 1)
print("Context:", context)
print("Answer: ", answer)
print("Faithfulness (shared words / answer words):", round(faithfulness, 2))
print("Context Precision, Context Recall, Answer Relevancy work the same way: compare answer vs. context vs. question.")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Implement a RAG evaluation pipeline using the RAGAS framework. Learn to calculate and interpret quality metrics to diagnose and improve your RAG system's performance.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
46. Project: NASA RAG Chat System
What it is
Build an end-to-end RAG chatbot. Ingest NASA mission data, build a vector search pipeline, generate answers, and evaluate the system's quality. Tags: RAG, Vector Search, Generative AI.
Why it matters
This project is the proof for its course. If you can build it, you can do the work, not just read about it.
Code to copy (runs offline, standard Python only)
# Tiny RAG, offline simulation of "Implementing RAG with Vector Databases"
# Real version: ChromaDB vector database + embeddings + LLM (needs an API
# key and may cost money). Here: keyword scores stand in for embeddings.
docs = ["Apollo 11 landed on the Moon in 1969.",
"Voyager 1 left the Solar System in 2012.",
"The James Webb telescope looks at infrared light."]
question = "When did Apollo 11 land on the Moon?"
q_words = set(question.lower().replace("?", "").split())
scored = sorted(docs, key=lambda d: len(q_words & set(d.lower().split())), reverse=True)
print("Question:", question)
print("Best document:", scored[0])
print("Answer (grounded in the document): Apollo 11 landed on the Moon in 1969. [Source 1]")
print("Rule: if no document matches, say 'I do not know' - never invent an answer.")
Try it yourself
Build the project step by step, using the lessons of its course. Test each part before moving on.
Check
What must I build?
Build an end-to-end RAG chatbot. Ingest NASA mission data, build a vector search pipeline, generate answers, and evaluate the system's quality. Tags: RAG, Vector Search, Generative AI.
47. Course 3: Multimodal AI Applications (18 hours)
What it is
Learn how computers process and understand image data, then harness the power of the latest Generative AI models to create new images.
Why it matters
This course is one third of the program. Work through its lessons in order — each one builds on the one before it.
Code to copy (runs offline, standard Python only)
# Course 3: Multimodal AI Applications (18 hours)
# 44 lessons + 1 project.
print("Course 3: Multimodal AI Applications")
print("Hours:", "18 hours")
print("Lessons:", 44)
Try it yourself
Read the course description above, then start its first lesson.
Check
How many lessons in this course?
44 lessons, plus one project.
How long is this course?
18 hours.
48. Introduction
What it is
Get an overview of multimodal generative AI, core concepts, industry tools, and how to access and use the Gemini API for hands-on practice.
Why it matters
Multimodal AI is how real products work: a customer sends text, a photo, and a voice note, and one system has to understand all three.
Code to copy (runs offline, standard Python only)
# Generative AI in one page, offline simulation of "Introduction"
# Text, image, audio, video: one idea - learn patterns, then make new data.
# Text, image, audio, video: one idea - learn patterns, then make new data.
modalities = {"text": "write a summary", "image": "draw a picture",
"audio": "read text aloud", "video": "make a short clip"}
for kind, job in modalities.items():
print(f"{{kind}}: {{job}}")
print("LLM-assisted coding idea: ask for code, run it, check it, fix it.")
print("Always validate AI output - a confident answer can still be wrong.")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Get an overview of multimodal generative AI, core concepts, industry tools, and how to access and use the Gemini API for hands-on practice.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
49. Multimodal AI Fundamentals
What it is
Discover multimodal AI fundamentals and technologies, including models and use cases that process and generate text, images, audio, and video for richer, real-world applications.
Why it matters
Multimodal AI is how real products work: a customer sends text, a photo, and a voice note, and one system has to understand all three.
Code to copy (runs offline, standard Python only)
# Multimodal answer, offline simulation of "Multimodal AI Fundamentals"
# Real version: Gemini API with text + image + audio (needs an API key,
# may cost money). Here: one answer built from three small inputs.
answer = {"text": "The customer is unhappy about a late delivery.",
"image": "photo shows a damaged box",
"audio": "voice sounds frustrated"}
print("Text says: ", answer["text"])
print("Image shows:", answer["image"])
print("Audio sounds:", answer["audio"])
print("Combined answer: unhappy customer, late delivery, damaged box - offer a replacement.")
print("Structured output: the answer above is a fixed JSON shape, easy to check.")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Discover multimodal AI fundamentals and technologies, including models and use cases that process and generate text, images, audio, and video for richer, real-world applications.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
50. Using Multimodal AI Technologies
What it is
Explore practical applications of multimodal AI by using APIs and open-source models for image captioning and audio transcription, with hands-on exercises and secure credential handling.
Why it matters
Multimodal AI is how real products work: a customer sends text, a photo, and a voice note, and one system has to understand all three.
Code to copy (runs offline, standard Python only)
# Multimodal answer, offline simulation of "Using Multimodal AI Technologies"
# Real version: Gemini API with text + image + audio (needs an API key,
# may cost money). Here: one answer built from three small inputs.
answer = {"text": "The customer is unhappy about a late delivery.",
"image": "photo shows a damaged box",
"audio": "voice sounds frustrated"}
print("Text says: ", answer["text"])
print("Image shows:", answer["image"])
print("Audio sounds:", answer["audio"])
print("Combined answer: unhappy customer, late delivery, damaged box - offer a replacement.")
print("Structured output: the answer above is a fixed JSON shape, easy to check.")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Explore practical applications of multimodal AI by using APIs and open-source models for image captioning and audio transcription, with hands-on exercises and secure credential handling.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
51. Transformers & Multimodal Processing
What it is
Explore how transformers unify text, images, audio, and video through attention, embeddings, and fusion strategies, powering state-of-the-art multimodal understanding and generation.
Why it matters
Multimodal AI is how real products work: a customer sends text, a photo, and a voice note, and one system has to understand all three.
Code to copy (runs offline, standard Python only)
# Attention idea, offline simulation of "Transformers & Multimodal Processing"
# Real version: Transformer self-attention (PyTorch). Here: a weighted average
# where each word pays more attention to the most relevant word.
words = ["the", "cat", "sat"]
weights = [0.1, 0.7, 0.2] # attention: "cat" matters most here
scores = {"the": 1, "cat": 5, "sat": 2}
result = sum(w * scores[word] for w, word in zip(weights, words))
print("Words:", words)
print("Attention weights:", weights)
print("Weighted meaning score:", round(result, 2))
print("Self-attention = every word looks at every other word, then mixes.")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Explore how transformers unify text, images, audio, and video through attention, embeddings, and fusion strategies, powering state-of-the-art multimodal understanding and generation.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
52. Multimodal AI Tooling
What it is
Explore practical tools for building multimodal AI apps, compare commercial and open-source options, and use Pydantic AI to create reliable, structured, vendor-agnostic workflows.
Why it matters
Multimodal AI is how real products work: a customer sends text, a photo, and a voice note, and one system has to understand all three.
Code to copy (runs offline, standard Python only)
# Multimodal answer, offline simulation of "Multimodal AI Tooling"
# Real version: Gemini API with text + image + audio (needs an API key,
# may cost money). Here: one answer built from three small inputs.
answer = {"text": "The customer is unhappy about a late delivery.",
"image": "photo shows a damaged box",
"audio": "voice sounds frustrated"}
print("Text says: ", answer["text"])
print("Image shows:", answer["image"])
print("Audio sounds:", answer["audio"])
print("Combined answer: unhappy customer, late delivery, damaged box - offer a replacement.")
print("Structured output: the answer above is a fixed JSON shape, easy to check.")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Explore practical tools for building multimodal AI apps, compare commercial and open-source options, and use Pydantic AI to create reliable, structured, vendor-agnostic workflows.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
53. Introduction to Enterprise Visual Content Processing
What it is
Explore enterprise visual content processing: core computer vision tasks, digital image representation, and real-world applications for efficiency, safety, and automation.
Why it matters
Multimodal AI is how real products work: a customer sends text, a photo, and a voice note, and one system has to understand all three.
Code to copy (runs offline, standard Python only)
# Generative AI in one page, offline simulation of "Introduction to Enterprise Visual Content Processing"
# Text, image, audio, video: one idea - learn patterns, then make new data.
# Text, image, audio, video: one idea - learn patterns, then make new data.
modalities = {"text": "write a summary", "image": "draw a picture",
"audio": "read text aloud", "video": "make a short clip"}
for kind, job in modalities.items():
print(f"{{kind}}: {{job}}")
print("LLM-assisted coding idea: ask for code, run it, check it, fix it.")
print("Always validate AI output - a confident answer can still be wrong.")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Explore enterprise visual content processing: core computer vision tasks, digital image representation, and real-world applications for efficiency, safety, and automation.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
54. Vision Pre-processing Pipelines with HuggingFace
What it is
Explore vision data pipelines using HuggingFace, from dataset loading to resizing and normalization, with demos and hands-on exercises for effective image pre-processing.
Why it matters
Multimodal AI is how real products work: a customer sends text, a photo, and a voice note, and one system has to understand all three.
Code to copy (runs offline, standard Python only)
# Vision basics, offline simulation of "Vision Pre-processing Pipelines with HuggingFace"
# Real version: Hugging Face vision pipeline / SAM / RT-DETR / DINOv2.
# Here: a tiny 3x3 "image" (numbers = brightness), resized + normalized.
image = [[0, 128, 255], [64, 192, 32], [255, 0, 96]]
flat = [v / 255 for row in image for v in row] # normalize to 0-1
print("Original pixels:", image)
print("Normalized (0 to 1):", [round(v, 2) for v in flat])
print("Mean brightness:", round(sum(flat) / len(flat), 2))
print("Vision models do this first, then split the image into patches (tokens).")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Explore vision data pipelines using HuggingFace, from dataset loading to resizing and normalization, with demos and hands-on exercises for effective image pre-processing.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
55. Understanding Embeddings in Computer Vision
What it is
Learn how embeddings convert images into compact vectors for efficient search, enable cross-modal tasks with models like CLIP, and power large-scale, robust computer vision systems.
Why it matters
Multimodal AI is how real products work: a customer sends text, a photo, and a voice note, and one system has to understand all three.
Code to copy (runs offline, standard Python only)
# Tokens and embeddings, offline simulation of "Understanding Embeddings in Computer Vision"
# Real version: a tokenizer + embedding model (Hugging Face / OpenAI API).
# Here: a word becomes a small list of numbers; similar words get similar lists.
import math
def fake_embed(word):
# Toy "embedding": length, vowels, first-letter code.
return [len(word), sum(c in "aeiou" for c in word), ord(word[0]) % 10]
def cosine(a, b):
dot = sum(x * y for x, y in zip(a, b))
na = math.sqrt(sum(x * x for x in a)); nb = math.sqrt(sum(y * y for y in b))
return round(dot / (na * nb), 2)
for w in ["moon", "mars", "banana"]:
print(w, "->", fake_embed(w))
print("Similarity moon/mars: ", cosine(fake_embed("moon"), fake_embed("mars")))
print("Similarity moon/banana:", cosine(fake_embed("moon"), fake_embed("banana")))
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Learn how embeddings convert images into compact vectors for efficient search, enable cross-modal tasks with models like CLIP, and power large-scale, robust computer vision systems.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
56. Image Search Using CLIP Embeddings
What it is
Explore how to build text-to-image and image-to-image search using CLIP embeddings, combining theory, real-world demos, hands-on practice, and solution walkthroughs.
Why it matters
Multimodal AI is how real products work: a customer sends text, a photo, and a voice note, and one system has to understand all three.
Code to copy (runs offline, standard Python only)
# Tokens and embeddings, offline simulation of "Image Search Using CLIP Embeddings"
# Real version: a tokenizer + embedding model (Hugging Face / OpenAI API).
# Here: a word becomes a small list of numbers; similar words get similar lists.
import math
def fake_embed(word):
# Toy "embedding": length, vowels, first-letter code.
return [len(word), sum(c in "aeiou" for c in word), ord(word[0]) % 10]
def cosine(a, b):
dot = sum(x * y for x, y in zip(a, b))
na = math.sqrt(sum(x * x for x in a)); nb = math.sqrt(sum(y * y for y in b))
return round(dot / (na * nb), 2)
for w in ["moon", "mars", "banana"]:
print(w, "->", fake_embed(w))
print("Similarity moon/mars: ", cosine(fake_embed("moon"), fake_embed("mars")))
print("Similarity moon/banana:", cosine(fake_embed("moon"), fake_embed("banana")))
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Explore how to build text-to-image and image-to-image search using CLIP embeddings, combining theory, real-world demos, hands-on practice, and solution walkthroughs.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
57. Using Multimodal Model APIs for Vision
What it is
Explore multimodal vision APIs: prompt design, parameter tuning, structured outputs, cost control, integration, and best practices for robust, efficient image analysis.
Why it matters
Multimodal AI is how real products work: a customer sends text, a photo, and a voice note, and one system has to understand all three.
Code to copy (runs offline, standard Python only)
# Vision basics, offline simulation of "Using Multimodal Model APIs for Vision"
# Real version: Hugging Face vision pipeline / SAM / RT-DETR / DINOv2.
# Here: a tiny 3x3 "image" (numbers = brightness), resized + normalized.
image = [[0, 128, 255], [64, 192, 32], [255, 0, 96]]
flat = [v / 255 for row in image for v in row] # normalize to 0-1
print("Original pixels:", image)
print("Normalized (0 to 1):", [round(v, 2) for v in flat])
print("Mean brightness:", round(sum(flat) / len(flat), 2))
print("Vision models do this first, then split the image into patches (tokens).")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Explore multimodal vision APIs: prompt design, parameter tuning, structured outputs, cost control, integration, and best practices for robust, efficient image analysis.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
58. Gemini Vision API Basics
What it is
Explore Gemini Vision API basics by practicing image moderation, learning to analyze images and implement moderation workflows using real-world examples and guided hands-on exercises.
Why it matters
Multimodal AI is how real products work: a customer sends text, a photo, and a voice note, and one system has to understand all three.
Code to copy (runs offline, standard Python only)
# Vision basics, offline simulation of "Gemini Vision API Basics"
# Real version: Hugging Face vision pipeline / SAM / RT-DETR / DINOv2.
# Here: a tiny 3x3 "image" (numbers = brightness), resized + normalized.
image = [[0, 128, 255], [64, 192, 32], [255, 0, 96]]
flat = [v / 255 for row in image for v in row] # normalize to 0-1
print("Original pixels:", image)
print("Normalized (0 to 1):", [round(v, 2) for v in flat])
print("Mean brightness:", round(sum(flat) / len(flat), 2))
print("Vision models do this first, then split the image into patches (tokens).")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Explore Gemini Vision API basics by practicing image moderation, learning to analyze images and implement moderation workflows using real-world examples and guided hands-on exercises.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
59. Vision Transformer Models & Architectures
What it is
Explore Vision Transformer models: core architecture, image tokenization, self- and cross-attention, and top models (SAM, RT-DETR, DINOv2) for segmentation, detection, and enterprise use.
Why it matters
Multimodal AI is how real products work: a customer sends text, a photo, and a voice note, and one system has to understand all three.
Code to copy (runs offline, standard Python only)
# Vision basics, offline simulation of "Vision Transformer Models & Architectures"
# Real version: Hugging Face vision pipeline / SAM / RT-DETR / DINOv2.
# Here: a tiny 3x3 "image" (numbers = brightness), resized + normalized.
image = [[0, 128, 255], [64, 192, 32], [255, 0, 96]]
flat = [v / 255 for row in image for v in row] # normalize to 0-1
print("Original pixels:", image)
print("Normalized (0 to 1):", [round(v, 2) for v in flat])
print("Mean brightness:", round(sum(flat) / len(flat), 2))
print("Vision models do this first, then split the image into patches (tokens).")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Explore Vision Transformer models: core architecture, image tokenization, self- and cross-attention, and top models (SAM, RT-DETR, DINOv2) for segmentation, detection, and enterprise use.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
60. Using Vision Transformers
What it is
Explore vision transformers with hands-on demos: extract image embeddings using DINOv2 and perform object detection and segmentation using RT-DETR and SAM2.1 models.
Why it matters
Multimodal AI is how real products work: a customer sends text, a photo, and a voice note, and one system has to understand all three.
Code to copy (runs offline, standard Python only)
# Vision basics, offline simulation of "Using Vision Transformers"
# Real version: Hugging Face vision pipeline / SAM / RT-DETR / DINOv2.
# Here: a tiny 3x3 "image" (numbers = brightness), resized + normalized.
image = [[0, 128, 255], [64, 192, 32], [255, 0, 96]]
flat = [v / 255 for row in image for v in row] # normalize to 0-1
print("Original pixels:", image)
print("Normalized (0 to 1):", [round(v, 2) for v in flat])
print("Mean brightness:", round(sum(flat) / len(flat), 2))
print("Vision models do this first, then split the image into patches (tokens).")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Explore vision transformers with hands-on demos: extract image embeddings using DINOv2 and perform object detection and segmentation using RT-DETR and SAM2.1 models.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
61. Vision-Language Models
What it is
Learn how vision-language models align images and text for tasks like search, captioning, and VQA, with focus on architectures, applications, data needs, and deploying for enterprise use.
Why it matters
Multimodal AI is how real products work: a customer sends text, a photo, and a voice note, and one system has to understand all three.
Code to copy (runs offline, standard Python only)
# CLIP-style image search, offline simulation of "Vision-Language Models"
# Real version: CLIP embeddings (Hugging Face / OpenAI). Here: keyword tags
# stand in for image embeddings; text and images share one "space".
images = {"photo1.jpg": ["car", "road", "sunny"], "photo2.jpg": ["dog", "park"],
"photo3.jpg": ["car", "night", "street"]}
query = "car on the road"
q = set(query.split())
ranked = sorted(images.items(), key=lambda kv: len(q & set(kv[1])), reverse=True)
for name, tags in ranked:
print(name, tags, "-> match score", len(q & set(tags)))
print("Zero-shot: no training on 'car' needed - the shared space already knows it.")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Learn how vision-language models align images and text for tasks like search, captioning, and VQA, with focus on architectures, applications, data needs, and deploying for enterprise use.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
62. Multimodal Vision Applications with CLIP
What it is
Explore zero-shot image classification and auto-labeling for driving scenes using CLIP, enabling efficient, scalable multimodal vision applications.
Why it matters
Multimodal AI is how real products work: a customer sends text, a photo, and a voice note, and one system has to understand all three.
Code to copy (runs offline, standard Python only)
# CLIP-style image search, offline simulation of "Multimodal Vision Applications with CLIP"
# Real version: CLIP embeddings (Hugging Face / OpenAI). Here: keyword tags
# stand in for image embeddings; text and images share one "space".
images = {"photo1.jpg": ["car", "road", "sunny"], "photo2.jpg": ["dog", "park"],
"photo3.jpg": ["car", "night", "street"]}
query = "car on the road"
q = set(query.split())
ranked = sorted(images.items(), key=lambda kv: len(q & set(kv[1])), reverse=True)
for name, tags in ranked:
print(name, tags, "-> match score", len(q & set(tags)))
print("Zero-shot: no training on 'car' needed - the shared space already knows it.")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Explore zero-shot image classification and auto-labeling for driving scenes using CLIP, enabling efficient, scalable multimodal vision applications.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
63. Diffusion Models & Image Generation
What it is
Explore how diffusion models generate images by reversing noise through iterative denoising, inspired by physical diffusion processes and key to modern generative AI developments.
Why it matters
Multimodal AI is how real products work: a customer sends text, a photo, and a voice note, and one system has to understand all three.
Code to copy (runs offline, standard Python only)
# Diffusion idea, offline simulation of "Diffusion Models & Image Generation"
# Real version: a diffusion model (needs GPU). Here: noise fades step by step.
import random
random.seed(7)
image = [random.randint(0, 9) for _ in range(8)] # pure noise
print("Start (noise):", image)
for step in range(1, 4):
image = [max(0, v - 2) for v in image] # one denoising step
print(f"After denoise step {step}:", image)
print("Real diffusion does this with a trained model, thousands of steps.")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Explore how diffusion models generate images by reversing noise through iterative denoising, inspired by physical diffusion processes and key to modern generative AI developments.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
64. Introduction to Enterprise Audio Processing
What it is
Discover enterprise audio processing, core speech tasks (transcription, diarization, sentiment, TTS), key use cases, and strategies for value and integration in modern businesses.
Why it matters
Multimodal AI is how real products work: a customer sends text, a photo, and a voice note, and one system has to understand all three.
Code to copy (runs offline, standard Python only)
# Audio basics, offline simulation of "Introduction to Enterprise Audio Processing"
# Real version: Whisper / CLAP / librosa (needs audio files + models).
# Here: a fake waveform (list of numbers) + a tiny "transcription" table.
waveform = [0.0, 0.4, 0.9, 0.5, -0.2, -0.8, -0.3, 0.1] # sound samples
loudness = sum(abs(v) for v in waveform) / len(waveform)
print("Samples:", waveform)
print("Average loudness:", round(loudness, 2))
print("Mel spectrogram idea: split sound into pitch bands over time.")
fake_transcript = {"clip1.wav": "hello, how can I help you?",
"clip2.wav": "the fan is on"}
print("Whisper-style transcript of clip1.wav:", fake_transcript["clip1.wav"])
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Discover enterprise audio processing, core speech tasks (transcription, diarization, sentiment, TTS), key use cases, and strategies for value and integration in modern businesses.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
65. Audio Data Representation
What it is
Explore how audio is digitized for AI: sample rate, bit depth, channels, formats, and mel spectrograms for speech, plus challenges and best practices in audio preprocessing and analysis.
Why it matters
Multimodal AI is how real products work: a customer sends text, a photo, and a voice note, and one system has to understand all three.
Code to copy (runs offline, standard Python only)
# Audio basics, offline simulation of "Audio Data Representation"
# Real version: Whisper / CLAP / librosa (needs audio files + models).
# Here: a fake waveform (list of numbers) + a tiny "transcription" table.
waveform = [0.0, 0.4, 0.9, 0.5, -0.2, -0.8, -0.3, 0.1] # sound samples
loudness = sum(abs(v) for v in waveform) / len(waveform)
print("Samples:", waveform)
print("Average loudness:", round(loudness, 2))
print("Mel spectrogram idea: split sound into pitch bands over time.")
fake_transcript = {"clip1.wav": "hello, how can I help you?",
"clip2.wav": "the fan is on"}
print("Whisper-style transcript of clip1.wav:", fake_transcript["clip1.wav"])
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Explore how audio is digitized for AI: sample rate, bit depth, channels, formats, and mel spectrograms for speech, plus challenges and best practices in audio preprocessing and analysis.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
66. Audio Processing with librosa
What it is
Explore audio processing with librosa: load, resample, convert, and analyze audio files; visualize with mel spectrograms and apply techniques through hands-on exercises.
Why it matters
Multimodal AI is how real products work: a customer sends text, a photo, and a voice note, and one system has to understand all three.
Code to copy (runs offline, standard Python only)
# Audio basics, offline simulation of "Audio Processing with librosa"
# Real version: Whisper / CLAP / librosa (needs audio files + models).
# Here: a fake waveform (list of numbers) + a tiny "transcription" table.
waveform = [0.0, 0.4, 0.9, 0.5, -0.2, -0.8, -0.3, 0.1] # sound samples
loudness = sum(abs(v) for v in waveform) / len(waveform)
print("Samples:", waveform)
print("Average loudness:", round(loudness, 2))
print("Mel spectrogram idea: split sound into pitch bands over time.")
fake_transcript = {"clip1.wav": "hello, how can I help you?",
"clip2.wav": "the fan is on"}
print("Whisper-style transcript of clip1.wav:", fake_transcript["clip1.wav"])
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Explore audio processing with librosa: load, resample, convert, and analyze audio files; visualize with mel spectrograms and apply techniques through hands-on exercises.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
67. Sound Retrieval and Classification
What it is
Explore audio embeddings for efficient sound classification and retrieval, using models like CLAP to enable semantic search and robust text-based audio analysis at scale.
Why it matters
Multimodal AI is how real products work: a customer sends text, a photo, and a voice note, and one system has to understand all three.
Code to copy (runs offline, standard Python only)
# Tiny RAG, offline simulation of "Sound Retrieval and Classification"
# Real version: ChromaDB vector database + embeddings + LLM (needs an API
# key and may cost money). Here: keyword scores stand in for embeddings.
docs = ["Apollo 11 landed on the Moon in 1969.",
"Voyager 1 left the Solar System in 2012.",
"The James Webb telescope looks at infrared light."]
question = "When did Apollo 11 land on the Moon?"
q_words = set(question.lower().replace("?", "").split())
scored = sorted(docs, key=lambda d: len(q_words & set(d.lower().split())), reverse=True)
print("Question:", question)
print("Best document:", scored[0])
print("Answer (grounded in the document): Apollo 11 landed on the Moon in 1969. [Source 1]")
print("Rule: if no document matches, say 'I do not know' - never invent an answer.")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Explore audio embeddings for efficient sound classification and retrieval, using models like CLAP to enable semantic search and robust text-based audio analysis at scale.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
68. Sound Retrieval and Classification with CLAP
What it is
Explore using CLAP for sound retrieval, similarity, and zero-shot classification, then apply these skills to detect fan on/off states in real audio data.
Why it matters
Multimodal AI is how real products work: a customer sends text, a photo, and a voice note, and one system has to understand all three.
Code to copy (runs offline, standard Python only)
# Tiny RAG, offline simulation of "Sound Retrieval and Classification with CLAP"
# Real version: ChromaDB vector database + embeddings + LLM (needs an API
# key and may cost money). Here: keyword scores stand in for embeddings.
docs = ["Apollo 11 landed on the Moon in 1969.",
"Voyager 1 left the Solar System in 2012.",
"The James Webb telescope looks at infrared light."]
question = "When did Apollo 11 land on the Moon?"
q_words = set(question.lower().replace("?", "").split())
scored = sorted(docs, key=lambda d: len(q_words & set(d.lower().split())), reverse=True)
print("Question:", question)
print("Best document:", scored[0])
print("Answer (grounded in the document): Apollo 11 landed on the Moon in 1969. [Source 1]")
print("Rule: if no document matches, say 'I do not know' - never invent an answer.")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Explore using CLAP for sound retrieval, similarity, and zero-shot classification, then apply these skills to detect fan on/off states in real audio data.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
69. Speech Processing
What it is
Discover automatic speech recognition with Whisper: a robust, multilingual, open-source model for accurate transcription, translation, and speech processing in real-world audio.
Why it matters
Multimodal AI is how real products work: a customer sends text, a photo, and a voice note, and one system has to understand all three.
Code to copy (runs offline, standard Python only)
# Audio basics, offline simulation of "Speech Processing"
# Real version: Whisper / CLAP / librosa (needs audio files + models).
# Here: a fake waveform (list of numbers) + a tiny "transcription" table.
waveform = [0.0, 0.4, 0.9, 0.5, -0.2, -0.8, -0.3, 0.1] # sound samples
loudness = sum(abs(v) for v in waveform) / len(waveform)
print("Samples:", waveform)
print("Average loudness:", round(loudness, 2))
print("Mel spectrogram idea: split sound into pitch bands over time.")
fake_transcript = {"clip1.wav": "hello, how can I help you?",
"clip2.wav": "the fan is on"}
print("Whisper-style transcript of clip1.wav:", fake_transcript["clip1.wav"])
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Discover automatic speech recognition with Whisper: a robust, multilingual, open-source model for accurate transcription, translation, and speech processing in real-world audio.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
70. Implementing Speech Processing with Whisper & Gemini
What it is
Explore real-world speech transcription and translation with Whisper and Gemini, using Python to process, segment, and align audio with text, including multilingual support.
Why it matters
Multimodal AI is how real products work: a customer sends text, a photo, and a voice note, and one system has to understand all three.
Code to copy (runs offline, standard Python only)
# Audio basics, offline simulation of "Implementing Speech Processing with Whisper & Gemini"
# Real version: Whisper / CLAP / librosa (needs audio files + models).
# Here: a fake waveform (list of numbers) + a tiny "transcription" table.
waveform = [0.0, 0.4, 0.9, 0.5, -0.2, -0.8, -0.3, 0.1] # sound samples
loudness = sum(abs(v) for v in waveform) / len(waveform)
print("Samples:", waveform)
print("Average loudness:", round(loudness, 2))
print("Mel spectrogram idea: split sound into pitch bands over time.")
fake_transcript = {"clip1.wav": "hello, how can I help you?",
"clip2.wav": "the fan is on"}
print("Whisper-style transcript of clip1.wav:", fake_transcript["clip1.wav"])
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Explore real-world speech transcription and translation with Whisper and Gemini, using Python to process, segment, and align audio with text, including multilingual support.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
71. Audio Intelligence
What it is
Explore advances in Audio Intelligence: multimodal systems, speech recognition, TTS, enterprise controls, creative workflows, and ethics for robust, secure, and accessible audio solutions.
Why it matters
Multimodal AI is how real products work: a customer sends text, a photo, and a voice note, and one system has to understand all three.
Code to copy (runs offline, standard Python only)
# Audio basics, offline simulation of "Audio Intelligence"
# Real version: Whisper / CLAP / librosa (needs audio files + models).
# Here: a fake waveform (list of numbers) + a tiny "transcription" table.
waveform = [0.0, 0.4, 0.9, 0.5, -0.2, -0.8, -0.3, 0.1] # sound samples
loudness = sum(abs(v) for v in waveform) / len(waveform)
print("Samples:", waveform)
print("Average loudness:", round(loudness, 2))
print("Mel spectrogram idea: split sound into pitch bands over time.")
fake_transcript = {"clip1.wav": "hello, how can I help you?",
"clip2.wav": "the fan is on"}
print("Whisper-style transcript of clip1.wav:", fake_transcript["clip1.wav"])
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Explore advances in Audio Intelligence: multimodal systems, speech recognition, TTS, enterprise controls, creative workflows, and ethics for robust, secure, and accessible audio solutions.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
72. Audio Sentiment Analysis with Gemini
What it is
Explore audio sentiment and command analysis using Pydantic AI and Gemini; learn to extract emotions and recognize spoken commands from audio with real-world datasets and hands-on exercises.
Why it matters
Multimodal AI is how real products work: a customer sends text, a photo, and a voice note, and one system has to understand all three.
Code to copy (runs offline, standard Python only)
# Audio basics, offline simulation of "Audio Sentiment Analysis with Gemini"
# Real version: Whisper / CLAP / librosa (needs audio files + models).
# Here: a fake waveform (list of numbers) + a tiny "transcription" table.
waveform = [0.0, 0.4, 0.9, 0.5, -0.2, -0.8, -0.3, 0.1] # sound samples
loudness = sum(abs(v) for v in waveform) / len(waveform)
print("Samples:", waveform)
print("Average loudness:", round(loudness, 2))
print("Mel spectrogram idea: split sound into pitch bands over time.")
fake_transcript = {"clip1.wav": "hello, how can I help you?",
"clip2.wav": "the fan is on"}
print("Whisper-style transcript of clip1.wav:", fake_transcript["clip1.wav"])
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Explore audio sentiment and command analysis using Pydantic AI and Gemini; learn to extract emotions and recognize spoken commands from audio with real-world datasets and hands-on exercises.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
73. Audio Classification and Moderation
What it is
Learn voice content moderation: real-time and batch pipelines, compliance, privacy, layered detection, and operational excellence for secure and fair audio classification.
Why it matters
Multimodal AI is how real products work: a customer sends text, a photo, and a voice note, and one system has to understand all three.
Code to copy (runs offline, standard Python only)
# Audio basics, offline simulation of "Audio Classification and Moderation"
# Real version: Whisper / CLAP / librosa (needs audio files + models).
# Here: a fake waveform (list of numbers) + a tiny "transcription" table.
waveform = [0.0, 0.4, 0.9, 0.5, -0.2, -0.8, -0.3, 0.1] # sound samples
loudness = sum(abs(v) for v in waveform) / len(waveform)
print("Samples:", waveform)
print("Average loudness:", round(loudness, 2))
print("Mel spectrogram idea: split sound into pitch bands over time.")
fake_transcript = {"clip1.wav": "hello, how can I help you?",
"clip2.wav": "the fan is on"}
print("Whisper-style transcript of clip1.wav:", fake_transcript["clip1.wav"])
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Learn voice content moderation: real-time and batch pipelines, compliance, privacy, layered detection, and operational excellence for secure and fair audio classification.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
74. Building a Basic Voice Moderation System with Gemini
What it is
Learn to build a voice moderation system using Gemini to transcribe audio, detect personal data disclosures, and flag policy violations in customer service recordings.
Why it matters
Multimodal AI is how real products work: a customer sends text, a photo, and a voice note, and one system has to understand all three.
Code to copy (runs offline, standard Python only)
# Moderation, offline simulation of "Building a Basic Voice Moderation System with Gemini"
# Real version: Gemini Vision / Gemini audio moderation (needs an API key).
# Here: a small rule list flags risky content for a human to check.
def flag(text):
risky = ["password", "credit card", "address"]
found = [w for w in risky if w in text.lower()]
return ("FLAG for human review: " + ", ".join(found)) if found else "OK - no issue found"
print(flag("My password is 1234."))
print(flag("What time does the shop open?"))
print("Rule: the system flags, a human decides. Automation + human oversight.")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Learn to build a voice moderation system using Gemini to transcribe audio, detect personal data disclosures, and flag policy violations in customer service recordings.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
75. Introduction to Enterprise Video Processing
What it is
Discover how enterprise video AI overcomes temporal complexity using smart frame selection for efficient understanding, search, classification, moderation, and generation at scale.
Why it matters
Multimodal AI is how real products work: a customer sends text, a photo, and a voice note, and one system has to understand all three.
Code to copy (runs offline, standard Python only)
# Video basics, offline simulation of "Introduction to Enterprise Video Processing"
# Real version: YOLOv9 / CoTracker / TimeSformer (needs video + GPU).
# Here: 3 frames, each with detected objects; count crossings of a line.
frames = [{"car": 2, "person": 1}, {"car": 3, "person": 1}, {"car": 2, "person": 2}]
total_cars = sum(f["car"] for f in frames)
print("Frames:", frames)
print("Total cars seen across frames:", total_cars)
print("Tracking idea: the same car in frame 1 and frame 2 is ONE car, not two.")
print("Smart frame selection: check 1 frame per second, not all 30.")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Discover how enterprise video AI overcomes temporal complexity using smart frame selection for efficient understanding, search, classification, moderation, and generation at scale.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
76. AI Models for Video Understanding
What it is
Explore key AI models like YOLO for real-time detection, CoTracker and TimeSformer for motion and temporal understanding, enabling advanced, scalable enterprise video analytics.
Why it matters
Multimodal AI is how real products work: a customer sends text, a photo, and a voice note, and one system has to understand all three.
Code to copy (runs offline, standard Python only)
# Video basics, offline simulation of "AI Models for Video Understanding"
# Real version: YOLOv9 / CoTracker / TimeSformer (needs video + GPU).
# Here: 3 frames, each with detected objects; count crossings of a line.
frames = [{"car": 2, "person": 1}, {"car": 3, "person": 1}, {"car": 2, "person": 2}]
total_cars = sum(f["car"] for f in frames)
print("Frames:", frames)
print("Total cars seen across frames:", total_cars)
print("Tracking idea: the same car in frame 1 and frame 2 is ONE car, not two.")
print("Smart frame selection: check 1 frame per second, not all 30.")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Explore key AI models like YOLO for real-time detection, CoTracker and TimeSformer for motion and temporal understanding, enabling advanced, scalable enterprise video analytics.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
77. Implementing Object Recognition & Tracking
What it is
Learn how to detect and track objects in videos using YOLOv9, apply multi-object tracking, handle small objects, and count items crossing boundaries in practical scenarios.
Why it matters
Multimodal AI is how real products work: a customer sends text, a photo, and a voice note, and one system has to understand all three.
Code to copy (runs offline, standard Python only)
# Video basics, offline simulation of "Implementing Object Recognition & Tracking"
# Real version: YOLOv9 / CoTracker / TimeSformer (needs video + GPU).
# Here: 3 frames, each with detected objects; count crossings of a line.
frames = [{"car": 2, "person": 1}, {"car": 3, "person": 1}, {"car": 2, "person": 2}]
total_cars = sum(f["car"] for f in frames)
print("Frames:", frames)
print("Total cars seen across frames:", total_cars)
print("Tracking idea: the same car in frame 1 and frame 2 is ONE car, not two.")
print("Smart frame selection: check 1 frame per second, not all 30.")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Learn how to detect and track objects in videos using YOLOv9, apply multi-object tracking, handle small objects, and count items crossing boundaries in practical scenarios.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
78. Video Understanding & Search
What it is
Explore methods for video analysis and search using foundation models and CLIP4Clip, balancing temporal understanding, cost, and retrieval accuracy for enterprise applications.
Why it matters
Multimodal AI is how real products work: a customer sends text, a photo, and a voice note, and one system has to understand all three.
Code to copy (runs offline, standard Python only)
# Video basics, offline simulation of "Video Understanding & Search"
# Real version: YOLOv9 / CoTracker / TimeSformer (needs video + GPU).
# Here: 3 frames, each with detected objects; count crossings of a line.
frames = [{"car": 2, "person": 1}, {"car": 3, "person": 1}, {"car": 2, "person": 2}]
total_cars = sum(f["car"] for f in frames)
print("Frames:", frames)
print("Total cars seen across frames:", total_cars)
print("Tracking idea: the same car in frame 1 and frame 2 is ONE car, not two.")
print("Smart frame selection: check 1 frame per second, not all 30.")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Explore methods for video analysis and search using foundation models and CLIP4Clip, balancing temporal understanding, cost, and retrieval accuracy for enterprise applications.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
79. Video Understanding & Search with Gemini & Clip4Clip
What it is
Explore video understanding with Gemini and Clip4Clip: learn automated video description, key moment detection, and natural language video search using AI models and structured outputs.
Why it matters
Multimodal AI is how real products work: a customer sends text, a photo, and a voice note, and one system has to understand all three.
Code to copy (runs offline, standard Python only)
# CLIP-style image search, offline simulation of "Video Understanding & Search with Gemini & Clip4Clip"
# Real version: CLIP embeddings (Hugging Face / OpenAI). Here: keyword tags
# stand in for image embeddings; text and images share one "space".
images = {"photo1.jpg": ["car", "road", "sunny"], "photo2.jpg": ["dog", "park"],
"photo3.jpg": ["car", "night", "street"]}
query = "car on the road"
q = set(query.split())
ranked = sorted(images.items(), key=lambda kv: len(q & set(kv[1])), reverse=True)
for name, tags in ranked:
print(name, tags, "-> match score", len(q & set(tags)))
print("Zero-shot: no training on 'car' needed - the shared space already knows it.")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Explore video understanding with Gemini and Clip4Clip: learn automated video description, key moment detection, and natural language video search using AI models and structured outputs.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
80. Video Classification & Moderation
What it is
Learn to classify and moderate video by modeling temporal patterns, handling real-world challenges, and combining automation with human oversight for scale, accuracy, and compliance.
Why it matters
Multimodal AI is how real products work: a customer sends text, a photo, and a voice note, and one system has to understand all three.
Code to copy (runs offline, standard Python only)
# Video basics, offline simulation of "Video Classification & Moderation"
# Real version: YOLOv9 / CoTracker / TimeSformer (needs video + GPU).
# Here: 3 frames, each with detected objects; count crossings of a line.
frames = [{"car": 2, "person": 1}, {"car": 3, "person": 1}, {"car": 2, "person": 2}]
total_cars = sum(f["car"] for f in frames)
print("Frames:", frames)
print("Total cars seen across frames:", total_cars)
print("Tracking idea: the same car in frame 1 and frame 2 is ONE car, not two.")
print("Smart frame selection: check 1 frame per second, not all 30.")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Learn to classify and moderate video by modeling temporal patterns, handling real-world challenges, and combining automation with human oversight for scale, accuracy, and compliance.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
81. Video Classification & Moderation with Gemini
What it is
Learn to build automated systems for video classification and moderation with Gemini and Pydantic AI, including action recognition and safety compliance in real-world scenarios.
Why it matters
Multimodal AI is how real products work: a customer sends text, a photo, and a voice note, and one system has to understand all three.
Code to copy (runs offline, standard Python only)
# Video basics, offline simulation of "Video Classification & Moderation with Gemini"
# Real version: YOLOv9 / CoTracker / TimeSformer (needs video + GPU).
# Here: 3 frames, each with detected objects; count crossings of a line.
frames = [{"car": 2, "person": 1}, {"car": 3, "person": 1}, {"car": 2, "person": 2}]
total_cars = sum(f["car"] for f in frames)
print("Frames:", frames)
print("Total cars seen across frames:", total_cars)
print("Tracking idea: the same car in frame 1 and frame 2 is ONE car, not two.")
print("Smart frame selection: check 1 frame per second, not all 30.")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Learn to build automated systems for video classification and moderation with Gemini and Pydantic AI, including action recognition and safety compliance in real-world scenarios.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
82. Video Generation
What it is
Explore generative video AI tools and workflows that turn text, images, or footage into dynamic content for marketing, training, and creative use while ensuring quality and compliance.
Why it matters
Multimodal AI is how real products work: a customer sends text, a photo, and a voice note, and one system has to understand all three.
Code to copy (runs offline, standard Python only)
# Video basics, offline simulation of "Video Generation"
# Real version: YOLOv9 / CoTracker / TimeSformer (needs video + GPU).
# Here: 3 frames, each with detected objects; count crossings of a line.
frames = [{"car": 2, "person": 1}, {"car": 3, "person": 1}, {"car": 2, "person": 2}]
total_cars = sum(f["car"] for f in frames)
print("Frames:", frames)
print("Total cars seen across frames:", total_cars)
print("Tracking idea: the same car in frame 1 and frame 2 is ONE car, not two.")
print("Smart frame selection: check 1 frame per second, not all 30.")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Explore generative video AI tools and workflows that turn text, images, or footage into dynamic content for marketing, training, and creative use while ensuring quality and compliance.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
83. Video Generation with Veo 3
What it is
Learn to generate marketing videos with Veo 3 using both text-to-video and image-to-video workflows, and understand their strengths, limitations, and real-world applications.
Why it matters
Multimodal AI is how real products work: a customer sends text, a photo, and a voice note, and one system has to understand all three.
Code to copy (runs offline, standard Python only)
# Video basics, offline simulation of "Video Generation with Veo 3"
# Real version: YOLOv9 / CoTracker / TimeSformer (needs video + GPU).
# Here: 3 frames, each with detected objects; count crossings of a line.
frames = [{"car": 2, "person": 1}, {"car": 3, "person": 1}, {"car": 2, "person": 2}]
total_cars = sum(f["car"] for f in frames)
print("Frames:", frames)
print("Total cars seen across frames:", total_cars)
print("Tracking idea: the same car in frame 1 and frame 2 is ONE car, not two.")
print("Smart frame selection: check 1 frame per second, not all 30.")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Learn to generate marketing videos with Veo 3 using both text-to-video and image-to-video workflows, and understand their strengths, limitations, and real-world applications.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
84. Multimodal AI Deployment
What it is
Explore deployment of multimodal AI systems for text, images, audio, video via unified APIs, multi-API orchestration, and custom solutions, balancing speed, cost, and control.
Why it matters
Multimodal AI is how real products work: a customer sends text, a photo, and a voice note, and one system has to understand all three.
Code to copy (runs offline, standard Python only)
# Serving and monitoring, offline simulation of "Multimodal AI Deployment"
# Real version: Gradio app + Arize Phoenix + Pydantic AI (needs installs).
# Here: a log of fake requests with cost + latency, and a summary.
log = [{"ok": True, "cost": 0.01, "seconds": 0.8},
{"ok": True, "cost": 0.02, "seconds": 1.5},
{"ok": False, "cost": 0.01, "seconds": 2.0}]
total_cost = round(sum(r["cost"] for r in log), 2)
errors = sum(1 for r in log if not r["ok"])
print("Requests:", len(log), "| Errors:", errors, "| Total cost: $", total_cost)
print("Slowest request:", max(r["seconds"] for r in log), "seconds")
print("Pydantic idea: check every answer matches the promised shape before sending it.")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Explore deployment of multimodal AI systems for text, images, audio, video via unified APIs, multi-API orchestration, and custom solutions, balancing speed, cost, and control.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
85. Implementation Tools and Serving Strategies
What it is
Explore tools and strategies for implementing, serving, and monitoring AI solutions, from rapid prototyping to production, including unified APIs, orchestration, and managed platforms.
Why it matters
Multimodal AI is how real products work: a customer sends text, a photo, and a voice note, and one system has to understand all three.
Code to copy (runs offline, standard Python only)
# Serving and monitoring, offline simulation of "Implementation Tools and Serving Strategies"
# Real version: Gradio app + Arize Phoenix + Pydantic AI (needs installs).
# Here: a log of fake requests with cost + latency, and a summary.
log = [{"ok": True, "cost": 0.01, "seconds": 0.8},
{"ok": True, "cost": 0.02, "seconds": 1.5},
{"ok": False, "cost": 0.01, "seconds": 2.0}]
total_cost = round(sum(r["cost"] for r in log), 2)
errors = sum(1 for r in log if not r["ok"])
print("Requests:", len(log), "| Errors:", errors, "| Total cost: $", total_cost)
print("Slowest request:", max(r["seconds"] for r in log), "seconds")
print("Pydantic idea: check every answer matches the promised shape before sending it.")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Explore tools and strategies for implementing, serving, and monitoring AI solutions, from rapid prototyping to production, including unified APIs, orchestration, and managed platforms.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
86. Using Gradio and Pydantic AI
What it is
Learn to build multimodal chatbots and analysis apps using Gradio and Pydantic AI, covering async programming, media inputs, rate limiting, and interface customization.
Why it matters
Multimodal AI is how real products work: a customer sends text, a photo, and a voice note, and one system has to understand all three.
Code to copy (runs offline, standard Python only)
# Serving and monitoring, offline simulation of "Using Gradio and Pydantic AI"
# Real version: Gradio app + Arize Phoenix + Pydantic AI (needs installs).
# Here: a log of fake requests with cost + latency, and a summary.
log = [{"ok": True, "cost": 0.01, "seconds": 0.8},
{"ok": True, "cost": 0.02, "seconds": 1.5},
{"ok": False, "cost": 0.01, "seconds": 2.0}]
total_cost = round(sum(r["cost"] for r in log), 2)
errors = sum(1 for r in log if not r["ok"])
print("Requests:", len(log), "| Errors:", errors, "| Total cost: $", total_cost)
print("Slowest request:", max(r["seconds"] for r in log), "seconds")
print("Pydantic idea: check every answer matches the promised shape before sending it.")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Learn to build multimodal chatbots and analysis apps using Gradio and Pydantic AI, covering async programming, media inputs, rate limiting, and interface customization.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
87. Multimodal AI Performance Monitoring and Logging
What it is
Learn to monitor and log multimodal AI systems, tracking performance, costs, and failures across modalities for optimized, reliable, and coherent production deployments.
Why it matters
Multimodal AI is how real products work: a customer sends text, a photo, and a voice note, and one system has to understand all three.
Code to copy (runs offline, standard Python only)
# Serving and monitoring, offline simulation of "Multimodal AI Performance Monitoring and Logging"
# Real version: Gradio app + Arize Phoenix + Pydantic AI (needs installs).
# Here: a log of fake requests with cost + latency, and a summary.
log = [{"ok": True, "cost": 0.01, "seconds": 0.8},
{"ok": True, "cost": 0.02, "seconds": 1.5},
{"ok": False, "cost": 0.01, "seconds": 2.0}]
total_cost = round(sum(r["cost"] for r in log), 2)
errors = sum(1 for r in log if not r["ok"])
print("Requests:", len(log), "| Errors:", errors, "| Total cost: $", total_cost)
print("Slowest request:", max(r["seconds"] for r in log), "seconds")
print("Pydantic idea: check every answer matches the promised shape before sending it.")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Learn to monitor and log multimodal AI systems, tracking performance, costs, and failures across modalities for optimized, reliable, and coherent production deployments.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
88. Logging and Performance Monitoring with Gradio and Arize Phoenix
What it is
Learn to implement logging and performance monitoring for multimodal AI chatbots using Gradio and Arize Phoenix, enabling robust analytics, debugging, and cost tracking.
Why it matters
Multimodal AI is how real products work: a customer sends text, a photo, and a voice note, and one system has to understand all three.
Code to copy (runs offline, standard Python only)
# Serving and monitoring, offline simulation of "Logging and Performance Monitoring with Gradio and Arize Phoenix"
# Real version: Gradio app + Arize Phoenix + Pydantic AI (needs installs).
# Here: a log of fake requests with cost + latency, and a summary.
log = [{"ok": True, "cost": 0.01, "seconds": 0.8},
{"ok": True, "cost": 0.02, "seconds": 1.5},
{"ok": False, "cost": 0.01, "seconds": 2.0}]
total_cost = round(sum(r["cost"] for r in log), 2)
errors = sum(1 for r in log if not r["ok"])
print("Requests:", len(log), "| Errors:", errors, "| Total cost: $", total_cost)
print("Slowest request:", max(r["seconds"] for r in log), "seconds")
print("Pydantic idea: check every answer matches the promised shape before sending it.")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Learn to implement logging and performance monitoring for multimodal AI chatbots using Gradio and Arize Phoenix, enabling robust analytics, debugging, and cost tracking.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
89. Evaluating Multimodal Applications
What it is
Learn how to evaluate multimodal AI apps using user feedback systems and testing methods, blending human review, automated metrics, and continuous monitoring for quality improvement.
Why it matters
Multimodal AI is how real products work: a customer sends text, a photo, and a voice note, and one system has to understand all three.
Code to copy (runs offline, standard Python only)
# Model evaluation, offline simulation of "Evaluating Multimodal Applications"
# Exact Match, ROUGE-style overlap, and LLM-as-a-Judge, by hand.
def exact_match(a, b):
return 1 if a.strip().lower() == b.strip().lower() else 0
def overlap(a, b):
wa, wb = set(a.lower().split()), set(b.lower().split())
return round(len(wa & wb) / max(len(wa | wb), 1), 2)
print("Exact Match 'Paris' vs 'paris':", exact_match("Paris", "paris"))
print("Exact Match 'Paris' vs 'London':", exact_match("Paris", "London"))
print("Word overlap 'the cat sat' vs 'the cat slept':", overlap("the cat sat", "the cat slept"))
print("Pass@k idea: if 3 of 5 tries are right, Pass@5 = 1, Pass@1 = 0.6.")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Learn how to evaluate multimodal AI apps using user feedback systems and testing methods, blending human review, automated metrics, and continuous monitoring for quality improvement.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
90. Testing Multimodal Apps with Pydantic AI Evals
What it is
Learn to build robust testing frameworks for multimodal AI apps using Pydantic Evals, covering structured outputs, semantic evaluation, custom evaluators, and hands-on exercises.
Why it matters
Multimodal AI is how real products work: a customer sends text, a photo, and a voice note, and one system has to understand all three.
Code to copy (runs offline, standard Python only)
# Serving and monitoring, offline simulation of "Testing Multimodal Apps with Pydantic AI Evals"
# Real version: Gradio app + Arize Phoenix + Pydantic AI (needs installs).
# Here: a log of fake requests with cost + latency, and a summary.
log = [{"ok": True, "cost": 0.01, "seconds": 0.8},
{"ok": True, "cost": 0.02, "seconds": 1.5},
{"ok": False, "cost": 0.01, "seconds": 2.0}]
total_cost = round(sum(r["cost"] for r in log), 2)
errors = sum(1 for r in log if not r["ok"])
print("Requests:", len(log), "| Errors:", errors, "| Total cost: $", total_cost)
print("Slowest request:", max(r["seconds"] for r in log), "seconds")
print("Pydantic idea: check every answer matches the promised shape before sending it.")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Learn to build robust testing frameworks for multimodal AI apps using Pydantic Evals, covering structured outputs, semantic evaluation, custom evaluators, and hands-on exercises.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
91. Scaling Multimodal AI Architecture
What it is
Learn strategies to scale multimodal AI: unified APIs, multi-API pipelines, and custom deployments, focusing on performance, cost, reliability, and architectural trade-offs.
Why it matters
Multimodal AI is how real products work: a customer sends text, a photo, and a voice note, and one system has to understand all three.
Code to copy (runs offline, standard Python only)
# Serving and monitoring, offline simulation of "Scaling Multimodal AI Architecture"
# Real version: Gradio app + Arize Phoenix + Pydantic AI (needs installs).
# Here: a log of fake requests with cost + latency, and a summary.
log = [{"ok": True, "cost": 0.01, "seconds": 0.8},
{"ok": True, "cost": 0.02, "seconds": 1.5},
{"ok": False, "cost": 0.01, "seconds": 2.0}]
total_cost = round(sum(r["cost"] for r in log), 2)
errors = sum(1 for r in log if not r["ok"])
print("Requests:", len(log), "| Errors:", errors, "| Total cost: $", total_cost)
print("Slowest request:", max(r["seconds"] for r in log), "seconds")
print("Pydantic idea: check every answer matches the promised shape before sending it.")
Try it yourself
Run the code above. Change one word or number in it and run it again. Write down what changed.
Check
In plain words, what does this lesson teach?
Learn strategies to scale multimodal AI: unified APIs, multi-API pipelines, and custom deployments, focusing on performance, cost, reliability, and architectural trade-offs.
What do I do if the real version needs a tool I do not have?
Use the offline simulation above for practice. The real version is named in the code comments — it needs an account, an API key, or an install, and it may cost money. Do the real version only when you are ready for that.
92. Project: OmniTrainer Multimodal AI Agent
What it is
In this project, students will create an AI agent that simulates customer service scenarios and specialized monitoring agents that analyze communications across text, images, videos, and audio. Tags: Multimodal AI, AI Agents, Prompt Engineering.
Why it matters
This project is the proof for its course. If you can build it, you can do the work, not just read about it.
Code to copy (runs offline, standard Python only)
# Serving and monitoring, offline simulation of "Multimodal AI Deployment"
# Real version: Gradio app + Arize Phoenix + Pydantic AI (needs installs).
# Here: a log of fake requests with cost + latency, and a summary.
log = [{"ok": True, "cost": 0.01, "seconds": 0.8},
{"ok": True, "cost": 0.02, "seconds": 1.5},
{"ok": False, "cost": 0.01, "seconds": 2.0}]
total_cost = round(sum(r["cost"] for r in log), 2)
errors = sum(1 for r in log if not r["ok"])
print("Requests:", len(log), "| Errors:", errors, "| Total cost: $", total_cost)
print("Slowest request:", max(r["seconds"] for r in log), "seconds")
print("Pydantic idea: check every answer matches the promised shape before sending it.")
Try it yourself
Build the project step by step, using the lessons of its course. Test each part before moving on.
Check
What must I build?
In this project, students will create an AI agent that simulates customer service scenarios and specialized monitoring agents that analyze communications across text, images, videos, and audio. Tags: Multimodal AI, AI Agents, Prompt Engineering.
93. Plan your study time
What it is
The program is 56 hours in total: Course 1 is 21 hours, Course 2 is 17 hours, Course 3 is 18 hours. There is no fixed calendar — you choose the pace. At 5 hours a week, that is about 11 weeks; at 10 hours a week, about 6. Each course ends with one project, and the final project, OmniTrainer, uses everything from the three courses.
Why it matters
A plan you can keep beats a fast plan you drop. Decide your weekly hours first, then put the three projects on your calendar.
Code to copy (runs offline, standard Python only)
hours = {"Course 1": 21, "Course 2": 17, "Course 3": 18}
per_week = 5 # change this to your own weekly hours
total = sum(hours.values())
print(f"Total: {total} hours")
for name, h in hours.items():
print(f"{name}: {h} h, about {h / per_week:.1f} weeks")
print(f"All three: about {total / per_week:.0f} weeks at {per_week} h/week")
Try it yourself
Change per_week to the hours you can really give each week, run the code, and write the finish date in your notebook.
Check
How long will it take me in weeks?
It depends on your pace: about 11 weeks at 5 hours a week, about 6 at 10 hours a week.
When should I do the projects?
At the end of each course, before you start the next one.
94. Final checklist
What it is
You have finished the lessons. Now check you can do the work. Tick each item when you can do it without looking at the page. If you cannot do one, go back to that lesson and try it again.
Why it matters
Finishing means you can do it, not just that you read it. The checklist proves you can do it.
Code to copy (runs offline, standard Python only)
# [ ] I can explain what a foundation model is, in plain words
# [ ] I can build a text classifier with zero-shot and few-shot prompting
# [ ] I can explain Transformers and diffusion models simply
# [ ] I can evaluate a model with Exact Match, ROUGE, and LLM-as-a-Judge
# [ ] I can build a tiny neural network in PyTorch and explain gradient descent
# [ ] I can use role-based prompting to control tone and expertise
# [ ] I can adapt a model with PEFT / LoRA and explain GRPO rewards
# [ ] I can build a stateful chatbot with system, user, and assistant roles
# [ ] I can control outputs with temperature, top-p, max tokens, and stop sequences
# [ ] I can explain tokens, embeddings, and vector search
# [ ] I can calculate TCO and choose a model by cost, speed, and quality
# [ ] I can build a RAG system: chunk, embed, retrieve, answer with citations
# [ ] I can evaluate RAG with Context Precision, Recall, Faithfulness, and Answer Relevancy
# [ ] I can build image search with CLIP embeddings
# [ ] I can explain Vision Transformers, SAM, RT-DETR, and DINOv2
# [ ] I can explain Whisper transcription and CLAP audio search
# [ ] I can build a voice moderation system with Gemini
# [ ] I can explain YOLO, CoTracker, and TimeSformer for video
# [ ] I can generate video with Veo 3 and explain its limits
# [ ] I can build a Gradio + Pydantic AI multimodal app
# [ ] I can monitor, log, and test a multimodal app with Arize Phoenix and Pydantic Evals
# [ ] I can finish all three projects: counting with GRPO, NASA RAG, OmniTrainer
print("Checklist items:", 22)
Try it yourself
Tick each item you can do without looking at the page. Go back to any lesson you cannot tick yet.
Check
How do I know I am ready?
When you can tick every item without looking at the page.
What if I cannot tick one item?
Go back to that lesson and try its task again.
95. What to do next
What it is
Next steps, in plain words: 1) Do the three projects end to end, starting with Teach an LLM to Count. 2) Set up a real Python environment and try the real tools on a small test — PyTorch, Hugging Face, ChromaDB — and only then add a real OpenAI or Gemini API key, with a budget, because real API use can cost money. 3) In this repo, continue with the other workshops (AI Agents on Google Cloud, Software Engineering with Claude Code, Agent Workflows as Graphs). 4) Keep a notebook of what you built, what worked, and what failed. 5) Use one thing you learned at work every week — that habit turns a course into a skill.
Why it matters
Learning stops when practice stops. One small build a week keeps the skill alive.
Code to copy (runs offline, standard Python only)
plan = ["Day 1: Do the counting project (GRPO).", "Day 2: Build the tiny NASA RAG.",
"Day 3: Try real PyTorch on a small example.", "Day 4: Try real ChromaDB locally.",
"Day 5: Build one Gradio demo.", "Day 6: Start the next workshop in this repo.",
"Day 7: Write down what worked and what failed."]
for day in plan:
print(day)
print("Remember: real API use can cost money. Set a budget first.")
Try it yourself
Write down your plan for the next 7 days in your notebook.
Check
What is the best next step after this program?
Do the three projects, then build one real RAG app with a small budget.
Which workshop in this repo comes next?
AI Agents on Google Cloud, Software Engineering with Claude Code, or Agent Workflows as Graphs — pick the one closest to your work.
Try it here — one demo, three courses
No API key, no network. Three small tools in one page: (1) a tiny offline RAG over NASA documents, (2) a GRPO-style letter-counting check, (3) a tiny multimodal caption / classify simulation. Type, press a button, and see the steps.