About Prompt & Context Engineering
A large language model only knows what is in front of it. Prompt engineering is the
craft of asking well, and context engineering is the wider job of
deciding everything the model sees: the instructions, examples, documents, memory
and tool results that fill its context window. Together they decide whether an AI
app is reliable or frustrating.
This course starts with How LLMs Read Prompts, then builds the core
prompting skills: Writing Clear Instructions,
Roles & System Prompts, Examples & Few-Shot
Prompting, Reasoning & Step-by-Step Prompts and
Structured Outputs.
From there it moves to context. You'll learn how Tokens & Context
Windows limit what a model can handle, then how to choose and arrange
information with Context Engineering Basics,
Retrieval & Grounding and Memory & Conversation
State. The course closes with Tools & Agent Context,
for apps where the model takes many steps, and Testing, Evals & Prompt
Safety, for checking that your prompts keep working and stay safe.
No coding is needed for the prompting modules, though basic Python helps in the
later ones. Each module builds on the last, so work through them in order.
Content
12 modules
01
How LLMs Read Prompts
What actually happens when you send a prompt: how a model predicts the next token, why wording changes results, and what prompt engineering can and cannot fix.
LLM Basics
Next-Token Prediction
Prompt Anatomy
02
Writing Clear Instructions
The habits behind good prompts: stating the task, the audience and the format, giving the right background, and cutting ambiguity.
Task Framing
Constraints
Output Format
03
Roles & System Prompts
Using system and user messages, assigning roles and personas, and setting tone and rules that hold across a whole conversation.
System Prompts
Personas
Tone & Style
04
Examples & Few-Shot Prompting
Teaching by showing: zero-shot versus few-shot prompts, picking and ordering good examples, and avoiding examples that mislead the model.
Few-Shot
Example Selection
Pattern Matching
05
Reasoning & Step-by-Step Prompts
Getting better answers on hard problems with step-by-step reasoning, breaking tasks into stages, and checking a model's own work.
Chain of Thought
Task Decomposition
Self-Checking
06
Structured Outputs
Getting reliable JSON, XML and tables out of a model: output schemas, delimiters, validation and what to do when the format breaks.
JSON
Schemas
Validation
07
Tokens & Context Windows
How text becomes tokens, what a context window is, how cost and speed depend on length, and why long inputs can hurt quality.
Tokens
Context Window
Cost & Latency
08
Context Engineering Basics
Deciding what goes into the model's context: selecting the right information, ordering it, trimming it and keeping instructions separate from data.
Context Selection
Ordering
Compaction
09
Retrieval & Grounding
Bringing in outside knowledge with search and retrieval, grounding answers in documents, and asking models to cite their sources.
RAG Basics
Grounding
Citations
10
Memory & Conversation State
Managing long conversations and long-running tasks: summaries, notes kept outside the window, and what to remember or forget between sessions.
Summarization
Short and Long-Term Memory
State
11
Tools & Agent Context
Writing tool descriptions a model can use well, handling tool results, and managing context across the many steps of an agent.
Tool Use
Agents
Tool Results
12
Testing, Evals & Prompt Safety
Treating prompts like code: building test sets, comparing versions, and defending against prompt injection and unsafe outputs.
Evals
Prompt Injection
Guardrails
What You Can Do After This Course
By the end of the curriculum you'll be able to design the full input to a language
model, not just the question. Concretely, you'll be able to:
Explain how prompts work: how a model reads a prompt, why small wording changes shift results, and where prompting stops helping.
Write clear, reliable prompts: state the task, audience and format so the model gives consistent answers.
Steer behaviour with roles and examples: use system prompts, personas and few-shot examples to get the style and format you want.
Get structured, machine-readable output: ask for JSON and other formats, then validate the result before your code relies on it.
Manage the context window: count tokens, pick what to include, and keep long inputs from hurting quality or cost.
Ground answers in real information: add retrieval, documents and citations so the model works from sources instead of guessing.
Design context for agents and long tasks: handle memory, tool descriptions and tool results across many steps.
Test and protect your prompts: build evals to compare prompt versions, and defend against prompt injection.