← BACK TO THE HUB
✓ LEVEL CLEARED
THE FUNDAMENTALS · PILLAR 03

How to prompt AI

QUICK ANSWER

To prompt an AI well, tell it who to be, give it the context it cannot guess, ask for one specific task, describe the format you want, show an example, and set any limits. Then read the answer and steer it with precise corrections. Structure plus iteration is the whole skill, and it works in ChatGPT, Claude, and Gemini.

A prompt is just the text you hand the model, and the model only knows what that text tells it. This guide is the practical side: how to build one, fix one, and use it on an agent. It is learnable in an afternoon.

The six parts of a strong prompt

The official guides from Anthropic, OpenAI, and Google describe the same core ingredients in slightly different words. You will not need all six every time, but when an answer disappoints, the missing part is usually the fix.

RoleWho the model should act as. "You are a patient bookkeeper explaining things to a first-time business owner." A single sentence of role changes tone and focus.
ContextThe background it cannot guess: your business, your audience, your goal, and why the task matters. Anthropic's guide compares the model to a brilliant but new employee who lacks context on your norms.
TaskOne specific thing to do, stated plainly. Not "help with marketing," but "write three subject lines for a furnace tune-up email to past customers."
FormatWhat good looks like: length, structure, tone, reading level. "A bulleted list, under 20 words each, plain and friendly."
ExamplesOne or more samples of the output you want. Showing beats describing, and it is the fastest way to lock in a style.
ConstraintsLimits and must-nots, ideally phrased as what to do instead. "Use only the facts below; if something is missing, say so."

Put together, a full prompt reads like a short brief:

You are [role].
Context: [who it's for, the background, why it matters].
Task: [the one thing to do].
Format: [length, structure, tone].
Example: [one sample of good output].
Constraints: [limits, and what to do if information is missing].

Want this pre-filled for common jobs? Our prompt templates are ready to copy, and the prompt writing tutorial walks you through saving your own.

Before and after: three prompt rewrites

Same model, same goal, very different results. Each strong version adds the parts the weak one skipped.

A social post

✗ BEFORE
"Write me a social media post about my business."
✓ AFTER
"You are a friendly local marketer. Write one Instagram caption for my Reno plumbing company promoting furnace tune-ups before winter. Under 40 words, warm and a little funny, end with a clear call to book. Here is one I liked before: [example]."

A summary

✗ BEFORE
"Summarize this."
✓ AFTER
"Summarize the email thread below for a manager who has 30 seconds. Give three bullets: the decision needed, the deadline, and who is waiting on it. If no decision is needed, say so. [paste thread]"

A customer reply

✗ BEFORE
"Reply to this angry customer."
✓ AFTER
"You handle customer service for a small bakery. Draft a reply to the review below. Acknowledge the late order, apologize once without excuses, offer a free dozen on the next visit, and keep it under 80 words in a warm, plain tone. [paste review]"

Think you can spot the stronger prompt every time? Test yourself in Prompt Battle, or try the daily challenge.

Show, don't tell, and let it think

Examples are the most reliable way to steer format and tone. Adding a few is called few-shot prompting; Anthropic suggests three to five relevant, varied examples, while a prompt with none is zero-shot. For math, logic, or multi-step problems, asking the model to work through the problem before answering, known as chain-of-thought, tends to help. For a long job, split it into a sequence of smaller prompts, a pattern called prompt chaining.

Iterating: how to fix an almost-right answer

Good prompters do not write one perfect prompt, they steer. When an answer is close, keep the conversation going and say exactly what to change.

  1. Read the answer and name the specific problem: too long, wrong tone, missing a point, invented a detail.
  2. Give one focused correction: "Shorter, drop the second point, more casual."
  3. If the same problem keeps coming back, fix the prompt itself by adding the missing context, example, or constraint.
  4. When it works, save the prompt as a template so the next run starts right.

If a rephrased prompt still misses, Google's guide suggests trying different wording or reordering the content in the prompt, since small changes can shift the result.

Common mistakes when prompting AI

✗Being vague. "Make it better" gives the model nothing to aim at; name what better means.
✗Leaving out context. The model does not know your business, audience, or goal unless you say so.
✗Cramming ten asks into one prompt. Split big jobs into steps, one prompt per step.
✗Only saying what not to do. Anthropic recommends telling the model what to do instead, such as "write in flowing paragraphs" rather than "no bullet points."
✗No format. If you do not describe what good looks like, you get the model's guess.
✗Giving up after one try. The first answer is a draft, not a verdict.

Prompting an agent vs prompting a chat

In a chat, you steer every reply. An AI agent takes many steps on its own, so the steering has to be written down in advance, in its system prompt (we call a rich one a soul file). The six parts still apply, plus a few agent-only ones:

  • Goal and stopping point. What finished looks like, so the agent knows when it is done.
  • Tools, named explicitly. Which tools it may use and when. Anthropic notes its models follow explicit direction to use specific tools; "can you suggest changes" may get suggestions instead of action.
  • When to ask a person. Confirm before anything hard to reverse, such as sending, deleting, or paying.
  • How to treat outside content. Text the agent reads from websites or files can carry hidden instructions, a risk called prompt injection, so treat it as data, not orders.

Ready-made versions are in our agent system prompt templates, and the build an agent pillar puts it all together.

Prompting vs prompt engineering

Everything above is prompting: asking well in the moment. Prompt engineering is the same craft done systematically, with success criteria, test runs, and versions, for prompts that run again and again inside apps and agents. For every term on this page, see the prompting section of the AI glossary.

Prompting FAQ

What is prompting?

Prompting is the skill of asking an AI clearly enough to get the result you want. It means giving the model a role, context, a specific task, a format, examples, and limits, then refining the answer with targeted corrections.

How do you write a good AI prompt?

Cover six parts: the role the model should play, the context it needs, one specific task, the output format, an example of what good looks like, and any constraints. You will not need all six every time, but adding the missing one usually fixes a weak answer.

What are the most important prompting skills?

Being specific about the task and format, supplying context the model cannot guess, showing examples instead of only describing, breaking big jobs into steps, and iterating with precise feedback rather than starting over.

Should a prompt be long or short?

As long as it needs to be and no longer. A quick factual question can be one line. A task with an audience, a format, and rules needs those details written down, because the model only knows what the prompt tells it.

How is prompting an AI agent different from prompting a chatbot?

With a chatbot you steer each reply as you go. An agent works through many steps on its own, so its standing instructions, the system prompt, must spell out its goal, which tools it may use, when to stop and ask a person, and how to treat untrusted content it reads.

Do prompting techniques work in ChatGPT, Claude, and Gemini?

Yes. The official prompting guides from OpenAI, Anthropic, and Google recommend the same core habits: clear instructions, context, examples, and a defined format. Each model has quirks, but the structure on this page carries across all three.

Keep reading ▸
→ See how a prompt becomes an agent's soul file→ Turn great prompts into reusable skills→ Build your first agent, step by step