Generative AI with Python
Keep adding new skills with 10,000+ programs for $239 (usually $399). Save now.
Generative AI with Python
Included with
Ask Coursera
Recommended experience
Recommended experience
What you'll learn
Develop and implement large language models using Python.
Create intelligent workflows with agentic systems and advanced AI techniques like RAG.
Master model fine-tuning with methods such as Low-Rank Adaptation (LoRA).
Skills you'll gain
Details to know
February 2026
16 assignments
See how employees at top companies are mastering in-demand skills
There are 15 modules in this course
This course features Coursera Coach!
A smarter way to learn with interactive, real-time conversations that help you test your knowledge, challenge assumptions, and deepen your understanding as you progress through the course. Unlock the power of generative AI by mastering Python and working hands-on with cutting-edge tools and libraries. From building large language models (LLMs) to implementing advanced agentic systems, this course takes you on an in-depth journey through AI development. You’ll explore the essentials of LLMs, model training, parameter tuning, and the integration of advanced techniques like Retrieval-Augmented Generation (RAG) and vector databases. The interactive learning experience ensures you are not just passively absorbing information but engaging with practical coding exercises and real-world applications. The course begins with the foundational setup, including Python, IDEs, and environment configurations, before diving deep into LLMs, multimodal models, and even exploring agent-based systems. You’ll move through advanced topics such as prompt crafting, chaining models, and building intelligent systems with frameworks like crewAI and AG2. The journey concludes with model fine-tuning techniques, including Low-Rank Adaptation (LoRA), that enable you to optimize performance. This course is designed for AI enthusiasts, data scientists, and developers who want to expand their skills in generative AI. It is ideal for anyone with basic knowledge of Python who wants to build AI-driven applications. The course is suitable for those at an Intermediate level with some prior programming experience in Python. By the end of the course, you will be able to design and implement generative AI models, create complex AI workflows using chains and agents, manage vector databases, and fine-tune models to suit specific tasks and domains.
In this module, we will introduce the course and provide an overview of the instructor’s background in AI and Python. We will explore the course objectives and structure to ensure you know what to expect. Additionally, we’ll guide you through the essential system setup, including installing tools like Python, an IDE, and managing API keys for the hands-on coding exercises.
What's included
11 videos1 reading
11 videos•Total 35 minutes
- Self Presentation•1 minute
- Course Overview•5 minutes
- System Setup (101)•8 minutes
- System Setup: Python•2 minutes
- System Setup: IDE (101)•1 minute
- System Setup: How to get the material•3 minutes
- System Setup: IDE Setup•1 minute
- System Setup: Visual C++ Build Tools•1 minute
- System Setup: Environment (Coding)•2 minutes
- API Keys (101)•4 minutes
- API Keys (Coding)•7 minutes
1 reading•Total 10 minutes
- Full Course Resources•10 minutes
In this module, we will explore the foundational concepts of Large Language Models (LLMs) and how they function within the AI space. We will compare traditional NLP techniques with LLMs to understand their advancements. Additionally, we will evaluate the real-world achievements and performance of these models across different tasks.
What's included
4 videos1 assignment
4 videos•Total 16 minutes
- LLM Introduction•6 minutes
- Classical NLP vs. LLM•3 minutes
- Narrow AI Achievements•5 minutes
- Model Performance and Capabilities•3 minutes
1 assignment•Total 15 minutes
- Large Language Models – Introduction - Assessment•15 minutes
In this module, we will dive deep into the training process of Large Language Models, uncovering the complexities of data preparation and optimization techniques. We will explore ways to improve model performance and evaluate major LLM providers and their products. Additionally, you will learn how to interact with different LLMs via hands-on coding exercises.
What's included
16 videos1 assignment
16 videos•Total 80 minutes
- Model Training Process•6 minutes
- Model Improvement Options•5 minutes
- Model Providers•2 minutes
- Model Benchmarking•4 minutes
- Interaction with LLMs (Coding Intro)•2 minutes
- Interaction with LLMs Groq (Coding)•11 minutes
- Interaction with LLMs OpenAI (Coding)•6 minutes
- Interaction with LLMs Gemini (Coding)•5 minutes
- Message Types•4 minutes
- Message Types Exercise•1 minute
- Message Types Solution•6 minutes
- LLM Parameters•8 minutes
- LLM Parameters (Exercise)•1 minute
- LLM Parameters (Solution)•6 minutes
- Model Selection•8 minutes
- Model Capabilities•7 minutes
1 assignment•Total 15 minutes
- Large Language Models – Deep Dive - Assessment•15 minutes
In this module, we will explore various types of Large Language Models, including how to run models locally on your system. You will also dive into multimodal models, which combine text, images, and other media to enhance AI capabilities. Additionally, we will look at tokenization methods and how they support AI systems in processing and understanding data inputs.
What's included
9 videos1 assignment
9 videos•Total 36 minutes
- Local Use of Models•2 minutes
- Local Use of Models (Coding)•9 minutes
- Large Multimodal Models•1 minute
- Large Multimodal Models (Coding)•9 minutes
- Large Video Models•2 minutes
- Tokenization•4 minutes
- Reasoning Models•3 minutes
- Small Language Models•3 minutes
- JailBreaking•3 minutes
1 assignment•Total 15 minutes
- Large Language Models – Types and Variants - Assessment•15 minutes
In this module, we will introduce you to the concept of chains in AI, where multiple model interactions are linked together to form complex workflows. You will learn how to design and implement prompt templates for repeated use cases, and create systems where outputs are structured and can adapt based on different decision branches in your application.
What's included
13 videos1 assignment
13 videos•Total 70 minutes
- Prompt Templates•4 minutes
- Prompt Templates (Coding)•7 minutes
- Prompt Hub (Coding)•8 minutes
- Introduction•3 minutes
- Chains (Coding)•7 minutes
- Exercise Story Character (Exercise)•1 minute
- Exercise Story Character (Solution)•7 minutes
- Coding: Story Character parallel (101)•1 minute
- Coding: Story Character parallel (Practical)•8 minutes
- Chains with Structured Output (101)•3 minutes
- Chains with Structured Output (Coding)•9 minutes
- Router Chain (Coding)•11 minutes
- Router Chain (Exercise)•2 minutes
1 assignment•Total 15 minutes
- Large Language Models – Chains - Assessment•15 minutes
In this module, we will explore vector databases and their significance in managing and retrieving high-dimensional data for AI applications. You will learn to work with vector embeddings, chunk data for more efficient storage, and practice querying databases to retrieve relevant information based on similarity searches.
What's included
17 videos1 assignment
17 videos•Total 118 minutes
- Introduction•7 minutes
- Data Source and Loading (101)•1 minute
- Data Source and Loading (Coding)•14 minutes
- Data Chunking (101)•10 minutes
- Data Chunking (Coding)•18 minutes
- Embeddings – High Level Overview (101)•3 minutes
- Embeddings – Deep Dive (101)•10 minutes
- Embeddings Model vs. LLM (101)•4 minutes
- Embedding Model Types (101)•4 minutes
- Embeddings Introduction (Coding)•11 minutes
- Embeddings (Coding)•6 minutes
- Data Storing (101)•5 minutes
- Data Storing Chroma (Coding)•4 minutes
- Data Querying (101)•3 minutes
- Similarity Search (101)•7 minutes
- Data Querying Chroma (Coding)•5 minutes
- Data Querying FAISS (Coding)•6 minutes
1 assignment•Total 15 minutes
- Vector Databases - Assessment•15 minutes
In this module, we will introduce you to Retrieval-Augmented Generation (RAG) and walk you through its core phases, from data retrieval to response generation. You will gain hands-on experience in coding a basic RAG pipeline, enhancing the accuracy and relevance of the AI outputs by incorporating external information into the model’s process.
What's included
3 videos1 assignment
3 videos•Total 24 minutes
- Baseline RAG (101)•3 minutes
- RAG Phases (101)•4 minutes
- Baseline RAG (Coding)•17 minutes
1 assignment•Total 15 minutes
- Retrieval-Augmented Generation – Baseline - Assessment•15 minutes
In this module, we will take a deeper dive into advanced techniques for enhancing Retrieval-Augmented Generation workflows. You will learn how to optimize data retrieval and refine responses with strategies like query expansion, prompt compression, and speculative RAG. Additionally, we will explore multimodal RAG and hybrid approaches to handle diverse data types efficiently.
What's included
14 videos1 assignment
14 videos•Total 53 minutes
- RAG Improvements (101)•4 minutes
- Improvements in Pre-Retrieval Phase (101)•2 minutes
- Context Enrichment (101)•5 minutes
- Corrective RAG (101)•2 minutes
- Hybrid RAG (101)•6 minutes
- Query Expansion (101)•5 minutes
- Prompt Compression (101)•3 minutes
- Speculative RAG (101)•4 minutes
- Agentic RAG (101)•2 minutes
- Retrieval Augmented Thought (101)•1 minute
- Prompt Caching (101)•3 minutes
- Multimodal RAG (101)•3 minutes
- Table RAG (101)•3 minutes
- Table RAG (Coding)•11 minutes
1 assignment•Total 15 minutes
- Retrieval-Augmented Generation – Advanced - Assessment•15 minutes
In this module, we will introduce you to AI agents and the fundamental concepts behind agentic systems. We will explore frameworks used to build these systems and examine their potential applications in solving complex tasks autonomously. This module will set the stage for building more sophisticated AI-driven solutions in the following lessons.
What's included
2 videos1 assignment
2 videos•Total 13 minutes
- Agents Introduction (101)•6 minutes
- Agentic Frameworks (101)•7 minutes
1 assignment•Total 15 minutes
- Agentic Systems – Overview - Assessment•15 minutes
In this module, we will focus on the crewAI framework, where you’ll learn how to work with agents to build powerful AI systems. We’ll guide you through the process of setting up a crewAI project, defining tasks, and debugging agent workflows. Additionally, you will extend these systems by integrating custom tools and ensuring smooth execution through testing.
What's included
12 videos1 assignment
12 videos•Total 44 minutes
- Agent Introduction (101)•4 minutes
- File Dependencies (101)•3 minutes
- Example Crew Setup•3 minutes
- crewAI Installation (Coding)•2 minutes
- Sample Project (Coding)•6 minutes
- High-Level Planning (Coding)•3 minutes
- Agent and Task Definition (Coding)•5 minutes
- Yaml Files (Coding)•3 minutes
- main.py (Coding)•4 minutes
- run crew (Coding)•2 minutes
- Adding Tools (Coding)•4 minutes
- Debugging (Coding)•4 minutes
1 assignment•Total 15 minutes
- Agentic Systems – crewAI - Assessment•15 minutes
In this module, we will dive into AG2, a powerful framework for building conversational AI agents. You will learn to code systems with multiple agents interacting with each other and with humans. Additionally, we’ll explore how to integrate external tools to extend the functionality of your agents and create more dynamic and adaptable AI systems.
What's included
6 videos1 assignment
6 videos•Total 46 minutes
- AG2 Introduction (101)•8 minutes
- Conversable Agent (Coding)•8 minutes
- Two Agent Conversation (Coding)•8 minutes
- Human in the Loop (Coding)•9 minutes
- Adding Tools (Coding)•7 minutes
- Group Chat (Coding)•7 minutes
1 assignment•Total 15 minutes
- Agentic Systems – AG2 - Assessment•15 minutes
In this module, we will explore the OpenAI Agents SDK and its features for building complex AI systems. You’ll learn how to create workflows that handle agent handoffs and ensure smooth operation. The course will also cover essential techniques for applying guardrails, ensuring safe agent behavior, and using tracing for debugging and performance monitoring.
What's included
6 videos1 assignment
6 videos•Total 32 minutes
- Agents Introduction (101)•6 minutes
- Handoff (Coding)•9 minutes
- Running Options (Coding)•4 minutes
- Guardrails (Coding)•8 minutes
- Using Other Models (Coding)•4 minutes
- Traces (Coding)•2 minutes
1 assignment•Total 15 minutes
- Agentic Systems – OpenAI Agents SDK - Assessment•15 minutes
In this module, we will introduce the Google Agent Development Kit (ADK) and guide you through building multi-agent systems. You will learn to work with function tools to extend agent capabilities and tackle complex tasks. This will enhance your ability to design sophisticated agent-driven workflows with the ADK framework.
What's included
3 videos1 assignment
3 videos•Total 23 minutes
- ADK Introduction (101)•6 minutes
- Function Tools (Coding)•9 minutes
- Multi Agents (Coding)•8 minutes
1 assignment•Total 15 minutes
- Agentic Systems – Google ADK - Assessment•15 minutes
In this module, we will focus on agent-to-agent communication protocols like MCP, A2A, and ACP. You will gain hands-on experience in setting up and testing MCP server-client interactions to facilitate effective communication between agents. This will equip you with the skills to build more dynamic and interconnected agent systems.
What's included
5 videos1 assignment
5 videos•Total 18 minutes
- Agent Interactions: MCP, A2A, and ACP•2 minutes
- Model Context Protocol (101)•5 minutes
- MCP Client Installation (Coding)•1 minute
- MCP Server Setup (Coding)•5 minutes
- MCP Server Testing (Coding)•4 minutes
1 assignment•Total 15 minutes
- Agent Interactions (MCP, A2A, ACP) - Assessment•15 minutes
In this module, we will introduce you to model finetuning techniques, focusing on methods like LoRA. You’ll learn how to adapt pre-trained models to specific tasks and fine-tune their performance for better results. This skill will be crucial for optimizing AI models to meet the needs of different applications.
What's included
2 videos3 assignments
2 videos•Total 11 minutes
- Model Finetuning (101)•6 minutes
- Finetuning with LoRA (101)•5 minutes
3 assignments•Total 90 minutes
- Model Finetuning - Assessment•15 minutes
- Full Course Assessment•60 minutes
- Full Course Practice Assessment•15 minutes
Instructor
Explore more from Software Development
- Status: Free Trial
- Status: Free Trial
Course
- Status: Free Trial
- Status: Preview
Course
Why people choose Coursera for their career
Frequently asked questions
Generative AI with Python refers to the development and application of machine learning models capable of generating new content, such as text, images, or other media, using Python programming. This specialization is highly relevant in today's world where AI can enhance creativity, automate tasks, and contribute to numerous industries, including content creation, customer service, and data analysis.
This course introduces learners to the essentials of generative AI using Python. It covers foundational concepts in AI, Python programming, and large language models (LLMs), as well as practical coding skills such as setting up environments, working with APIs, and using vector databases. By the end of the course, participants will be equipped to implement generative AI models and enhance them through advanced strategies such as Retrieval-Augmented Generation (RAG) and agentic systems.
Upon completing this course, you will be able to build and interact with generative AI models using Python. You will understand the principles behind large language models, implement API interactions, and work with multimodal data. Additionally, you will be capable of developing AI workflows, utilizing vector databases for efficient data handling, and applying advanced AI techniques such as RAG and model finetuning.
More questions
Financial aid available,
