The Oxford AI School

Home/AI Learning Hub/How To Prompt AI/How to Write Prompts for AI

How to Write Prompts for AI - The Five Rivets Method

The complete beginner-to-confident guide to writing prompts for AI. One method, a worked example built up in front of you, and a dictionary for the jargon.

By Harry LangPublished 17 October 20267 minute read

The Prompt-o-Graph Typewriter Dear AI,The Prompt-o-Graph TypewriterFig. 7
In this article
  1. What is a prompt, and how does AI read it?
  2. How do I write a good prompt? The Five Rivets
  3. What does a prompt look like as I build it?
  4. How do I fix a prompt that is not working?
  5. What do prompt words like context window and few-shot mean?
  6. Which prompt style suits which job?
  7. What habits keep prompts safe and honest?
  8. Writing AI prompts: questions people ask

The short answer

To write a good AI prompt, cover five things: the role the AI should take, the exact ask, the context it needs, the format you want back, and the checks it must apply. If you only have thirty seconds, give context and format. Then reply with short corrections instead of starting again.

There is a word for people who are good at writing prompts. It is "clear". That is all. Nobody is born with it, and nobody needs a qualification. You need a repeatable shape, a few examples and the willingness to say what you meant.

This is the full guide: how AI reads a prompt, a five-part method I call the Five Rivets, a worked example built up in front of you, a plain-English dictionary and a short loop for improving anything that is not working. It is the hub for our prompting series, so you will find links to the specialist pages as we go.

What is a prompt, and how does AI read it?

A prompt is the text you give an AI model so it can respond. The model does not look anything up or understand you the way a colleague would. It predicts the most likely useful continuation of everything it has been given, so the more precise and relevant your text, the better the prediction.

Three consequences follow, and they explain most of what goes wrong:

How do I write a good prompt? The Five Rivets

Think of a prompt as a plate held together by five rivets. Miss one and it still holds, but it rattles. Role, Ask, Context, Format, Checks.

The Five Rivets
RivetQuestion it answersWeakStrong
RoleWho is the AI being?(nothing)You are a UK employment-law adviser for small firms
AskWhat exactly should it do?Help with a policyDraft a one-page remote working policy
ContextWhat does it need to know?(nothing)12 staff, hybrid, two roles must be on site. Our current rule is in the text below
FormatWhat shape should it take?(nothing)Headings, plain English, under 400 words
ChecksWhat must it avoid or flag?(nothing)Do not state legal rules as certain. Flag anything to confirm with a solicitor
The Five Rivets in one prompt
ROLE: You are an HR adviser who works with UK businesses of fewer than 50 staff.

ASK: Draft a one-page remote working policy.

CONTEXT: We have 12 staff. Hybrid is the norm, but our two receptionists must be on site every day. Our current informal rule is below.
[paste current rule]

FORMAT: Short headings, plain English, under 400 words, written for staff rather than lawyers.

CHECKS: Do not state legal requirements as certain. Put [CONFIRM] next to anything I should check with a solicitor. If something I have not told you matters, ask before you write.

Tip: the labels are for you. The AI is happy with plain paragraphs. Labels just make it easy to see which rivet is missing.

If you only have thirty seconds, use two rivets: Context and Format. They cover most of the gap between a poor answer and a good one.

What does a prompt look like as I build it?

Here is the same request improved four times. Notice that the final prompt is not clever. It is just complete.

Version 1
Write a LinkedIn post about our training.
Version 2 :- add role and ask
You are a B2B copywriter. Write a LinkedIn post announcing our one-day AI training for accountancy firms.
Version 3 :- add context and format
You are a B2B copywriter. Write a LinkedIn post announcing our one-day AI training for accountancy firms. Audience: partners at firms of 5 to 20 staff who are curious but cautious. It runs on [date] in [town], up to 12 places. Under 120 words, no hashtags, one line at the end with how to book.
Version 4 :- add an example and checks
You are a B2B copywriter. Write a LinkedIn post announcing our one-day AI training for accountancy firms. Audience: partners at firms of 5 to 20 staff who are curious but cautious. It runs on [date] in [town], up to 12 places. Under 120 words, no hashtags, one line at the end with how to book. Match the tone of this earlier post :- "Most firms we meet are not behind on AI. They are just not sure where to begin." Avoid marketing buzzwords. If you need a detail I have not given you, put [GAP] there.

Version 1 would give you the post everyone else has written. Version 4 gives you one you might actually send.

How do I fix a prompt that is not working?

  1. Read the answer for what is wrong, not that it is wrongToo long? Too generic? Wrong facts? Wrong tone? Name the problem in a few words.
  2. Find the missing rivetGeneric means no context or example. Rambling means no format. Invented facts mean no source and no permission to say 'not sure'.
  3. Add one thing and re-runChange one variable so you learn what helped.
  4. Reply, do not restartIn the same chat, say what to change. The AI keeps the conversation.
  5. Save the winnerPut it in your prompt library. See tip ten in our top 10 prompt tips.

What do prompt words like context window and few-shot mean?

A plain-English prompt dictionary
TermWhat it means
PromptThe text you give the AI, including everything earlier in the chat
System promptStanding instructions that sit behind every chat, such as custom instructions
Context windowHow much text the AI can hold in view at once. Longer is not always better
TokenA chunk of a word. Limits and costs are counted in these
Few-shotShowing the AI a few examples of what you want
Zero-shotAsking with no examples
Chain of thoughtAsking the AI to reason step by step before answering
HallucinationA confident answer that is wrong or invented
TemperatureA setting for how adventurous or predictable the AI is
GroundingTying the AI to a source you supply so it stops guessing

Context is the one to understand well, because it is where prompting turns into something bigger. Read what is context management in AI when you are ready.

Which prompt style suits which job?

Match the method to the task
JobLean onGo deeper
Emails and short draftsRole, Format, an exampleAI for business emails and proposals
Summarising and analysing documentsContext, ChecksBest AI tool for analysing documents
Everyday ChatGPT useCustom instructions, follow-upsHow to prompt ChatGPT
Microsoft 365 workGoal, Context, Source, ExpectationsHow to prompt Copilot
Autonomous tasksDone-when, boundaries, check-insHow to prompt an AI agent
Marketing clipsOne shot, one camera moveHow to prompt AI video
Learning it properlyPractice with feedbackHow to prompt AI course

What habits keep prompts safe and honest?

Writing AI prompts: questions people ask

What makes a good AI prompt?

A good prompt is specific about who the AI is, what it should do, what it should work from, what shape the answer should take and what to avoid. Real material and a clear format matter most.

How long should a prompt be?

As long as a good brief to a colleague. A line for a simple question, a paragraph or more for a document. Add length only when each sentence changes the answer.

Should I use a prompt template?

Yes, once you have found one that works. A template with [brackets] for the changing parts saves time and gives steadier results. Keep them in a shared document.

Why do I get different answers to the same prompt?

AI models have some built-in variation. Make the prompt more specific, add an example, and ask for a fixed format. Save the version that works best.

Do I need to learn to code to write prompts?

No. Prompts are written in plain English. Clear thinking about what you want matters more than any technical skill.

Where can I learn more?

Read the top 10 tips, try the specialist guides in this series, or join a live session. Our Basic AI Training is the usual first step.

Keep reading

The Oxford AI School crest

Turn the method into a habit with your team

The Five Rivets are easy to read and hard to remember on a busy Tuesday. Our training gets your team using them on their own work until they stick.

Harry Lang
Harry Lang founded The Oxford AI School in Witney, Oxfordshire. He trains UK businesses and teams to use AI well, writes the Marketing Unfiltered newsletter, and is the author of Learn To Fly With AI.