Home / Prompt Engineering Beginner
Prompt Engineering Beginner
Choosing the words that make a model answer well. Roles, examples, reasoning, system prompts and guardrails, every technique run for real.
Prompt engineering is choosing the words that make a language model answer well. This course teaches it from zero: what a prompt is, how a model reads it, roles, examples, chain-of-thought, system prompts, structured output, grounding and guardrails — 50 short lessons, every example run for real against a local model, ending with a measured support desk.
Course contents
Work top to bottom — the sidebar is the course. Topics later in the list assume the ones before them.
What a Prompt Is
- Prompt Engineering: What Is a Prompt?
- Prompt Engineering: The Model Predicts the Next Word
- Prompt Engineering: Your First Before and After
How LLMs Read Prompts
- Prompt Engineering: Tokens
- Prompt Engineering: The Context Window
- Prompt Engineering: Temperature
- Prompt Engineering: Hallucination
The Anatomy of a Good Prompt
- Prompt Engineering: Role
- Prompt Engineering: Task
- Prompt Engineering: Context
- Prompt Engineering: Constraints and Format
Zero-Shot and Few-Shot
- Prompt Engineering: Zero-Shot
- Prompt Engineering: Few-Shot
- Prompt Engineering: Choosing Good Examples
- Prompt Engineering: How Many Examples Is Enough?
Chain-of-Thought and Reasoning
- Prompt Engineering: Chain-of-Thought
- Prompt Engineering: When Reasoning Helps
- Prompt Engineering: Self-Consistency
- Prompt Engineering: Decomposition
System Prompts
- Prompt Engineering: What a System Prompt Is
- Prompt Engineering: Writing a System Prompt for ShopStack
- Prompt Engineering: System Prompt vs User Prompt
- Prompt Engineering: When the System Prompt Fights Back
Structured Output
- Prompt Engineering: Ask for JSON, Get JSON
- Prompt Engineering: The Schema Is the Contract
- Prompt Engineering: When the Model Breaks the Shape
- Prompt Engineering: Templates
Prompting for Code
- Prompt Engineering: Ask for Code, Not Explanations
- Prompt Engineering: Show the Error, Get the Fix
- Prompt Engineering: Prompting for Tests
- Prompt Engineering: Code Review by Prompt
Prompting for Writing and Data
- Prompt Engineering: Product Descriptions That Sell
- Prompt Engineering: Summarise Without Losing the Point
- Prompt Engineering: Extract Data from Text
- Prompt Engineering: Translate and Rephrase
Failure Modes: Hallucination
- Prompt Engineering: Spot a Hallucinated Answer
- Prompt Engineering: Grounding
- Prompt Engineering: "I Don't Know" Is a Good Answer
- Prompt Engineering: Cite Your Sources
Prompt Injection and Guardrails
- Prompt Engineering: What Is Prompt Injection?
- Prompt Engineering: Injection in the Wild
- Prompt Engineering: Guardrails That Hold
- Prompt Engineering: The Limits of Guardrails
Prompt Library and Capstone
- Prompt Engineering: Your Prompt Library
- Prompt Engineering: Versioning Prompts
- Prompt Engineering: The Prompt Cheat Sheet
- Prompt Engineering: Capstone, Part 1
- Prompt Engineering: Capstone, Part 2
- Prompt Engineering: Capstone, Part 3
- Prompt Engineering: Capstone
Learn Prompt Engineering
Prompt engineering is the skill of writing the message that makes a language model do good work. The model predicts the next word from the words it is given, so the words you choose decide the answer you get. A vague prompt gets a vague answer; a prompt with a role, a task, the facts and a shape gets a useful one.
The course holds 50 lessons in 12 sections, at about seven minutes a lesson — 336 minutes in total, about six hours of reading and practice. It moves in the order a beginner actually needs: what a prompt is, how the model reads it, the parts of a good prompt, zero-shot and few-shot, reasoning step by step, system prompts, structured output, prompting for code, prompting for writing and data, the ways prompts fail, prompt injection and guardrails, and a capstone.
One shop runs through the whole course: ShopStack, a small home-goods shop with five products, three orders and five policies. Every prompt in the course is a real ShopStack job — answering a customer, checking an order, writing a product description — so each technique is learned on a task that feels real, not on an abstract example.
Nothing here is a guess. Every prompt in the course was run for real against the local model llama3.1:8b, and the reply printed beside it is the reply the model gave, word for word. Before-and-after pairs run on the same model at the same temperature, so the improvement is measured, not claimed. No API key is needed and no code is needed: this is the first course in the track, and a reader who has never written a line of Python can take it first.
What you will learn
Here is what the 50 lessons cover, in the order they teach it:
- What a prompt is, and how a language model predicts the next word from it
- Tokens and the context window: the two limits every prompt lives inside
- Temperature, and the first failure mode: hallucination, when the model invents
- The anatomy of a good prompt: role, task, context, constraints and format
- Zero-shot and few-shot prompting: asking cold, and showing examples first
- Chain-of-thought, self-consistency and decomposition: getting the model to reason
- System prompts: the rules that hold for every reply, and how they fight back
- Structured output: JSON, schemas, and what to do when the model breaks the shape
- Prompting for code: asking for code, showing the error, prompting for tests and reviews
- Prompting for writing and data: product descriptions, summaries, extraction and translation
- Grounding, refusing honestly, and citing sources: the cures for hallucination
- Prompt injection, guardrails, a prompt library, and the capstone: a measured support desk
Who this course is for
This course is for anyone who uses a language model and wants better answers from it — support staff, writers, shop owners, students, and developers who prompt models in their work. No coding experience is needed. The opening section names exactly what it assumes, so the starting point can be checked in a minute.
It suits someone who has typed a question into a chatbot and been disappointed by the reply, and wants to know why the reply went wrong and how to fix it. Each lesson shows the weak prompt and the strong prompt side by side, run on the same model, so the difference is visible.
It is also the entry point to the AI-engineer track. The next courses call models from code, build retrieval systems and agents, and evaluate them — and every one of them leans on the prompting skill this course teaches.
How this course works
Every prompt in the course was run for real on the local model llama3.1:8b before publication, at temperature 0.0 unless the lesson states otherwise. The reply printed beside it is the reply the model gave, not a guess. That matters most when a lesson turns on a before-and-after pair, where a guessed line would teach the wrong thing.
The sections run in one fixed order. Few-shot leans on zero-shot, chain-of-thought leans on few-shot, system prompts lean on the anatomy section, and the capstone leans on everything. Reading out of order is allowed, but the missing piece usually shows up fast.
The course is honest about what was verified and what was not. The model runs locally, so the replies are reproducible on the same model and temperature. Where a lesson shows a failure — a hallucinated code, an invented tracking number — the failure is the real reply the model gave to that prompt, and the lesson says so.
Every lesson ends with one exercise. Pick an answer, then read why it is right and why the tempting answers are wrong. That short check turns reading into a small test of what stuck.
Progress is saved right here in this browser, with no account and no cost. Close the tab and come back later: the course remembers where the reader stopped.
Frequently asked questions
Do I need to know how to code to take this prompt engineering course?
No. This course needs no code at all. Every prompt is plain text and every reply is plain text. A reader who has never written a line of Python can take it first — it is the entry point to the AI-engineer track, and the later courses are the ones that call models from code.
Which model are the examples run on?
The local model llama3.1:8b, run through Ollama on the course build machine. Every prompt in the course was run on that model, and the reply shown is the reply it gave, word for word. Before-and-after pairs run on the same model at the same temperature, so the improvement is measured, not claimed.
Do I need an API key or an account?
No. The model runs locally, so there is no API key, no account and no cost for any lesson. The course also explains that the model calls run against the local lab, not in the browser: each lesson shows the exact prompt and the real reply from the lab run.
What is the ShopStack support desk?
ShopStack is the fictional home-goods shop that runs through the whole course: five products, three orders and five policies. Every prompt is a real ShopStack job — answering a customer, checking an order, writing a product description. The capstone builds the full support desk from five prompts, measures it on twenty customer messages, fixes the five worst, and re-runs it on twenty fresh messages.
What do I build in this course?
A working support desk, end to end. Five prompts cover the desk's five jobs — greeting, order lookup, refund, complaint and escalation — then the desk is measured on real customer messages, the worst prompts are fixed one change at a time, and the finished desk is run on twenty fresh messages.
What comes after this course?
The AI-engineer track continues with LLM APIs, which calls models from Python code. Python Beginner teaches the Python the next course needs, and Python ML Beginner goes deeper into machine learning. Git Beginner teaches the version control the prompt library's versioning lesson points at.
Next steps
- Python Beginner ❯ — Learn the language the next track course calls models from. Python teaches variables, functions, loops and files, from a first program to a working script.
- Python ML Beginner ❯ — Learn the machine learning the track builds toward. Python ML teaches data, models and evaluation, from a first dataset to a trained model.
- Git Beginner ❯ — Learn the version control the prompt library depends on. Git tracks snapshots, branches and merges, and this course teaches one command at a time.