Learn prompt engineering by doing. Every lesson hands you prompts and settings you paste straight into a model playground — from the anatomy of a prompt to reasoning techniques, structured outputs, sampling parameters, and reliability.
Before you start
You will run the prompts in this course yourself, so open a model playground — not a chat app — where you can change the settings. Any of OpenAI Playground, Google AI Studio, or the Anthropic Console works. The first lesson walks you through the setup.
Set Up Your Playground
Before writing a single prompt, get hands-on access to a model playground where you can see and change every setting the chat apps hide — the system prompt, temperature, and token limits.
Anatomy of a Prompt
A strong prompt is built from four parts — instruction, context, input data, and an output indicator. Build one up piece by piece and watch the answer sharpen at every step.
Zero-Shot, One-Shot & Few-Shot
Teach the model by example. Go from giving no examples (zero-shot) to one (one-shot) to several (few-shot), and feel how each added example locks the output into the exact shape you want.
System, Role & Contextual Prompting
Three ways to steer a model before it answers — set the rules with a system prompt, give it a persona with a role, and feed it background with context. Learn when each one is the right lever.
Chain of Thought & Step-Back
Make the model reason instead of blurting an answer. Add a single line to unlock step-by-step thinking, give worked examples, and use the step-back move to reason from principles first.
Self-Consistency & Tree of Thoughts
Two ways to trade extra compute for more reliable answers — sample several reasoning paths and take the majority vote, or have the model branch, evaluate, and prune ideas like a search tree.
ReAct Prompting
ReAct interleaves reasoning with actions — the model thinks, calls a tool, reads the result, and thinks again. It is the prompting pattern behind agents that search, calculate, and use APIs.
Structured Outputs
Get answers your code can parse — JSON, XML, CSV, or Markdown tables. Show a schema, give an example, and constrain the output so you never have to scrape prose for the value you need.
Sampling Parameters
Temperature, Top-P, and Top-K decide how the model picks each next word — from rigidly predictable to wildly creative. Run one prompt across the range and watch the personality change.
Output Control & Repetition
Control the shape of the answer with max tokens and stop sequences, and kill repetitive, looping text with frequency and presence penalties. The settings that make output production-ready.
Automatic Prompt Engineering
Let the model improve your prompts for you — generate variants, critique a weak prompt, and use meta-prompting to turn a rough idea into a polished, reusable template.
Prompting Best Practices
The habits that separate reliable prompts from lucky ones — be specific, show examples, constrain the output, use delimiters, prefer positive instructions, and test before you ship.
Improving Reliability
Make prompts dependable over time — debug failures methodically, version your prompts, have the model check its own work, and calibrate how much you trust its confidence.