Skip to content
AI Playbooks · 6 min read

Prompt Engineering for Beginners: The Playbook for Writing Prompts That Work

Prompt engineering for beginners, told as a simple story. Learn five plays to write clear prompts and a reusable template that gives better AI answers.

Meera is a developer in Pune. Her support team gets about two hundred customer emails a day, and her manager asks her to “use AI to summarise them.” She types one line into a chatbot: “Summarise this email.” The answer is long, vague and different every time.

Meera thinks the AI is not good enough. But the AI is fine. The problem is the request. Learning prompt engineering for beginners simply means learning to ask clearly, the way you would brief a new colleague on their first day.

This playbook follows Meera as she fixes her prompt in five small plays. (Meera and her numbers are made up to teach the idea.)

Last verified: 7 November 2026. AI tools change fast; check the linked sources for anything newer.

Who this is for: anyone who uses a chatbot or plans to call an AI model from code, with no experience needed. Time needed: about 30 to 40 minutes, with any chatbot open to try the examples.

What is prompt engineering, in simple words

A prompt is the text you send to an AI model. Prompt engineering is the habit of writing that text so the answer is useful the first time.

Think of a new colleague who is very fast and very willing, but knows nothing about your job. If you say “handle this,” they guess. If you say who the reader is, what you need and what the result should look like, they deliver.

The precise version: a model predicts the next words from the words you gave it, so clearer input narrows the possible answers. If you want to see why, read our How LLMs Work playbook on tokens and the context window.

The playbook at a glance

  1. Say who the AI is and what the task is.
  2. Give the context the AI cannot guess.
  3. Describe the shape of the answer.
  4. Show one or two examples.
  5. Turn the winner into a template and keep improving it.

Play 1: Say who the AI is and what the task is

Goal: replace “do something with this” with one clear job.

  1. Start with a role: “You are a support team lead.”
  2. Add one action verb: summarise, classify, rewrite, extract.
  3. Keep it to one task per prompt.

Meera changes “Summarise this email” to “You are a support team lead. Summarise this customer email for a busy agent.” The answers already get shorter and more focused.

You are done when: your prompt names a role and exactly one task.

Play 2: Give the context the AI cannot guess

Goal: hand over the facts a stranger would need.

  1. Say who will read the answer.
  2. Say why it is needed.
  3. Add limits: length, tone, what to avoid.

Meera adds: “Agents read these between calls, so keep it under 40 words. Do not guess a refund amount if the email does not state one.”

You are done when: a stranger could do the task from your prompt alone.

Play 3: Describe the shape of the answer

Goal: get answers that look the same every time.

  1. Name the format: bullets, a table, or labelled lines.
  2. Name the fields, such as “Problem”, “Mood”, “Next step”.
  3. If code will read the answer, ask for JSON. Our structured outputs guide shows how.

Meera asks for three labelled lines. Now her team can scan each summary in two seconds.

You are done when: five different runs give five answers with the same layout.

Play 4: Show one or two examples

Goal: let the AI copy a pattern instead of guessing your taste.

An example works like showing a new colleague a finished report. Giving examples is often called “few-shot prompting”. “Few” just means one to three.

  1. Pick a real input and write the perfect answer by hand.
  2. Paste it under the label “Example”.
  3. Add a second example that is different, such as an angry email.

Meera pastes one calm email and one angry email, each with her ideal summary. The AI now matches her tone.

You are done when: the output looks like your examples, not like a generic essay.

Play 5: Turn the winner into a template and keep improving it

Goal: reuse a good prompt without retyping it.

A prompt template is a prompt with a blank to fill in. The plain steps: keep the fixed instructions, mark the changing part with a name in curly braces, and paste the email into that blank each time. This is an illustration; tools use slightly different blank markers.

You are a support team lead.
Summarise the customer email for a busy agent.
Keep it under 40 words. Do not guess amounts.

Answer as three lines:
Problem: ...
Mood: ...
Next step: ...

Email:
{email_text}
  1. Save the template in a file or notes app with a version number.
  2. Change one thing at a time, then re-run the same ten emails.
  3. Keep the change only if the answers got better.

Meera saves “summary v1”, then tries “v2” with a shorter limit and keeps whichever reads better. In a Java app, the same idea appears in Spring AI prompt templates.

You are done when: anyone on the team can reuse the prompt by filling one blank.

Which technique to use when

TechniqueUse it whenTrade-off
Role and taskAlways, as a startCheap, small gains alone
Context and limitsAnswers are vague or too longLonger prompt
Output formatCode or people read the resultNeeds a check that the format held
ExamplesTone or style keeps missingUses more tokens each call

Mistakes to avoid

  • Asking for many tasks at once. Split it into one prompt per job.
  • Vague words like “good” or “short”. Say “under 40 words” instead.
  • Changing five things between tests. Change one, so you know what helped.
  • Trusting one lucky answer. Test on ten inputs. Our AI evals playbook shows how.
  • Pasting untrusted text with no care. Text inside an email can try to give orders. See the prompt injection playbook.

How to know it is working

  • Ten test inputs give answers in the same layout.
  • You rarely have to ask a follow-up to fix the answer.
  • A teammate gets similar results with your template.

Your checklist

  • ☐ My prompt names a role and one task.
  • ☐ It says who reads the answer and any limits.
  • ☐ It describes the answer format.
  • ☐ It has one or two examples.
  • ☐ It is saved as a versioned template and tested on ten inputs.

Frequently asked questions

Is prompt engineering a real skill?

Yes, but it is mostly clear writing plus testing. You do not need a special degree or secret phrases.

Do I always need to give the AI a role?

No. A role helps set tone and focus, but a clear task and context matter more. Test with and without it.

How long should a prompt be?

As long as it needs to be and no longer. Remove any line that does not change the answer.

Can the AI ask me questions first?

Yes. Ending with “Ask me any questions you need before you answer” is a popular tip in beginner guides, and it helps when you are unsure what context to add.

Meera’s next morning

The next day Meera runs her template on a batch of emails. The summaries are short, labelled and calm in tone. Her manager asks how she did it, and she shares the saved template file.

Your next action: take one task you do with AI this week and rewrite the prompt using the five plays. Then read the How LLMs Work playbook to see why clear input matters.

Sources: OpenAI Academy: Prompting and common beginner guides such as BuildAIQ. Most guides are blogs, so treat the five-part structure as a convention, not a standard.

Leave a Reply

Your email address will not be published. Required fields are marked *

Newsletter

Get the next guide before anyone else.

One email a week with new playbooks and tutorials. No spam, unsubscribe anytime.