Prompt engineering (prompt design). What it means.

Prompt engineering is the practice of writing and refining the instructions given to an AI model so that it produces accurate, useful output in the form you need.

By Brady Heinrich · Updated

Definition

Prompt engineering is the practice of writing and refining the instructions given to an AI model so that it produces accurate, useful output in the form you need.

What is prompt engineering?

Prompt engineering is the craft of telling a language model what you want clearly enough that it does it well and does it the same way each time. A prompt is everything the model is given: the instruction, background, examples, documents and the format expected back.

How do you write a good prompt?

Write it as you would brief a capable new colleague who knows nothing about your company.

  1. State the task and the goal. Say what you want and what it is for.
  2. Give the context. Audience, product, constraints, what has been tried.
  3. Show examples. Two or three samples of good output teach more than a paragraph of description.
  4. Specify the format. Length, structure, tone, and what to leave out.
  5. Supply the facts. Paste the source material. Do not rely on the model's memory for specifics.
  6. Say what to do when unsure. For instance, to answer "not stated in the source" instead of guessing.
  7. Test and revise. Run it on varied inputs, read the failures and change one thing at a time.

Prompt engineering examples

Weak promptStronger prompt
"Write a cold email.""Write a cold email of under 90 words to a head of finance at a 50-person SaaS company that has just raised a Series A. We sell spend management software. Mention the funding round once, name one specific problem, and end with a question. Plain tone, no exclamation marks. Here are two emails that worked: ..."
"Summarise this call.""Summarise this sales call transcript in five bullets: the buyer's problem, current tool, objections raised, next step agreed and anything we promised to send. Quote the buyer's words for the problem. If a point was not discussed, write 'not discussed'."

Common prompting techniques

  • Zero-shot: an instruction with no examples.
  • Few-shot: an instruction with a handful of examples to copy.
  • Step-by-step reasoning: asking the model to work through the problem before answering.
  • Role and audience: saying who the output is for and from whose viewpoint.
  • System prompt: standing instructions that apply to every message in a product.
  • Chaining: splitting a job into several prompts, each feeding the next.

Prompt engineering vs context engineering

Prompt engineering focuses on the wording of the instruction. Context engineering is the wider job of deciding what information reaches the model at all: which documents are retrieved, what the tools return, what is remembered from earlier. As models have become better at following plain instructions, more of the gain comes from giving them the right material.

An example

A marketer asks a model to "write product descriptions" and gets generic copy. She rewrites the prompt with the audience, a 60-word limit, three banned phrases, the product's fact sheet and two descriptions she likes. The output now matches the house style, and the same prompt works for the next 200 products.

The common mistake

Hunting for magic phrases instead of giving context. No wording trick makes up for a prompt that leaves out who the output is for, what facts to use and what good looks like. Most bad output is a briefing problem.

How people search for prompt engineering

  • prompt engineering18,100 a month
  • what is prompt engineering2,900 a month
  • prompt engineering examples210 a month

US monthly searches, Google Ads keyword data.

Related terms

Go deeper

Building something ambitious? Let's talk.

We reply within one business day.