All coupons / IT & Software

Prompt Engineering with Python & the OpenAI API

Course Description

The API is where real applications are built. This course is how you get there. This course is for Python developers who are ready to move from experimenting with AI to actually building with it. You'll work directly with OpenAI's modern Responses API — the one OpenAI recommends for all new projects — writing real code that connects to real tools and produces real results. WHAT YOU'LL BUILD You'll complete three capstone projects, each one closing out a module after the concepts that make it possible have been taught. Research Assistant — Decomposes complex questions into sub-questions, investigates each one independently, and synthesizes the findings into a structured answer. Built using instruction chaining, personas, and advanced few-shot techniques. Production Support Bot — A fully functional support chatbot with budget controls, sliding window context management, and response caching. Built incrementally across two modules to show how production systems are actually assembled — not just demonstrated in a single notebook. Multi-Tool Agent — Connects to a live weather API and queries a real SQLite database using function calling. This is AI that interacts with the outside world through Python functions. WHAT YOU'LL LEARN API Fundamentals — Connect to the OpenAI API, configure your environment, and make your first calls using the Responses API. Understand model selection, token usage, and cost tracking from day one. Core Prompting — Zero-shot, one-shot, and few-shot prompting. Understand exactly how the model responds to different prompt structures and why it matters. Production Prompting — Structured JSON outputs for reliable parsing, error handling with exponential backoff, reusable prompt templates, and systematic prompt evaluation so you can measure whether your prompts are actually working. Advanced Prompting — Instruction chaining, role-based personas, advanced few-shot techniques, and self-consistency strategies for more reliable outputs. Production Patterns — Token counting and cost tracking with tiktoken, context window strategies for long conversations, and response caching to eliminate redundant API calls. Function Calling — The complete function calling workflow. Connect the AI to external tools, live APIs, and real databases so it can take actions in the world. HOW THE COURSE IS STRUCTURED Six modules. 25+ hands-on Jupyter notebooks. Each concept is taught in its own notebook with working code you can run, modify, and reuse. Each module closes with a capstone that puts everything you just learned into a real, deployable application. PREREQUISITES Basic Python familiarity — classes, functions, loops, and importing packages. Environment setup is covered in Module 1. You'll also need an OpenAI account with a minimum of $5 in API credit. That's more than enough to complete every exercise in the course using gpt-5-mini, the default model used throughout. WHO THIS COURSE IS FOR Engineers adding AI capabilities to existing applications. Analysts automating workflows with Python. Technical leads evaluating how to integrate AI into their teams' work. WHO THIS COURSE IS NOT FOR Complete beginners to Python. If you're new to Python, build that foundation first — you'll get significantly more out of this course when you come back.