◈ TUTORIAL · PROMPTING ◈ · 8 MIN

How to write effective prompts

The same model gives wildly different results depending on how you ask. Prompting is the highest-leverage AI skill for non-coders, and it is learnable in an afternoon.

This hands-on tutorial takes one prompt from first draft to saved template. A good AI prompt states the role, the context, the specific task, and the format you want, then adds an example if you have one. For the full method, with before and after examples and agent prompting, see our guide to how to prompt; for the vocabulary, start with what a prompt is.

A prompt is just the instruction you give an AI, but the gap between a lazy prompt and a well-built one is enormous. Same model, same task, completely different output. That gap is the skill.

This tutorial gives you a repeatable structure and the handful of techniques that matter most. Learn these and you will get more out of any model you use.

What is the anatomy of a strong prompt?

Weak prompts are one vague line. Strong prompts have parts. You do not need all of them every time, but knowing them lets you add what a task needs.

  • Role: who the AI should act as ("You are an experienced copy editor").
  • Context: the background it needs to do the job well.
  • Task: the specific thing you want, stated plainly.
  • Format: how you want the answer shaped (length, structure, style).
  • Examples: a sample or two of what good looks like.

How specific should a prompt be?

Specificity is the single biggest lever. "Write about our product" gets you filler. "Write a 120-word product blurb for busy small-business owners, warm but not salesy, ending with one clear next step" gets you something usable.

Tell the model the audience, the length, the tone, and the goal. Every constraint you add narrows the output toward what you actually want.

What is few-shot prompting?

Giving the model a couple of worked examples inside your prompt is called few-shot prompting, and it is often the fastest way to lock in a format or style. The model copies the pattern you show it.

If you keep getting the wrong shape of answer, stop explaining and start showing. One good example beats a paragraph of instructions.

What is chain-of-thought prompting?

For math, logic, or multi-step problems, asking the model to reason step by step before answering measurably improves accuracy. This is called chain-of-thought prompting.

TRY THIS

On a hard question, add "Work through this step by step before giving your final answer." You will often catch and prevent sloppy reasoning.

How do you iterate on a prompt?

Your first prompt is a draft. The real skill is refining: "shorter," "more formal," "cut the intro," "keep only the second option." Treat it as a back-and-forth, not a one-shot command.

  1. Write a specific first prompt with role, task, and format.
  2. Read the output and name exactly what is wrong.
  3. Give one focused correction and regenerate.
  4. Repeat until it is right, then save the prompt as a template.

What does a reusable prompt template look like?

Once a prompt works, save it as a template with blanks for the parts that change. Here is one general-purpose template you can copy and adapt for almost any writing or drafting task.

  • Role: You are a [specific role] with expertise in [domain].
  • Context: [the background information the model needs to know].
  • Task: [the exact thing you want done, stated plainly].
  • Format: [length, structure, and tone of the answer].
  • Example (optional): [one sample of what a good answer looks like].
HOW TO USE IT

Fill in each bracket, drop any line you do not need, and keep the result in a template library so the next person on your team gets the same good result on the first try.

Frequently asked

Why does the AI give me generic answers?

Almost always because the prompt is too vague. Add the audience, the length, the tone, and the goal, and give an example of what good looks like. Specific prompts produce specific answers.

What is few-shot prompting?

Few-shot prompting means including a handful of worked examples in your prompt so the model copies the pattern. It is often faster than describing the format in words.

Should I save my prompts?

Yes. A prompt that works becomes a reusable template with fill-in-the-blank slots, turning a good one-off into a repeatable tool for you or your team.

What is chain-of-thought prompting?

Chain-of-thought prompting means asking the model to reason step by step before giving its final answer. It measurably improves accuracy on math, logic, and other multi-step problems.

What should a reusable prompt template include?

A role, the context the model needs, the specific task, and the format you want the answer in, each left as a blank you fill in. An optional example slot helps lock in format or tone fast.

How do I prompt an AI agent instead of a chatbot?

The same structure applies, role, context, task, and format, but an agent prompt should also state the tools it can use and any limits on what it is allowed to do on its own.