Prompt Engineering
Get reliable results out of generative AI. Learn how large language models produce text, the five principles behind every good prompt, few-shot and structured output, function calling, retrieval-augmented generation, autonomous agents, and how diffusion models turn prompts into images. You finish by wiring text, images, and agents into one working application.
11 lessons, in order
- 120 min
What a Prompt Is
You have probably typed into a chat box before: asked a question, gotten an answer, maybe been surprised by how good or how wrong it was. This course...
What a prompt isWhat a large language model is, from the outsideThe completion, and why the same prompt can answer differentlyThe conversation: system, user and assistant turnsWhy a prompt is instructions rather than a search query - 230 min
How Large Language Models Generate Text
You now know what a prompt and a completion are, and that the same prompt can come back differently worded each time. This lesson shows you what...
Tokens and tokenizationNext-token predictionTemperature and top-p samplingContext windowWhy models hallucinate - 330 min
The Five Principles of Prompting
You already know what a prompt is, what a completion is, and that the model is writing a fresh reply each time rather than reciting something it...
Giving directionSpecifying formatProviding examplesEvaluating qualityDividing labor - 435 min
Standard Practices for Text Generation
Lessons two and three gave you a feel for how the model actually produces text one token at a time, and the five principles for steering it. This...
Prompt formatting and delimitersSystem, user, and assistant rolesFew-shot promptingParsing structured output like JSON - 535 min
Prompt Templates and Function Calling
In lesson four you formatted a single prompt by hand: delimiters, roles, a few-shot example. That works for one prompt. When you need the same prompt...
Prompt templates with variablesSeparating template from dataFunction calling and tool schemasReading a tool call and returning a result - 640 min
Vector Databases and Retrieval-Augmented Generation
In lesson 2 you saw why a model hallucinates: it predicts likely next tokens, it does not look facts up, and anything outside its training or its...
Embeddings and vector similarityChunking documentsVector databases and nearest-neighbor searchRetrieval-augmented generationGrounding answers with citations - 740 min
Autonomous Agents: Memory and Tools
In lesson 5 you gave a model tools through function calling, and in lesson 6 you gave it long-term memory through retrieval. This lesson puts those...
The agent loop of reason, act, observeGiving an agent toolsShort-term and long-term memoryStopping conditions and guardrails - 830 min
How Diffusion Models Generate Images
Until now every prompt you wrote produced text. This lesson opens Part 3, where the same prompt produces a picture. The medium changes but the...
Diffusion as iterative denoisingText conditioning of the imageSeeds and reproducibilitySampling steps and guidance scale - 935 min
Standard Practices for Image Generation
The previous lesson gave you the intuition for how a diffusion model turns a text prompt into an image by denoising from random noise. This lesson...
Prompt structure of subject, medium, style, and lightingArt styles and artist or era modifiersComposition and camera modifiersNegative prompts and aspect ratio - 1035 min
Advanced Image Techniques: Inpainting, Outpainting, and ControlNet
In the last two lessons you generated whole images from a text prompt and learned to steer them with structure, style, and negative prompts. That...
Image-to-image generationInpainting with masksOutpainting to extend a canvasControlNet for pose, depth, and edge guidance - 1140 min
Building AI-Powered Applications
This is the capstone. Every earlier lesson taught one move: generating text, shaping structured output, calling functions, retrieving facts with RAG,...
Composing text, images, and agents into a workflowOrchestration and chaining stepsEvaluation and guardrailsCost, latency, and failure handling
Learn Prompt Engineering in your language
Every lesson, quiz, and tutor reply renders in your language. The AI tutor matches the language you ask in.
