Prompt engineering · Beginner

How to write a clear prompt: a four-part framework

Vague question, vague answer. This simple structure — role, task, context and format — helps you get better results from any AI assistant.

Illustration: a handwritten request flowing through four structured layers — role, task, context and format — into a clear AI answer

Most disappointing AI answers come from prompts that leave the model guessing. It doesn’t know who the answer is for, what “good” looks like, or how long it should be — so it fills the gaps with generic defaults.

The fix is not a magic phrase. It’s a habit: give the assistant the same information you would give a capable new colleague.

Why structure matters

A structured prompt reduces ambiguity. Less ambiguity means fewer rewrites, more predictable results and an easier time spotting when the AI is wrong.

TipThis framework works with ChatGPT, Claude, Gemini and most other chat assistants. Wording matters less than clarity.

The four parts

  1. RoleWho should the AI act as? An editor, a teacher, an analyst.
  2. TaskOne clear action verb: rewrite, explain, compare, list.
  3. ContextAudience, constraints and background the AI can’t know.
  4. FormatLength, structure and tone of the answer you want.

Before and after

Vague
Write a description for my lunch bags.
Structured
Act as an experienced e-commerce copywriter.
Rewrite the product description below for busy parents.
Context: handmade lunch bags, organic cotton, machine washable.
Format: 3 bullet points, under 60 words, friendly tone.

[paste your current description here]

The second prompt tells the assistant exactly who it’s writing for and what the result should look like — so you spend your time editing, not re-asking.

Common mistakes

MistakeBetter approach
Asking several unrelated things at onceOne task per prompt; chain the results
No audienceSay who will read the answer
Trusting facts blindlyAsk for sources, then check them yourself
PrivacyDon’t paste passwords, ID numbers or customer data into any AI tool.

Key takeaways

  • Role, task, context, format — in that order.
  • Specific audience and length give the biggest improvement.
  • Always review and fact-check the output.

Using ChatGPT? Start with how to use ChatGPT, then move on to advanced ChatGPT techniques.

FAQ

Do I need to write prompts in English?

No. Most major assistants understand Urdu, though quality can vary by tool and task. Test both and compare.

Is there a perfect prompt?

No. Treat the first answer as a draft and refine with follow-up instructions.

Keep reading