Study the lesson
Work through every section at your own pace, from start to finish.
Most people who work with large language models reach the same realisation after a run of frustrating results: what you put into a model shapes what comes out in ways that are neither arbitrary nor magical. Prompt engineering is the discipline of understanding those relationships well enough to exploit them deliberately. The phrase attracts some scepticism, often dismissed as a temporary workaround until models become smart enough to understand plain instructions. That view misunderstands what is happening. Prompting is structured communication with a probabilistic system that predicts the most likely continuation of your input, not the coaxing of a reluctant machine into compliance. Every word you write shifts that probability distribution. This lesson treats prompt engineering as the applied discipline it is. You will learn why prompts work the way they do, master the core patterns experienced practitioners reach for, understand how to structure prompts for production systems rather than one-off experiments, and recognise the security and failure risks that can derail real deployments. You will also get a framework for iterating on prompts systematically, because good prompting is a craft practised over many iterations, not a secret unlocked by a single trick. By the end, you will have a principled toolkit rather than a bag of incantations.
Unlock the full lesson, the quiz, and your verifiable completion.
Continue with GoogleBy continuing you agree to the Institute of AI terms of use and privacy policy.
None of these are hard requirements. The lesson is easier if they are already familiar, but everything it uses is explained along the way, so you can start without them.
Section one is open to everyone. Create a free account to work through the rest and take the quiz.
To use prompts well, you need a working mental model of what happens when a model receives one. You do not need the mathematics of attention mechanisms; you need the mechanism at the level that changes how you behave. A large language model is fundamentally a next-token prediction system. It takes a sequence of text, represented internally as tokens (roughly, word fragments), and produces a probability distribution over what token should come next. It samples from that distribution, appends the result, and repeats until it hits a stopping condition. The model has no memory between sessions and no intentions, only a vast set of statistical associations encoded in billions of learned parameters. The direct implication is that every element of your prompt influences that distribution. A prompt is not a command issued to a compliant assistant; it is the context that shapes the space of likely responses. Change the context and you change the likely outputs. The context window is the total amount of text, including your prompt, any conversation history, retrieved documents, and the model's own output, that the model can see at once. It is a hard limit, not a soft one. Text that falls outside the window is simply not available to the model. Exceeding it causes earlier content to be dropped or produces an error, depending on the implementation. Context windows vary widely and continue to expand, but they remain a hard constraint in any real deployment. Practitioners who treat the context window as infinite build systems that fail under realistic load. There are two broad mechanisms by which a prompt influences behaviour. The first is instruction following: the model has been trained to treat certain patterns, typically imperative sentences or system-level directives, as instructions to execute. 'Summarise this in three bullet points' works partly because the model has been reinforced on many examples of that kind of instruction-response pair. The second is in-context learning: the model adjusts its behaviour based on patterns demonstrated within the prompt itself, with no change to its weights. Show it three examples of a task and it continues the pattern. This is why few-shot prompting works, and why the format, tone, and content of your examples matter so much. The distinction matters because it changes how you diagnose failures. If a model ignores an instruction, you have an instruction-following problem: rephrase, reposition, or strengthen the directive. If outputs are stylistically or structurally wrong despite following instructions, you likely need better in-context examples. A common mistake is to read model outputs as evidence of comprehension. The model does not comprehend your prompt the way a human colleague would; it produces a statistically appropriate continuation. This is why precision matters. 'Write a summary' invites a range of lengths, styles, and levels of detail. 'Write a two-sentence executive summary of the key risk in this document, in plain language, for a non-specialist audience' leaves far less to chance.
Work through every section at your own pace, from start to finish.
A short set of questions on what you have just covered.
Every completion has a certificate that you can share publicly for anyone to verify.
Pass the quiz and the Institute of AI issues you a record of completion with your score. Every completion has its own public verification page, so the link you put on your CV or LinkedIn profile can be checked by anyone, at any time.
Free lessons, a quiz to test what you have learned, and a completion you can verify publicly. All from the UK's professional body for artificial intelligence.
Every AI lesson is free to start, free to finish, and ends in a completion you can verify publicly.