
This course includes our updated coding exercises so you can practice your skills as you learn.
See a demo
Explore realistic uses of AI, agents, and generative AI with Python and OpenAI, through hands-on projects and exercises that move beyond hype toward practical skills.
Master retrieval systems and information retrieval basics, including tokenization and pre-processing, and implement vector space, tf-idf, boolean, probabilistic models with Python to enable RAG and AI agent solutions.
Build an AI assistant that stores transcripts and Python files in a vector store, runs on GPT five, and deploys via Streamlit, with rag, file search, and multimodal techniques.
Diogo shares his background in management and analytics, highlighting data-driven decisions and experiments. He notes startup Betacom and insights like menu optimization, pricing, and invites you to connect on LinkedIn.
Deliver up-to-date content for 2026 on RAG, AI agents, and generative AI with Python and OpenAI, and invite your feedback to improve course quality.
Explore python for rag and gen AI with an optional appendix python crash course for beginners, and practice functions and classes with solutions on Google Colab.
Discover how Python functions act as reusable building blocks, using parameters and returns to organize code, enable debugging, and support multi-step workflows.
Practice writing Python functions by implementing calculate_sum to sum a list and calculate_area that returns the area, in hands-on labs.
Tackle medium-level Python exercises by implementing string reversal using slicing and building an anagram finder that cleans spaces, lowercase, sorts, and compares two strings.
Build a palindrome checker by cleaning input: remove non-alphanumeric characters, convert to lowercase, and compare the string to its reverse.
Explore how classes serve as blueprints and objects as instances in Python, using a Pokemon example to show attributes like name, type, and level, plus the init method and self.
Define a book class with title, author, and pages, implement an init, and a book info method that returns an f-string; test by printing the attributes.
Define a rectangle class with length and width, implement area and perimeter methods, and test by creating an instance and printing results with f-strings.
Define a bank account class with an account holder and balance, implement deposit and withdraw with balance checks, and add a get balance method tested through simple scenarios.
Learn how retrieval augmented generation (RAG) lets large language models access your own data by retrieving relevant context before generation, powering a chatbot from your documents.
Build a RAG architecture by combining retrieval and generation models to ground answers in a database of knowledge, then construct and optimize an AI agent and course assistant.
RAG combines retrieval, augmentation, and generation to keep answers up to date, reduce hallucinations, and provide sources from your knowledge base across domains like healthcare, finance, and education.
Develop a detailed initial prompt to define the ai system architecture, then brainstorm with a step by step qa prompt, plan features, and configure Lovable integrations.
Build your first chatbot by creating a flow wise agent with retrieval via tools, memory, and document stores, exploring chunking and an Excel-based workflow on the free plan.
Split large documents into sections like a table of contents, so the AI jumps to relevant chunks, boosting speed and accuracy while avoiding the lost in the middle problem.
Learn to chunk text for retrieval-augmented generation using fixed window sizes, overlaps, and embeddings. See how vector stores and RAG work on text data with a private, no-code visualization tool.
Explore how embeddings turn words into numbers, placing related meanings near each other to power search, recommendations, chatbots, and answering questions, with context and large text training shaping the map.
Explore embeddings visualization using PCA to reduce 3072 dimensions to two, interpret vector relationships among nine chunks, and connect these insights to the RAG approach and architecture.
Use vector stores to organize embeddings into a memory-like database that searches by meaning, enabling ai to retrieve relevant data and answer questions.
Visualizing querying text shows how a query is embedded into a vector, compared with all chunks to identify closest four, and used as context to build a prompt with citations.
Learn to integrate images in RAG workflows using Gemini multimodal embedding to extract image components and region tiles, then embed text plus image with a chosen grid size.
Test and refine AI assistants using an ingestion and retrieval pipeline, exploring prompt templates, file support (pdf, csv, images, docx, excel), and evidence-based answers with citations.
Explore adding the RAG to an AI assistant by debugging embedding models, chunking, and ingestion, using Gemini embedding two via an open router to control LLM routing.
Long Rag introduces a 2024 chunking framework with massive 4000-token chunks, improving retrieval accuracy by using fewer, larger chunks and a single chunk retrieve LM step for simplicity.
Explore prompt engineering to optimize interactions with large language models by defining a system message that sets the tone, role, and goals for reliable, relevant outputs in RAG agents.
Explore how the system message acts as the rulebook that defines AI role, tone, and boundaries, shaping prompt structure, priorities, and outcomes for robust responses.
Explore the OpenAI playground chat models, including GPT five, five nano, and five mini, and learn how system and developer messages shape responses within a hidden hierarchy.
Plan and version a system message for a RAG assistant, maintain a single active version, and create a concise, reusable setup for beta startup courses and tools.
Learn how to hide the system message and prevent prompt injection by examining developer messages and game-like challenges that reveal hidden guidelines in AI conversations.
Explore how tokenization turns words into numerical tokens and token IDs, using examples like apple and iPhone to show splits, while noting input quality shapes outputs.
Explore zero-shot, one-shot, and few-shot prompting, plus persona and goal prompts, to improve accuracy and consistency when guiding large language models.
UPDATES SEPTEMBER 2026:
Flowise was sunset, so I added equivalent sections using Lovable, Cursor and Claude Code
Python Exercises remade.
UPDATES NOVEMBER 2025
2026 Version of the course was released with all code up to date.
OpenAI Responses Endpoint and GPT-5 implemented across the sections.
New no-code RAG with Flowise.
New Project with Streamlit.
UPDATES JUNE 2025
Launched 2 sections: Image Generation with OpenAI and Reasoning Models
MCP is now live!
UPDATES MAY 2025
Launch of 2 new sections: RAG with OpenAI File Search and RAGAS
Minor video remakes due to mistakes.
UPDATES APRIL 2025:
Remake of 3 sections: Retrieval Fundamentals, Generative Fundaments and Introduction to RAG
Added Knowledge Graphs with Light RAG
UPDATES DECEMBER 2024:
Fine Tuning OpenAI GPT-4o
Python Crash Course + Self-assessment
UPDATES NOVEMBER 2024:
CrewAI and CrewAI Capstone Project launched
The section on OpenAI API for Text and Images is live + OpenAI API Capstone Project
UPDATES OCTOBER 2024:
OpenAI Swarm is live
Agentic RAG is live
Multimodal RAG Project is live
Unlock the Power of RAG, AI Agents, and Generative AI with Python and OpenAI in 2026!
Welcome to "RAG, AI Agents, and Generative AI with Python and OpenAI 2026"—the ultimate course to master Retrieval-Augmented Generation (RAG), AI Agents, and Generative AI using Python and OpenAI's cutting-edge technologies.
If you aspire to become a leader in artificial intelligence, machine learning, and natural language processing, this is the course you've been waiting for!
Why Choose This Course?
Full-stack RAG: retrieval → augmentation → grounded generation with citations, sources, and guardrails.
OpenAI-first: GPT-5, Responses Endpoint, File Search vector stores, image generation, Whisper, CLIP.
No-code + code: Lovable, Claude Code and Cursor visual pipelines and Python implementations (Chroma, LangChain, Streamlit).
Evaluation-driven: RAGAS metrics (context precision/recall, response relevancy, factual correctness).
Agentic systems: CrewAI and OpenAI Swarm for multi-agent orchestration, tools, memory, and state.
Advanced GenAI: reasoning models (setup, prompting, verification), fine-tuning, MCP approvals, secure integrations.
Business outcomes: customer support copilots, knowledge search, policy Q&A, analytics assistants, finance research, content operations.
About Your Instructor
Hi, I'm Diogo, a data expert with a Master's degree in Management specializing in Analytics from ESMT Berlin.
With extensive experience tackling complex business challenges—from managing billion-euro sales planning to conducting A/B tests that led to significant investments—I bring real-world expertise to this course.
As a startup founder helping restaurants worldwide optimize menus and pricing through data insights, I'm passionate about leveraging AI for practical solutions.
Personalized Support
One of the key benefits of this course is the direct access to me as your instructor.
I personally respond to all your questions within 24 hours.
No outsourced support—just personalized guidance to help you overcome challenges and advance your skills.
Continuous Improvements
I'm dedicated to keeping this course up-to-date with the latest advancements in AI.
Your feedback shapes the course—I'm always listening and ready to add new content that benefits your learning journey.
Hands-on projects you actually ship
No-code Lovable RAG (zero to answers with citations).
OpenAI File Search RAG + Streamlit app (upload, index, chat).
Unstructured data RAG (Excel/Word/PPT/EPUB/PDF).
Multimodal RAG (Whisper + CLIP + cosine search).
CrewAI & Swarm agent systems (researcher, writer, counselor, product manager).
Reasoning model demos (setup, prompting, verification).
Image generation pipelines (single/batch edits, animated GIFs).
Fine-tuned GPT evaluation and testing.
What You'll Learn
RAG architecture: retrieval, augmentation, grounded generation, source citations, metadata.
Embeddings & vector stores: semantic search, nearest neighbors, FAISS, File Search.
Chunking strategies: fixed/semantic/hierarchical, overlaps, LongRAG.
System messages and prompt engineering: temperature, top-p, few-shot, persona.
Reasoning models: chain-of-thought controls, verification, structured output.
Agentic patterns: planning, tool use, memory/state, error handling.
MCP with approvals: safe external actions (web fetch, APIs, Stripe).
Evaluation with RAGAS: context precision/recall, relevancy, factual correctness.
Deployment: Streamlit, environment secrets, requirements, debugging.
Why Master RAG and AI Agents Now?
The future of AI lies in systems that can retrieve relevant information and generate intelligent responses—Retrieval-Augmented Generation is at the forefront of this revolution.
By mastering RAG, AI agents, and generative models, you position yourself at the cutting edge of technology, making you invaluable in today's tech landscape.
Get Started Today!
Lifetime Access: Enroll now and get lifetime access to all course materials and updates.
Interactive Learning: Engage with coding exercises, challenges, and real-world projects.
Support: Get your questions answered from me, Diogo, in less than 24 hours.
Certification: Receive a certificate upon completion to showcase your new skills.
Don't Miss Out!
The world of AI is advancing rapidly.
Stay ahead of the curve by enrolling in "RAG, AI Agents, and Generative AI with Python and OpenAI 2026" today. Unlock endless possibilities in AI and machine learning!
Enroll Now and transform your career with the most comprehensive RAG and Generative AI course available!