Prompt Engineering Masterclass: Write Better AI Prompts
A prompt is the instruction you give an AI model. The difference between a vague prompt and a well-constructed one is often the difference between a generic, hedge-everything answer and one that's immediately useful. None of the techniques below require special access or a specific model - they work with any current general-purpose assistant.
Be specific about the output you want
Weak: "Write about renewable energy."
Better: "Write a 200-word explainer of how solar panels convert sunlight into electricity, for a reader with no physics background. Avoid jargon; use one concrete analogy."
The second version tells the model the length, the audience, the angle, and a specific constraint. All four of those reduce the space of plausible answers and push the model toward what you actually want, instead of a generic overview.
Give it a role, when a role is genuinely useful
Telling a model "you are an experienced technical editor" before asking it to review a paragraph can shift its output toward that framing - more critical, more focused on structure and clarity. This works because it's steering the model toward text patterns associated with that role in its training data, not because the model "becomes" an editor. It's a real, useful technique; it is not magic, and it won't fix a vague underlying question.
Few-shot prompting: show, don't just tell
If you want a specific output format, showing 1-3 examples of input/output pairs is often more reliable than describing the format in prose.
Example:
Convert each product description into a one-line pitch.
Input: A ceramic mug that keeps coffee hot for 6 hours.
Output: Coffee that's still hot when you finally get to it.
Input: A backpack with a built-in solar charger.
Output: Never hunt for an outlet again.
Input: A cutting board made from recycled plastic.
Output:
The model infers the pattern (tone, length, structure) from the examples and continues it, which is often more reliable than an abstract instruction like "write a punchy one-line pitch."
Chain-of-thought: ask for the reasoning, not just the answer
For problems with several steps - math, logic, multi-part analysis - asking the model to work through its reasoning before giving a final answer measurably improves accuracy on that class of problem, compared to asking for the answer directly. Something as simple as adding "think through this step by step before answering" can help. Several current models also have a built-in mode for this - Claude Opus 5's adaptive thinking is a documented example - which does something similar automatically rather than needing the instruction spelled out.
Iterate instead of expecting a perfect first prompt
Treat the first response as a draft, not a verdict. "That's close, but shorter and more formal" is a completely normal and effective second message - it's usually faster than trying to perfectly specify everything up front.
Ask for structured output when you need to use the result programmatically
If you need JSON, a table, or a specific format to feed into another system, say so explicitly and, ideally, show the exact shape you want. Vague requests like "give me the data" produce inconsistent formatting; "return a JSON array of objects with keys name and price, nothing else" produces something you can actually parse.
What prompting can't fix
No amount of prompt engineering makes a model reliably truthful about facts outside its training data, or turns a weak model into a strong one on a task it fundamentally struggles with. If you're hitting a wall, the fix is sometimes a different model or a tool built for that specific task (see Getting Started with AI Tools), not a cleverer prompt.
Enjoyed this? Get more in your inbox.
Weekly AI breakthroughs, tool reviews, and practical guides.