Guide · about 2 min read
How to Write Good AI Prompts: A Beginner’s Guide With Examples (2026)
How to write good AI prompts
A prompt is the instruction you give an AI tool. Most weak answers come from weak prompts, not weak AI. The fix is simple: tell the AI who it should be, what you want, what it needs to know, and how to answer.
Prompting is the first skill in every AI roadmap, and it is the base for building agents later.
The 4-part prompt formula
1. Role
Tell the AI who to act as. Example: "Act as a patient maths tutor for a beginner."
2. Goal
Say clearly what you want. Example: "Explain what a fraction is."
3. Details
Give the facts it needs: your level, your audience, limits, or text to work with. Example: "I am 15 and I find fractions confusing."
4. Format
Say how you want the answer. Example: "Use three short steps and one example."
Before and after
Weak prompt: "Write about healthy eating."
Better prompt: "Act as a nutrition coach. Write a one-week healthy eating plan for a student on a small budget. Use a table with breakfast, lunch and dinner for each day."
The second prompt gets a useful answer on the first try because the AI knows the role, goal, details and format.
Five habits that improve every prompt
- Give an example. Show one sample of what you want.
- Ask for steps. "Explain step by step" helps with hard topics.
- Set limits. Word count, tone and reading level all help.
- Improve, don't restart. Reply with "make it shorter" or "use simpler words".
- Save prompts that work. Reuse them next time.
Common prompt mistakes
- Asking too many things in one message
- Leaving out who the answer is for
- Accepting the first answer without checking facts
What to learn next
Once your prompts work well, build something with them. See AI agent examples for beginners, or follow the 30-day plan.
Frequently asked questions
- What is a prompt in AI?
- A prompt is the instruction or question you give an AI tool to get an answer.
- How do I write a good AI prompt?
- Give a role, a goal, the details it needs and the format you want back.
- Do I need to learn prompt engineering to use AI?
- You only need the basics. A clear role, goal, details and format cover most beginner needs.
- Why does AI give me wrong or vague answers?
- Usually the prompt is too short or unclear. Add details, and always check important facts.