Prompt engineering

Definition

Prompt engineering is the practice of writing and testing the instructions you give an AI model so it produces reliable, useful output. For everyday users it means writing clear briefs; for teams running AI in production it means treating prompts like versioned, tested code.

By Ronan Liedmeier, fractional head of growth and course author · Published 17 October 2026 · Last updated 17 October 2026

Also called: prompt design

A good one-off prompt helps once. A prompt that a workflow runs a thousand times a week has to hold up every time.

How it works

For everyday use the craft is clear structure. Separate the background, the task, the constraints and the output format, for example with labeled sections or XML-style tags, so the model can tell where one instruction ends. Two or three examples of good output, plus one bad example with a line on why it fails, beat paragraphs of description. A common shortcut is to describe the task to the model, let it draft the prompt, and then edit that draft.

In production, each prompt gets a version number and a set of test cases. A change goes live only after an eval shows it didn't break cases that worked before, and the model's output is checked against a fixed format before it reaches any other system.

Example

An online retailer's product-tagging prompt assigns categories to new items. When a supplier starts sending descriptions in German, the tags go wrong. The operator adds one instruction and two German examples, saves it as a new version with a note on why, and reruns her 50 saved test products to confirm German items now tag correctly and English ones still do.

Common mistake

Editing a live prompt in place with no record. When quality drops a month later, nobody can say which change caused it. Before you change a live prompt, copy the current text into the changelog so you can roll back in one step.

Learn it in AI Academy

Related terms

Prompt
A prompt is the instruction or question you give an AI model to tell it what you want. It can be one line or a full brief with background, examples and the format you need back, and the answer is shaped by everything in it.
AI eval (evaluation)
An AI eval (evaluation) is a repeatable test that checks whether an AI prompt or workflow gives good answers, by running it on a fixed set of inputs and scoring the outputs against agreed criteria. It turns "seems fine" into a score you can compare.
Context engineering
Context engineering is the practice of deciding what information an AI model sees each time it works: the instructions, documents, tool descriptions, memory and conversation history. It extends prompt engineering from the wording of one request to everything loaded around it.
Structured output (JSON mode)
Structured output is a way of getting an AI model to return its answer in a fixed, machine-readable format, usually JSON with named fields, instead of free text. It lets another program read the answer reliably, for example to fill a spreadsheet row or pick the next step in a workflow.

Browse all terms

Find your next step with AI