50 mins lesson duration•10 mins read
Lesson 24: Prompting for Writing & Content
The WRITE framework for audience, tone, and format — with before/after examples for posts, emails, and articles.
Why "Write a post about X" Fails
The model writes for its default audience in its default tone. Fix it by telling it who it's writing for, how it should sound, and what to deliver.
The WRITE Framework
| Letter | Element | Example |
|---|---|---|
| W | Who (audience) | Busy startup founders |
| R | Register (tone) | Direct, no fluff |
| I | Intent (purpose) | Build awareness, drive sign-ups |
| T | Type (format) | LinkedIn post, email, article |
| E | Examples (reference) | One sample of the desired style |
Before / After
Before:
Write a LinkedIn post about AI agents.
→ generic, vague, sounds like a textbook.
After:
Write about: why your startup needs AI agents.
WHO: busy startup founders (non-technical).
REGISTER: direct, no fluff, confident.
INTENT: make them curious enough to try an AI tool this week.
TYPE: LinkedIn post, under 80 words.
EXAMPLES of tone:
- "Your calendar admin, your first-draft writer, your 3am
on-call — AI agents are the cheapest hires you'll make."
The Tone Dial
| Task | Register | Example instruction |
|---|---|---|
| Support email | Warm, apologetic, clear | "Own the mistake, offer a fix, no excuses" |
| Sales email | Direct, benefit-first | "Lead with the outcome, one CTA only" |
| Blog post | Authoritative, scannable | "H2s, short paragraphs, one idea per section" |
| Internal memo | Concise, neutral | "Decisions, owners, next steps — no filler" |
The Audience Trick: Write It To One Person
Write this as if explaining to Priya, a smart non-technical
founder who has 30 seconds. No jargon without a one-line
explanation.
Pinning a concrete reader forces a level the model can't reach with "general audience".
Always Add the Deliverable Spec
| Deliverable | Spec to include |
|---|---|
| Post | Length, hook style, CTA, hashtags on/off |
| Subject line, greeting, sign-off, one CTA | |
| Article | Outline first, word count, H2 structure, sources |
| Caption | Character limit, emoji policy, link placement |
Common Writing-Prompt Mistakes
- No audience → writes for "everyone" = no one.
- No tone → default corporate-speak.
- No format → wrong structure.
- No example → the model guesses your style.
- One-shot and giving up → iterate with the critique–revise loop: draft → "list the weak parts" → "rewrite fixing them".
Key Takeaways
- WRITE = Who, Register, Intent, Type, Examples.
- Pin a concrete reader and a tone; add a deliverable spec.
- Show one style example — it beats a paragraph of tone adjectives.
- Use draft → critique → revise for higher-quality writing.
Next up: Prompt injection — how attackers hijack prompts and how to defend.
Interactive Lesson Code Snippet
# The WRITE framework: Who, Register, Intent, Type, Examples
def content_prompt(audience, tone, topic, format_type):
return f"""Write about: {topic}
WHO: {audience}
REGISTER (tone): {tone}
INTENT: {format_type}
TYPE: {format_type}
EXAMPLES of tone:
- [short sample in the requested tone]
Deliver: a {format_type} under 80 words."""
print(content_prompt(
audience="busy startup founders",
tone="direct, no fluff",
topic="why your startup needs AI agents",
format_type="LinkedIn post",
))Language: python
Lesson Code (Python)
# The WRITE framework: Who, Register, Intent, Type, Examples
def content_prompt(audience, tone, topic, format_type):
return f"""Write about: {topic}
WHO: {audience}
REGISTER (tone): {tone}
INTENT: {format_type}
TYPE: {format_type}
EXAMPLES of tone:
- [short sample in the requested tone]
Deliver: a {format_type} under 80 words."""
print(content_prompt(
audience="busy startup founders",
tone="direct, no fluff",
topic="why your startup needs AI agents",
format_type="LinkedIn post",
))Console Output
Write about: why your startup needs AI agents
WHO: busy startup founders
REGISTER (tone): direct, no fluff
INTENT: LinkedIn post
TYPE: LinkedIn post
EXAMPLES of tone:
- [short sample in the requested tone]
Deliver: a LinkedIn post under 80 words.Code Visualization Tips
- Draw the WRITE framework as 5 labeled slots the model must fill before writing.
- Put the tone dial on a spectrum from 'corporate' to 'casual' and mark task types on it.
- Annotate a before/after pair: circle the audience line and the deliverable spec.
Professional Tips & Tricks
- Give one sentence of YOUR past writing as the style example — the model mimics it closely.
- Ask for 3 hooks, pick the best, then generate the body from the winner.
- For long-form, chain it: outline → draft → critique → revise (Lesson 22).
Python Code Judge & Practice Arena
LeetCode StyleRun real Python 3.12 WebAssembly code directly in your browser against automated test suites.
Solved:0 / 1
0 / 10 XP
Problem 1 of 1
Tone Rewrite Exercise
Easy+10 XP
Take the same news — 'the app is down for maintenance tonight' — and write the WHO/REGISTER specs for (a) a customer email, (b) an internal team Slack message.
main.pyPython 3.12 (WASM)
1
2
3
4
5
6
7
8
9
10
11
12
Press Run Code to test or Submit to verify test cases
Test Your Knowledge
Instant feedbackQuick Check: Prompting for Writing
What does the WRITE framework stand for?
Up next · Continue learning
Prompt Injection — Attacks & Defenses
How attackers smuggle instructions into your prompts, and the defensive patterns that keep AI tools safe — with examples.
10 mins read55 mins
Start next lesson