AI for developers

Develop with the OpenAI APIs in Python

Use GPT models from Python: generation, summarization, question answering, embeddings and fine-tuning.

Request this program
Duration
21 h · 3 days
Level
Intermediate
Format
On site · Remote · Blended
Max. group size
12 participants

Overview

This program teaches how to integrate language models into Python applications. Participants understand how GPT models work, use the API and its Python library, develop generation, summarization and question-answering features, then explore embeddings, moderation, speech and images. The last day covers advanced prompt engineering, few-shot learning and domain adaptation.

Who this program is for

  • Python developers
  • Data scientists
  • Teams adding generative AI features to a product

Prerequisites

  • Knowledge of Python
  • Notions of REST APIs

Learning objectives

  • Understand how GPT models work and their limits
  • Call the API from Python
  • Develop text generation, summarization and question answering
  • Use embeddings, moderation and other APIs
  • Control costs, security and privacy
  • Apply few-shot learning and domain adaptation

Detailed curriculum

6 modules · 21 h · 3 days

Day 1
Understanding GPT models3.5 h
50% theory · 50% practice
  • AI, machine learning and deep learning
  • Types of learning
  • Evolution of large language models
  • Advantages, limits and parameters
  • Playground and first tries
First calls from Python3.5 h🛠 1 workshop
30% theory · 70% practice
  • API keys and best practices
  • Official Python library
  • Messages and roles
  • Handling errors and rate limits
  • Estimating costs
🛠 Hands-on workshops
Minimal client1.5 h

Write a Python client that queries the model.

✅ Deliverable : A working client
Day 2
Generation features3.5 h🛠 1 workshop
30% theory · 70% practice
  • Text generation and editing
  • Content summarization
  • Question answering
  • Structured outputs
  • Assessing quality
🛠 Hands-on workshops
Document summarizer2 h

Develop a document summarization tool.

✅ Deliverable : A summarization tool
Other APIs and security3.5 h
50% theory · 50% practice
  • Embeddings and semantic search
  • Moderation
  • Speech recognition and image generation
  • Data privacy
  • Security of keys and calls
Day 3
Advanced prompt engineering3.5 h🛠 1 workshop
30% theory · 70% practice
  • Few-shot learning
  • Reasoning chains
  • System instructions and guardrails
  • Systematically evaluating prompts
  • Handling drift
🛠 Hands-on workshops
Optimize a prompt1.5 h

Improve a prompt using a test set.

✅ Deliverable : A measured prompt
Domain adaptation and project3.5 h🛠 1 workshop
30% theory · 70% practice
  • Preparing datasets
  • Adapting the model to a domain
  • Fine-tuning: when and why
  • Fine-grained API parameters
  • Capstone mini-project
🛠 Hands-on workshops
Mini-project2 h

Build a complete Python application with a model.

✅ Deliverable : A presented application

Tools and technologies

API OpenAIChatGPTJupyter NotebookPythonVisual Studio Code

Teaching methods

  • Alternating short lectures and hands-on work
  • Live demonstrations by the trainer
  • Capstone project built throughout the modules
  • Group corrections and discussion of best practices

Assessment

  • Hands-on exercises corrected in each module
  • Mini-project completed at the end of the course
  • Knowledge-check quiz

Required equipment

  • A computer with an internet connection
  • Python 3, a code editor and an API key (provided or personal)

Resources provided

  • Course materials and repository of corrected exercises

Career outcomes

  • A Python application integrating a language model
  • A set of reusable patterns
  • Mastery of costs and limits

Related video courses

My video courses that go with this program, to get ready for the training or to review afterwards. Free with an account.