Intermediate

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 lessons6.2h hands-on11 languages

11 lessons, in order

  1. 1

    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 is, What a large language model is, from the outside, The completion, and why the same prompt can answer differently, The conversation: system, user and assistant turns, Why a prompt is instructions rather than a search query

    20 min
  2. 2

    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 tokenization, next-token prediction, Temperature and top-p sampling, Context window, Why models hallucinate

    30 min
  3. 3

    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 direction, Specifying format, Providing examples, Evaluating quality, Dividing labor

    30 min
  4. 4

    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 delimiters, system, user, and assistant roles, few-shot prompting, Parsing structured output like JSON

    35 min
  5. 5

    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 variables, Separating template from data, Function calling and tool schemas, Reading a tool call and returning a result

    35 min
  6. 6

    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 similarity, Chunking documents, Vector databases and nearest-neighbor search, retrieval-augmented generation, Grounding answers with citations

    40 min
  7. 7

    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, observe, Giving an agent tools, short-term and long-term memory, Stopping conditions and guardrails

    40 min
  8. 8

    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 denoising, Text conditioning of the image, Seeds and reproducibility, Sampling steps and guidance scale

    30 min
  9. 9

    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 lighting, Art styles and artist or era modifiers, Composition and camera modifiers, Negative prompts and aspect ratio

    35 min
  10. 10

    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 generation, Inpainting with masks, Outpainting to extend a canvas, ControlNet for pose, depth, and edge guidance

    35 min
  11. 11

    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 workflow, Orchestration and chaining steps, Evaluation and guardrails, cost, latency, and failure handling

    40 min

Where Prompt Engineering comes next

The roadmaps that include this course.