Skip to content
AI Skills Central

Type to search Agent Skills, workflows, tutorials, tools and the glossary.

Foundations

Prompt engineering

Writing clear, testable instructions for models and checking them on real inputs.

Beginner
Bookmark

Bookmarks are kept in your free account, so you can find this page again on any device.

Sign in to bookmark
On this page

Overview

Prompt engineering is the practice of writing instructions that get a model to do a specific job reliably. Good prompts state the task, the audience, the constraints and the output format, and give an example when the format matters. The skill is less about magic phrases and more about being explicit: the model only knows what you tell it.

The second half of the skill is testing. A prompt that works once may fail on the next input, so practitioners keep a handful of representative inputs, run the prompt against all of them after each change, and compare the results side by side before deciding a change is an improvement.

What you will practise

  • State task, audience, constraints and output format in one clear prompt
  • Use a few varied examples when the format is hard to describe
  • Tell the model what to do when information is missing
  • Compare prompt versions on the same set of test inputs

Learning paths

  • AI for test engineers

    An AI course for testers: apply generative AI to everyday test automation, from AI-assisted test design to generating, healing and reviewing Playwright tests.

    Beginner9 h10 steps

  • AI foundations

    A free AI foundations course: the working vocabulary of modern AI, from prompting and structured output to retrieval, MCP, Agent Skills and prompt injection.

    Beginner3 h9 steps

  • AI for data analysts

    An AI course for data analysts: clean spreadsheets, profile data with skills, go from SQL to a dashboard, extract PDF tables and catch invented numbers.

    Beginner9 h10 steps

  • AI for marketers

    An AI course for marketers: prompts you can reuse, research and competitor briefs with sources, brand-voice drafts, slides, A/B test reading and AI search.

    Beginner9 h11 steps

  • AI for non-developers

    An AI course for non-developers: use AI assistants for real work without code, from clear requests and checkable research to meeting notes and spreadsheets.

    Beginner1 day12 steps

  • AI for product managers

    An AI course for product managers: prompt for usable drafts, research with sources, write a PRD from evidence, prototype with app builders and read evals.

    Beginner1 day11 steps

  • Building with the Claude API

    Learn to build with the Claude API from your own code: the Messages API, tool use, structured output and prompt caching, then evaluate and trace what you built.

    Intermediate5 h9 steps

  • Prompt and context engineering

    A prompt and context engineering course: go from single prompts to deciding what a model sees at each step, from instructions and examples to files and tools.

    Intermediate3 h8 steps

Tutorials

Workflow recipes

Articles

  • Why AI hallucinates, and how to reduce it

    AI hallucinations are fluent answers that are false. Why language models produce them, which ones you can prevent, and a checklist for work you depend on.

    Explainer

  • Prompt patterns cheat sheet

    Copyable prompt patterns for Claude, ChatGPT and Gemini: briefing, examples, output formats, long documents, checking the work and avoiding made-up answers.

    Cheat sheet

  • What is context engineering?

    Context engineering is deciding what a model sees at each step. Why the term replaced prompt engineering for people building agents, and what the work involves.

    Explainer

Tools for this skill

  • ChatGPT

    OpenAI's assistant with files, web search, agents and custom GPTs.

    AssistantsFreemiumOpenAI

  • Claude

    Anthropic's assistant with projects, files, skills and connectors.

    AssistantsFreemiumAnthropic

  • DSPy

    Write LLM programs as declarative modules and let optimisers tune the prompts.

    Agent frameworks and SDKsOpen source

  • Gemini

    Google's assistant, integrated with Gmail, Docs, Drive and other Workspace apps.

    AssistantsFreemiumGoogle

  • LLM

    CLI and Python library for prompting many models.

    Models and local inferenceOpen sourceSimon Willison

  • Outlines

    Python library for structured LLM outputs via constrained decoding.

    Models and local inferenceOpen source.txt

Key terms

Words you will meet while learning this, defined in the glossary.

Full glossary
  • Chain-of-thought

    Having a model work through intermediate reasoning steps before it gives a final answer, either by prompting or by training.

  • Extended thinking

    A model setting that gives it a budget of reasoning tokens to use before writing its final answer, trading time and cost for accuracy.

  • Few-shot prompting

    Including a few input and output examples in the prompt so the model can copy their pattern, format and level of detail.

  • Prompt

    The input given to a model: instructions, context, examples and the question or task itself, sent as one or more messages in a request.

  • Prompt chaining

    Splitting a task into a fixed sequence of model calls where each call works on the output of the previous one, with checks in between.

  • Prompt engineering

    Designing, testing and refining prompts so a model produces the output you need reliably, across many inputs and not just one.

  • Prompt template

    A prompt with placeholders, such as {question} or {context}, that code fills in at run time so the instructions are reused.

  • Reasoning model

    A model trained to spend extra tokens thinking through a problem before it answers, trading speed and cost for accuracy on hard tasks.

  • Role prompting

    Telling a model to take on a role, such as a security reviewer or a patient tutor, to shape its focus, tone and level of detail.

  • Self-consistency

    Sampling several reasoning paths for the same question and taking the most common final answer, instead of trusting a single response.

  • Stop sequence

    A string sent with a request that makes the model stop generating as soon as it produces that text.

  • System prompt

    Instructions set by the application developer that frame every conversation, such as the assistant's role, rules and output format.

  • Temperature

    A sampling setting that controls randomness: lower values favour the most likely tokens, higher values spread probability more evenly.

  • Top-p

    A sampling setting that restricts the model to the smallest set of likely tokens whose probabilities add up to p, then samples from that set.

  • Zero-shot prompting

    Asking a model to perform a task from instructions alone, without giving it any worked examples of the inputs and outputs.