How to Write Better AI Prompts: 9 Techniques That Actually Work
Vague prompts get vague answers. Here are 9 practical prompt-writing techniques — with copyable examples and before/after comparisons — that make any AI chatbot more useful.
Most people blame the AI when they get a bad answer. Usually the problem is the question. A model like Gemini or ChatGPT can only work with what you give it, and "write me something about marketing" gives it almost nothing to work with.
The good news: you don't need a "prompt engineering" course. You need about nine habits. Below is each one, with a copyable example and a before/after so you can see the difference instead of just reading about it.
1. Give it a role
Telling the AI who it is shifts its vocabulary, assumptions, and level of detail before it writes a single word.
Before:
Explain compound interest.
After:
You are a high school economics teacher explaining compound interest to a 15-year-old who finds math boring. Use one everyday example and avoid jargon.
The first answer reads like a textbook. The second uses a concrete example and stays at the right level. A role is the fastest single upgrade you can make to a prompt.
2. Add context, not just instructions
The AI doesn't know your situation unless you tell it. Context is the difference between a generic answer and one that fits your actual problem.
Before:
Write a reply to this customer.
After:
Write a reply to this customer. Background: they bought our software two days ago, it crashed, and they're asking for a refund. We want to keep them as a customer and can offer a free month. Tone: apologetic but not groveling. Keep it under 120 words.
Notice how much of the work is just facts: what happened, what you want, what you can offer. The instruction ("write a reply") is the small part.
3. Be specific about the output you want
Models default to a paragraph of medium length. If you want something else, say so — format, length, and structure all count.
Before:
Give me ideas for a podcast.
After:
Give me 10 podcast episode ideas about personal finance for people in their 20s. Format as a table with three columns: episode title, one-sentence hook, and the main takeaway. Keep titles under 8 words.
The table constraint alone makes the output scannable instead of a wall of text.
4. Show an example (few-shot prompting)
If you want a specific style, the most reliable way to get it is to show one example and ask the AI to match it. This is sometimes called few-shot prompting, and it works better than describing the style in words.
Example:
Rewrite these product names in a playful, punny style. Here is the style I want:
Input: "Lemon Soap" -> Output: "Easy Squeezy Lemon Soap"
Now do the same for: "Mint Toothpaste", "Coffee Mug", "Wool Socks".
One worked example teaches the pattern faster than three sentences of description ever could.
5. Ask for step-by-step reasoning on hard problems
For anything involving logic, math, or multi-step decisions, asking the model to work through it step by step reduces careless mistakes. It slows the model down in a useful way.
Before:
A shirt is 30% off and then I use a $10 coupon. Original price $80. Final price?
After:
A shirt is 30% off and then I use a $10 coupon. Original price $80. Work through it step by step, showing each calculation, then give the final price on its own line.
You also get a checkable trail. If the final number looks wrong, you can see exactly where it went sideways.
6. Constrain the format hard when you'll reuse the output
If the answer is going somewhere specific — a spreadsheet, an email, a slide — describe that destination.
Example:
Summarize this article in exactly 5 bullet points. Each bullet must be one sentence, under 15 words, and start with a verb. No intro, no conclusion, just the bullets.
Hard constraints ("exactly 5", "under 15 words", "no intro") prevent the AI from padding. The "no intro, no conclusion" line is especially useful — models love to wrap everything in friendly filler.
7. Ask the AI to ask you questions first
This is the most underused technique on the list. When you're not sure what you need, flip the direction: have the model interview you before it answers.
Example:
I want to plan a 5-day trip to Japan. Before you suggest an itinerary, ask me up to 5 questions about my budget, interests, travel style, and constraints. Wait for my answers before planning.
You get an itinerary built around your actual preferences instead of a generic tourist loop. This works for resumes, business plans, study schedules — anything where the right answer depends on details only you know. If you want a deeper walkthrough of question-style prompts, the techniques in our brainstorming prompts guide pair well with this one.
8. Give it a persona and a point of view
A role (technique 1) tells the AI who it is. A persona tells it how to think — what to push back on, what to prioritize, what to ignore.
Example:
Act as a tough but fair startup investor reviewing my idea. You care about realistic revenue and you're skeptical of hype. Here is my pitch: [paste pitch]. List your three biggest concerns and what would change your mind.
The persona ("tough but fair", "skeptical of hype") disables the model's default agreeableness, which is where most of its genuinely useful feedback hides.
9. Chain prompts instead of cramming everything into one
Complicated tasks go better as a sequence of small prompts than one giant one. Each step builds on the last, and you can correct course between steps.
A realistic chain for writing a blog post:
- "Give me 10 angle ideas for a post about home composting for apartment dwellers."
- (Pick one.) "Outline that angle as 5 sections with one-line descriptions."
- (Edit the outline.) "Write section 2 in a friendly, practical voice, about 150 words."
- "That paragraph is too salesy. Rewrite it more plainly, no exclamation marks."
You stay in control the whole way, and the final result is far better than what "write me a blog post about composting" would have produced in one shot.
Putting it together
You don't need all nine techniques in every prompt. A strong everyday prompt usually combines three or four: a role, some context, an output format, and a constraint. Here's one that stacks them:
You are an experienced copywriter (role). I run a small bakery and want to announce a new sourdough loaf to my email list (context). Write a 90-word announcement (constraint) with a warm, local-shop tone. End with one clear call to action and don't use the word "delicious" (constraints).
If the first answer isn't quite right, don't start over — iterate. Reply with what to fix: "shorter", "warmer", "drop the second paragraph", "make the call to action a question". Iteration is part of the process, not a sign you wrote a bad prompt.
A quick note on honesty: better prompts make AI more useful, but they don't make it correct. A well-phrased prompt can still get you a confident, wrong answer — especially on facts, dates, and numbers. Treat the output as a strong first draft, not a verified one, and check anything that matters.
You can practice every technique here for free, with no signup, on Smillee AI — just paste a prompt, see what comes back, and refine. The fastest way to get better at prompting is to run twenty prompts and notice which phrasings consistently get you what you want.
Frequently asked questions
Do I need to learn "prompt engineering" to get good results?
No. A handful of habits cover most of what matters: give the AI a role, add context, specify the output format, and iterate when the first answer is off. The advanced terminology mostly describes those same basics.
What is the single most impactful change I can make to a prompt?
Adding context. Telling the AI your actual situation — what happened, who the audience is, what you want to achieve, and any constraints — turns a generic answer into a usable one faster than any other technique.
Why does asking the AI to think "step by step" help?
It encourages the model to lay out its reasoning before committing to an answer, which reduces careless mistakes on math and logic problems and gives you a visible trail you can check for errors.
Will better prompts stop the AI from being wrong?
No. Clearer prompts produce more useful and better-targeted answers, but the model can still state false facts confidently. Always verify anything important, especially specific dates, numbers, and citations.
The Smillee AI editorial team builds and runs Smillee AI — a free AI chat assistant, image generator, and adaptive tutor. We hands-on test every tool, prompt, and workflow we write about and publish only what we have actually used — no signup walls, no hype. Read how we work on our About page.
Try Smillee AI free
Free AI chat assistant - no signup, no credit card, no limits.
Start chatting →More from the blog
- Prompts
AI Prompts for Job Interview Prep: Practice, Feedback, and Confidence
A practical set of copyable AI prompts for interview prep: run realistic mock interviews, generate role-specific questions, get STAR-method feedback, research the company, and handle salary talk with confidence.
- How-to
How to Fact-Check AI Answers and Catch Hallucinations
AI chatbots sound confident even when they are wrong. Here is a practical guide to spotting hallucinations, verifying answers, and knowing when not to trust AI at all.
- Trends
Five Chatbot Trends Reshaping AI Development in 2026
From agentic workflows to on-device inference — what is actually changing in the chatbot and conversational AI landscape, and what it means for developers building production systems today.