What is a prompt in AI? How to write prompts that work

A prompt is whatever you give an AI to work with. Small changes to it can turn a vague answer into a great one. Here is what a prompt is, what a good one contains, simple techniques that work, and the mistakes to avoid.

Two prompt cards side by side. The vague one says: explain AI. It leads to a long, generic answer. The clear one says: explain AI to a 10-year-old in 3 short sentences, using a cooking example. It leads to a short, friendly answer comparing AI to a cook who has read thousands of recipes. Labels: vague prompt, vague answer; clear prompt, useful answer.
Fig. 1 — The same model, two prompts. Clear instructions about audience, length and style get a far more useful answer.

Ask a new colleague to “write something about our product” and you’ll get something. Ask them to “write a 100-word welcome email for new customers, friendly tone, mention the free trial and end with a link to the setup guide” and you’ll get what you actually wanted.

AI models work the same way. What you give them to work with is called a prompt, and the quality of the prompt has a big effect on the quality of the answer. This guide explains what a prompt is, what a good one contains, a handful of simple techniques that work, and the common mistakes to avoid.

What is a prompt?

A prompt is the input you give an AI model to tell it what to do: your question, instruction, examples, and any text or files you want it to work with.

For a chatbot, the prompt is usually what you type. For an image generator, it’s the description of the picture you want. Behind the scenes, apps often add their own hidden instructions too.

The parts of a prompt you don’t see

When you chat with an AI app, the model actually receives more than your message:

  • A system prompt: hidden instructions from the app, such as “You are a helpful assistant. Answer in clear, simple English.”
  • The conversation so far: your earlier messages and its earlier replies.
  • Your new message, often called the user prompt.

Our guide to system, user and assistant roles shows exactly what this looks like. The model reads all of it together and writes a reply, one token at a time (see what a large language model is).

Why prompts matter so much

A language model predicts a likely continuation of the text it’s given. A vague prompt leaves it lots of room, so it gives a generic, middle-of-the-road answer. A clear, specific prompt narrows the possibilities towards what you need.

The model can’t read your mind. It doesn’t know your audience, your purpose or what you already know, unless you tell it.

What makes a good prompt?

Most good prompts include some of these ingredients:

A prompt card broken into labelled parts. Role: you are a friendly science teacher. Task: explain how rainbows form. Context: for a class of 10-year-olds who know what sunlight is. Format: 3 short sentences, then one fun fact. Constraint: avoid words like refraction, or explain them simply. Each part is labelled with a coloured tab.
The building blocks of a clear prompt. You rarely need all of them; pick the ones that matter for the task.
  • The task: what you want done. Start with a clear verb: explain, summarise, draft, compare, list, fix.
  • Context: background the model needs. Who is it for? Why? What do they already know?
  • The material: paste in the document, data or email you want it to work on.
  • Format: how the answer should look: length, bullet points, a table, a subject line, a tone.
  • Examples: show one or two samples of what “good” looks like.
  • Constraints: what to avoid, such as jargon, a word limit, or topics to leave out.
  • A role (optional): “Act as a patient maths tutor” can set the tone and level.

Before and after

Vague prompt Clearer prompt
Explain AI. Explain AI to a 10-year-old in 3 short sentences, using a cooking example.
Write an email to my manager. Write a short, polite email to my manager asking to move Friday’s 3 pm review to Monday. Mention the client deadline as the reason.
Summarise this. Summarise this report in 5 bullet points for a busy CEO. Put the biggest risk first.
Fix my code. This Python function should return the total of a list but returns 0. Explain the bug, then show the corrected code.

Simple techniques that work

Be specific

Say who it’s for, how long it should be, and what it should include or avoid. Specific beats clever.

Give examples (few-shot prompting)

Showing the model a few examples of the input and output you want is called few-shot prompting. Asking without examples is zero-shot (that gets its own letter, Z).

“Turn these into friendly product names. Example: ‘stainless steel water bottle, 1 litre’ → ‘HydroSteel 1L’. Now do: ‘bamboo phone stand’.”

Ask it to work step by step

For maths, logic or multi-step problems, asking the model to show its working often improves the answer. This is known as chain-of-thought prompting. Researchers at Google described it in a 2022 paper, showing that including step-by-step examples in the prompt helped large models solve problems like maths word questions. Many newer “reasoning” models now do this kind of step-by-step thinking on their own.

Give it the source

If the answer must be accurate, paste in the relevant document and say “Answer only from the text above. If it isn’t there, say so.” This reduces made-up answers (hallucinations).

Break big tasks into steps

Instead of “write my business plan”, ask for an outline first, then each section. You get more control and better results.

Iterate

Treat the first answer as a draft. Follow up: “Shorter.” “More formal.” “Add an example.” “What did you assume?” The conversation itself is part of the prompt.

Common mistakes

  • Too vague: “Make it better.” Better how? Shorter, clearer, more persuasive?
  • Missing context: the model doesn’t know your company, audience or goal unless you say.
  • Asking for facts without sources: it may produce plausible but wrong details. Verify, or give it the source.
  • Cramming everything into one huge request: split complex jobs into steps.
  • Pasting private information carelessly: check your organisation’s rules before sharing confidential data with an AI tool.

What is prompt engineering?

Prompt engineering is the practice of designing and testing prompts to get reliable, high-quality results, especially for apps that send the same kind of prompt thousands of times. It includes writing system prompts, choosing examples, specifying output formats like JSON, and testing prompts against many inputs.

For everyday use, you don’t need special tricks. Clear writing is most of it: the same things that help a human colleague understand your request help an AI model too.

Common misconceptions

“There are magic words that unlock better answers.” Clarity, context and examples matter far more than secret phrases.

“A longer prompt is always better.” Relevant detail helps; padding and contradictions don’t.

“If the answer is wrong, the AI is bad.” Sometimes, but often a clearer prompt or the right source text fixes it.

“A good prompt guarantees a correct answer.” It improves the odds. Important facts still need checking.

Key takeaways

  • A prompt is everything you give an AI model: instructions, questions, examples and material.
  • Apps add hidden system prompts and the conversation history to your message.
  • Good prompts include a clear task, context, the material, the desired format, and sometimes examples or a role.
  • Useful techniques: be specific, give examples (few-shot), ask for step-by-step working, provide sources, split big tasks, and iterate.
  • Prompt engineering is designing and testing prompts for reliable results.

Frequently asked questions

What is a prompt in simple words?

A prompt is what you type or give to an AI to tell it what you want: a question, an instruction, or some text for it to work on.

What makes a good AI prompt?

A clear task, the right context, any material it needs, and a description of the format you want. Adding an example of a good answer often helps a lot.

What is the difference between a system prompt and a user prompt?

A system prompt is a hidden instruction set by the app or developer that shapes how the model behaves. The user prompt is what you type.

What is few-shot prompting?

It means including a few examples of the input and output you want in your prompt, so the model can follow the pattern.

Is prompt engineering a real skill?

Yes, especially for building AI apps, where prompts must work reliably across many inputs. For everyday use, it mostly comes down to writing clear, specific requests.

Comments

LEAVE A COMMENT
No sign-up. Comments appear after a quick review.