Skip to content
Edition NigeriaGlobal
Country

You are in the Nigeria edition. Type your country to switch.

Set up your profile

Beginner path · Free course

AI prompt engineering

How language models work at a useful level, then the craft of prompting from first principles to advanced practice: instructions, context, examples, structure, roles, constraints, step-by-step reasoning requests, output formats, iteration, evaluation, prompt libraries, and the failure modes to design against, from hallucination to prompt injection.

  • Beginner level
  • 12 lessons
  • 2 hours of study
  • 1 final test
  • $3 certificate (about ₦4,290)
  • Nigeria edition

Education, not advice: this course explains how products and rules work. It does not recommend any product, trade or provider.

Start the free courseSign in with your free Stockertim account to enrol.

What you will learn

  • You can explain, in plain words, how a language model produces an answer.
  • You can name the six parts of a strong prompt and say what each one does.
  • You can give an assistant the audience, purpose and background it needs for a task.
  • You can explain the difference between zero-shot, one-shot and few-shot prompting.
  • You can explain what role prompting changes in an answer and what it cannot change.
  • You can set clear limits on the length, scope, structure and content of an answer.
  • You can break a complex request into smaller steps an assistant can handle one at a time.
  • You can treat a first answer as a draft and improve it with targeted follow-ups.

Skills you will practise

Syllabus

12 lessons · about 2 hours · a short test after every step, a quiz after every lesson and one final test.

  1. How language models work, at a useful levelA language model writes by predicting one likely piece of text after another. Knowing about tokens, the context window and temperature explains most … 12 min · 6 steps
    1. A machine that predicts the next piece of text
    2. Tokens and the token budget
    3. The context window: what the model can see
    4. Sampling and temperature: why answers vary
    5. What it learned against what you tell it
    6. A fluent answer is not a checked answer
    7. Lesson quiz
  2. The anatomy of a good promptA good prompt has six parts: the task, the context, examples, the format, the constraints and a test of success. This lesson rewrites a weak prompt s… 10 min · 5 steps
    1. What a prompt is, and why it decides the answer
    2. The six parts
    3. A weak prompt, diagnosed
    4. The rewrite, step by step
    5. A checklist to use with any assistant
    6. Lesson quiz
  3. Giving context and clear instructionsAssistants do their best work when they know the audience, the purpose and the background, and when pasted material is clearly marked off from your i… 10 min · 5 steps
    1. Audience, purpose and background
    2. Specific beats general
    3. Marking off your material with delimiters
    4. Standing instructions and one-off requests
    5. Say what to do, not only what to avoid
    6. Lesson quiz
  4. Examples: zero-shot, one-shot and few-shot promptingSometimes showing beats telling. This lesson explains zero-shot, one-shot and few-shot prompting, how to choose varied examples, the risk that the mo… 10 min · 5 steps
    1. Show or tell?
    2. A worked example: sorting customer messages
    3. Checking accuracy on new items
    4. When the model copies the wrong thing
    5. The habit to keep
    6. Lesson quiz
  5. Roles, audience and toneTelling an assistant to answer as an editor or a tutor changes its vocabulary and perspective, but adds no expertise or facts. This lesson shows how … 10 min · 5 steps
    1. What a role does, and what it does not
    2. Write for a person, not a job title
    3. Setting tone and reading level
    4. A style sheet in the prompt
    5. Using roles honestly and well
    6. Lesson quiz
  6. Constraints and output formatsConstraints set the length, scope, structure and exclusions of an answer, and output formats make it usable: a table, a checklist or named fields tha… 10 min · 5 steps
    1. Four kinds of constraint
    2. Choosing an output format
    3. Worked example: emails into a five-field table
    4. Checking every field
    5. Fixed templates and the habit to keep
    6. Lesson quiz
  7. Asking for step-by-step reasoningComplex questions go better when they are broken into steps. This lesson covers task decomposition, plan-then-answer prompts, asking for working you … 10 min · 5 steps
    1. Why steps help
    2. Breaking the task down
    3. Worked example: a price that rises, then falls
    4. Explanations are not a window into the machine
    5. Keep calculations in a tool
    6. Lesson quiz
  8. Iteration and refinementThe first answer is a draft. This lesson shows how to improve it with follow-up prompts that target one fault at a time, how to use critique-and-revi… 10 min · 5 steps
    1. The first answer is a draft
    2. One fault per follow-up
    3. Worked example: three rounds with a change log
    4. Critique-and-revise, and knowing when to start again
    5. Prompt chaining for bigger jobs
    6. Lesson quiz
  9. Evaluating prompts and outputsOne good answer proves nothing. This lesson shows how to judge prompts properly: a written rubric, a fixed test set with expected results, scoring tw… 9 min · 6 steps
    1. Why one good answer proves nothing
    2. Writing a rubric
    3. Building a test set
    4. Comparing two versions
    5. Reading results honestly
    6. People in the loop after launch
    7. Lesson quiz
  10. Prompt libraries and templatesA prompt that works is worth keeping. This lesson turns one into a template with square-bracket fields, then shows how a team library names, versions… 9 min · 5 steps
    1. Why keep prompts at all
    2. From prompt to template
    3. A library entry, field by field
    4. Owners, versions and retirement
    5. Sharing safely and starting your own
    6. Lesson quiz
  11. Hallucination and groundingModels produce confident errors and invented citations because they predict plausible text. This lesson shows how to ground answers in supplied docum… 10 min · 5 steps
    1. Why confident errors happen
    2. Invented citations, checked
    3. Grounding answers in your sources
    4. Retrieval-augmented generation, in outline
    5. The habit to keep
    6. Lesson quiz
  12. Prompt injection and other failure modesAI systems fail in recognisable ways. This lesson explains, defensively, how direct and indirect prompt injection work, and covers sycophancy, incons… 10 min · 5 steps
    1. What prompt injection is
    2. Defending against injection
    3. Sycophancy: the agreeable assistant
    4. Inconsistency, over-refusal and bias
    5. A failure-mode table to design against
    6. Lesson quiz

Final test

A fresh set of questions drawn from every lesson of this course, timed, with the options in a new order every time. You need 85% to pass, and passing earns your certificate.

Enrol to unlock the final test.

English