If there is one framework worth memorising, it is this one. Role, Task, Context, Format — four small pieces that turn a vague request into a precise instruction. Once you internalise it, your prompts will become noticeably stronger within a single afternoon.
Beginners often think great prompts are long. They are not. They are complete. The fastest way to write a complete prompt is to walk through four questions every time. This tutorial gives you that walkthrough and shows what each piece adds to the final result.
A good prompt almost always has four ingredients. Skip any one of them and the AI has to guess — and guessing leads to weak output. Here is the framework:
Tell the AI what kind of expert it should be. This frames the vocabulary, depth, and style of its answer.
Act as a senior tax accountant
produces a different answer to the same question than Act as a finance YouTuber explaining to teenagers.
State the action you want, in one clear verb. "Summarise", "compare", "draft", "rewrite", "plan", "critique". Vague verbs like "help me with" leave the AI guessing.
Provide the raw material — the document to summarise, the data to analyse, your situation, the audience, the constraints. Context is where you transfer your knowledge of the problem to the AI.
Describe what the output should look like. Bullet list? Table? 200 words? JSON? Markdown headings? When you specify this, the AI stops inventing its own format.
Missing pieces
give me feedback on my essay
No role (feedback on what kind of writing — academic, blog, fiction?). The task is fuzzy (feedback on grammar? structure? argument?). No context (the essay itself is not even attached). No format (a paragraph? a bullet list? a score?). The AI will give a generic, lukewarm response.
All four pieces present
Act as a strict university writing tutor. [ROLE]
Review the essay below and give critical feedback. [TASK]
The essay is for an undergraduate philosophy course
and the topic is whether free will can exist in a
deterministic universe. The grading rubric values
clarity of argument, use of evidence, and counter-
argument handling. [CONTEXT]
Essay:
"""
… paste essay here …
"""
Return your feedback in this format: [FORMAT]
- One-line overall verdict
- 3 specific strengths (with line references)
- 3 specific weaknesses (with line references)
- 1 priority improvement to make first
Now the AI has everything it needs. The first draft of its feedback will be detailed, useful, and on-topic.
What kind of expert would I hire for this?
Tip: You don't always need all four. Quick chats can drop Role or Format. But for any serious task — drafting, analysis, decision-making — having all four turns mediocre AI output into great output.
Take this vague prompt — "give me marketing ideas" — and rewrite it using all four ingredients for a specific business you can imagine (a small bakery, a freelance designer, anything). Then run both versions and compare.
Try the same task with two different Roles. For example, "Act as a friendly grandmother" vs "Act as a courtroom lawyer" — both asked to explain why someone should exercise daily. Notice how Role alone changes the entire tone.
Pick a real task from your work or studies and write a prompt with all four ingredients in a single message. Save it. Reuse it next week with new context. Reusable prompts are the start of building your own prompt library.
Sign in to join the discussion and post comments.
Sign inPrompt Engineering for Content & Copywriting
Write blogs, ads, emails, and social media content ten times faster with AI. 13 practical tutorials on prompt engineering for content creators and copywriters.
Prompt Engineering for Data Science & Analytics
Supercharge your data workflows with AI. 15 practical tutorials on using prompt engineering for data cleaning, EDA, machine learning, SQL, visualisation, and more.
Prompt Engineering for Image Generation
Turn words into stunning visuals. Master AI image generation tools like Midjourney, DALL·E 3, and Stable Diffusion with 18 focused tutorials — from first prompt to full brand identity.
Prompt Engineering for Education & Learning
Use AI as your personal tutor. Learn how to study faster, create lesson plans, generate practice questions, master languages, and prepare for competitive exams with smart prompts.
Advanced Prompt Engineering Techniques
Master the powerful techniques AI experts use every day. Chain-of-thought, RAG, agents, function calling, prompt evaluation, and much more — 20 deep-dive tutorials.
Prompt Engineering Projects & Real-World Applications
Twelve hands-on projects that turn prompt engineering theory into a portfolio. Build chatbots, content generators, RAG systems, and more.