Using AI well
Prompt engineering for beginners: 8 techniques that work
How to write better prompts for ChatGPT, Claude and Gemini: be specific, give context, show examples, set the format, ask for step-by-step thinking and iterate. With before-and-after examples.
Short answer
Prompt engineering means writing instructions that get useful answers from an AI. The techniques that help most are: be specific about the task, give context and your goal, show an example, describe the format you want, break big jobs into steps, ask it to reason step by step, and refine the answer with follow-ups. Clear and specific beats clever tricks.
What prompt engineering is
A prompt is whatever you type to an AI. Prompt engineering is just the craft of writing prompts that get the result you want. You don't need code or special words. Think of it as briefing a capable assistant who has read almost everything but knows nothing about you, your audience or your goal.
1. Be specific
Vague prompts get generic answers. Compare:
- Weak: "Write about exercise."
- Better: "Write a 150-word note for busy parents explaining why two 10-minute walks a day help, in a warm, encouraging tone."
The second says who it's for, how long, what angle and what tone.
2. Give context and your goal
Tell it why you need the answer and what you'll do with it. "I'm preparing for a job interview as a junior data analyst. Ask me five likely questions, one at a time, and give feedback on each answer" works far better than "interview questions". Context helps the model make good choices you didn't spell out.
3. Set a role, if it helps
"You are an experienced primary-school teacher" can shift vocabulary and tone in a useful way. It isn't magic: it won't add knowledge the model lacks, and clear instructions matter more. Use roles to set the voice, not to replace the details.
4. Show an example
One or two examples of what you want are often worth a paragraph of description. This is called few-shot prompting. For instance: "Turn these notes into product descriptions. Here's one I like: ...". The model copies the length, style and structure.
5. Describe the format
Say exactly what shape the answer should take: "a table with columns for tool, price and best for", "three bullet points, under 15 words each", or "a short email with a subject line". Asking for a specific length also stops answers from rambling.
6. Ask it to think step by step
For maths, logic or planning, ask the model to work through the problem before answering. Researchers at Google showed in 2022 that this chain-of-thought prompting improves results on reasoning tasks. Newer reasoning models do this on their own, so with them you can simply ask the question clearly.
7. Break big tasks into steps
Instead of "write my business plan", go in stages: first an outline, then each section, then a review. Each step's answer becomes the input to the next. You can correct course early, and the model does better on smaller, clearer jobs.
8. Iterate, and let it ask you questions
The first answer is a draft. Say what to change: "shorter", "more formal", "add a real-world example", "you missed the budget limit". Or start with: "Before you answer, ask me any questions you need." The model will often ask exactly what you forgot to say.
What doesn't matter as much as people think
Secret "magic" phrases, threats, offers of tips and ALL-CAPS demands rarely beat a clear, specific request. Saying what you do want also tends to work better than a long list of what you don't.
Stay safe while prompting
- Don't paste passwords, personal data or confidential work into tools you don't control.
- Check facts, figures and sources: models can hallucinate.
- If an AI reads web pages or emails for you, hidden text in them can try to hijack its instructions. This is called prompt injection.
Practise these in the lesson on prompting well, and see how they apply to everyday tasks in AI at work.
Key takeaways
- Write prompts like a brief for a smart new colleague who knows nothing about your situation.
- Examples and a described format are the quickest upgrades.
- Big tasks work better as a chain of small ones.
- Treat the first answer as a draft and keep talking.
Learn it properly, free
- Talking to AI: prompting wellBeginner · 6 min
- AI at work: good at, bad atBeginner · 6 min
- Thinking before answering: reasoning modelsAdvanced · 7 min
- Using AI wisely: privacy, bias, judgementBeginner · 5 min
Terms in this post
Questions
What is prompt engineering in simple terms?
Prompt engineering is writing clear instructions for an AI so it gives you the answer you want. It means saying what the task is, who it's for, what context matters and what format you need.
Do I need coding skills for prompt engineering?
No. Prompting is written in plain language. Coding only helps if you want to build apps that send prompts automatically.
Do these techniques work for ChatGPT, Claude and Gemini?
Yes. Being specific, giving context, showing examples, setting the format and iterating help with every major chatbot. Each provider also publishes its own free prompting guide with tips for its models.
Is prompt engineering still useful with newer AI models?
Yes, though it has changed. Newer models need fewer tricks, but they still can't guess your goal, audience or constraints. Clear context and a good brief matter as much as ever.
Sources and further reading
- Prompt engineering overview · Anthropic
- Prompt Engineering Guide · DAIR.AI
- Chain-of-Thought Prompting Elicits Reasoning in Large Language Models · Wei et al. (Google), 2022