Prompt ChatGPT with context engineering (the 4W framework)

A simple framework to give ChatGPT the context it needs.

playbook
Last updated Oct 28, 2026

Tools featured in this playbook

This article was originally posted on How to AI

You obsess over little details of your ChatGPT prompts:

Which model should you use?

What “role” should ChatGPT have?

What “steps” should ChatGPT follow?

The right prompts do bring better outputs.

But the most important part of the prompt is the right context.

☑ Who the answer is for and Why they should care.

☑ What facts, examples, or links the AI must know (and what to avoid).

☑ How success will look; format, tone, length, next‑step workflow.

I call it the 4W prompt for better context engineering.

Think of ChatGPT like a very good intern: it does exceptionally well… if it knows first the 4W to perform the tasks. And I’m not the only one obsessing over it:

Andrej Karpathy, one of the creator of ChatGPT, agrees with Tobi.

Now that you know WHY you must master context engineering, let’s master the HOW together. Here’s my step-by-step guide on:

My 4W prompt to nail context engineering (copy & paste it).

Three examples of correct context engineering in a prompt.

When you must NOT have any context in a prompt.

#1 - How to use the 4W prompt.

The common misconception I keep hearing is “ChatGPT knows everything on Google anyway, so why should I care sharing context?”.

Well, it does not.

Google has 50 billion webpages. ChatGPT can’t ‘know’ the entire web.

Here’s how to (really) prompt it instead.

Let’s say you want to ask something to ChatGPT beyond a Google search.

For example:

Summarize a 100-page PDF, find gaps & search the web to complete it.

Share 10 novel ideas to double-down on your past marketing campaign.

Write a draft of a presentation inspired by a TED talk you love.

You need the right context. So I made a prompt to copy & paste called 4W.

You must cover Who, Why, What, How when starting your chat.

Copy & paste this prompt (with instructions):

ROLE

You are [describe the assistant persona, e.g., “a clear‑thinking writing coach”].

OBJECTIVE

Help me [state the outcome, e.g., “draft a two‑page blog post about remote teamwork”].

CONTEXT PACKAGE (add or delete lines as needed)

Audience: [who will read the final piece]

Voice and tone: [friendly / formal / playful / etc.]

Length target: [e.g., “≈1 000 words” or “3 paragraphs”]

Key facts, excerpts, data or links the answer must use:

  1. [paste or summarise source]

  2. [add links if ChatGPT does not block it]

  3. [attach PDFs, Excels, TXT…]

Known constraints or boundaries: [things to avoid, compliance needs, formatting rules]

WORKFLOW

Step 1. Gap check – list any information still missing; ask me concise questions until gaps are filled.

Step 2. Plan – outline a logical structure or bullet agenda for the piece. Wait for my approval.

Step 3. Draft – write the first version following the approved plan.

Step 4. Review – pause and ask me for feedback on clarity, tone and completeness.

Step 5. Revise – improve the draft with my notes.

Repeat steps 3‑4 until I agree with the command AGREE.

CONTEXT‑HANDLING RULES

  • If a pasted source exceeds ~200 words, first give me a one‑sentence summary and ask whether to keep the full text in context.

  • If you need external knowledge I did not supply, list the missing points in the Gap check.

OUTPUT FORMAT

Return all content in [e.g., “plain text” / “Markdown with H2 headings” / “bullet lists only”].

When you quote a key fact, reference it by its list number from the Context Package.

FIRST ACTION

Start with Workflow “step 0: Gap check.”

Every part in italic must be filled to cover the 4W.

To see my 4W context prompt in action, let’s move on to #2.

#2 - Three examples of the right context.

For each example, remember to:

Go to ChatGPT (duh).

Go to “Tools” → select “Deep Research”.

Copy & paste my prompt example with the right doc attached.

Example 1: From a long PDF to a one-pager.

A friend of mine is a Private Equity Analyst, and ask me for a good prompt.

So let’s roleplay as him:

☑ Who are you? A private equity analyst.

☑ Why do you use ChatGPT? To summarize a 92-page PDF into one page.

☑ What do you need from ChatGPT? Extract key data for my specific boss questions.

☑ How do you need ChatGPT to reason? Following a strict company methodology.

I attached this (massive) 92-page PDF about Private Equity.

Time to fill out my 4W prompt:

ROLE: Act as a sharp, data-oriented private-equity analyst who will turn dense industry-benchmark research into a crisp, investor-ready brief.

OBJECTIVE: Help me draft a single-page (≈ 400–450-word) benchmark summary based on the AMF study “Private Equity: Overview and Vulnerabilities” (PDF attached).

CONTEXT PACKAGE:

Audience – investment-committee partners and senior deal-team analysts

Voice & tone – formal, insight-driven, concise (no marketing fluff)

Length target – one A4 page, single-spacing, 12-pt serif font

Key facts, excerpts, data or links the answer must use –

  1. Insert headline quantitative benchmarks from the PDF

  2. Insert qualitative findings that illuminate opportunities or risks

  3. Insert any regulatory or macro-risk observations highlighted by the report

Known constraints or boundaries – cite every statistic with its page/table reference; highlight at least three systemic vulnerabilities identified in the study; use bullet lists for headline metrics and narrative prose for analysis; do not rely on external or speculative data—stay within the PDF.

WORKFLOW:

Step 1. Gap check – list any information still missing; ask me concise questions until gaps are filled.

Step 2. Plan – outline a logical structure or bullet agenda for the piece. Wait for my approval.

Step 3. Draft – write the first version following the approved plan.

Step 4. Review – pause and ask me for feedback on clarity, tone and completeness.

Step 5. Revise – improve the draft with my notes.

Repeat steps 3‑4 until I agree with the command AGREE.

CONTEXT-HANDLING RULES:

If a pasted source exceeds ~200 words, first give me a one-sentence summary and ask whether to keep the full text. If you need knowledge I have not supplied, list it in Gap check instead of searching externally.

OUTPUT FORMAT: Return all content in Markdown with H2 headings and use bracketed list-number references (e.g., [1], [2]) when quoting Key facts.

FIRST ACTION: Begin with Workflow step 0 – Gap check.

Here it is in action:

I attached the PDF + activate “Deep Research”

Then you must answer ChatGPT’s questions:

And now ChatGPT does the heavy-lifting for you:

Here’s the final result: https://chatgpt.com/s/dr_6867e124ab648191b57dfb0ab2b6524c.

Example 2: Find gaps in my thinking.

You wrote the copies of your company’s landing page.

But are you sure it’s the best copy possible? Let’s roleplay:

☑ Who are you? A cold call sales coach.

☑ Why do you use ChatGPT? To upgrade your landing page copy.

☑ What do you need from ChatGPT? To improve your copy following your KPIs.

☑ How do you need ChatGPT to reason? Using specific techniques tailored to me.

I typed “Cold Call Sales Training” on Google, went to page 9, and found a terrible copy. I pasted it inside my prompt:

ROLE

Act like a sales training copywriter who specializes in crafting high-converting landing pages for cold-call sales coaches.

OBJECTIVE

Help me upgrade my landing page copy to boost demo bookings by at least 30 percent.

CONTEXT PACKAGE

Audience: Series A–C B2B SaaS founders and sales managers who oversee SDR teams.

Voice and tone: Energetic, conversational, authoritative, with a supportive “coach” vibe.

Length target: Roughly 300–350 words total (hero section, three value props, and a CTA).

Key facts, excerpts, data or links the answer must use:

  1. “Clients report a 27 percent higher cold-call connect rate within 60 days.”

  2. Testimonial: “Within a month, our demo bookings doubled.” — Elena B., VP Sales, FluxQR

  3. CTA link: test.com/free-strategy-call

Known constraints or boundaries: Use second-person (“you”) throughout; avoid clichés like “crush quota”; comply with GDPR; keep sentences under 20 words.

Past copy in /// brackets:

/// past copy ///

[copy & paste past copy here]

/// end past copy ///

WORKFLOW

Step 1. Gap check – list any information still missing; ask me concise questions until gaps are filled.

Step 2. Plan – outline a logical structure or bullet agenda for the piece. Wait for my approval.

Step 3. Draft – write the first version following the approved plan.

Step 4. Review – pause and ask me for feedback on clarity, tone and completeness.

Step 5. Revise – improve the draft with my notes.

Repeat steps 3-4 until I agree with the command AGREE.

CONTEXT-HANDLING RULES

  • If you need external knowledge I did not supply, list the missing points in the Gap check.

OUTPUT FORMAT

Return all content in plain text with no extra markdown styling.

FIRST ACTION

Start with Workflow “step 0: Gap check.”

With this much context, it’s pretty hard to go wrong.

Here’s the result: https://chatgpt.com/share/6867e5bd-13f0-800f-9f53-2121552e81e8. And if you’re not sure it’s better, just A/B test the copies.

Example 3: What made me great.

People keep asking “How can I find new content?” instead of understanding why past content went so well (compared to others).

Let’s take my own X (Twitter) as an example.

I extracted my last 3 months tweets, and wrote this prompt:

ROLE

Act as a content analyst who specializes in reverse-engineering virality on X (Twitter) for AI-focused creators.

OBJECTIVE

Help me pinpoint, with extreme precision and depth, the exact factors that made my three best X threads go viral so I can replicate their success in a weekly content plan.

CONTEXT PACKAGE

Audience: Ruben Hassid and other advanced AI creators who follow him for mastering & understanding AI.

Voice and tone: Analytical, data-driven, conversational, and immediately actionable.

Length target: A full analysis, delivered in concise sections per workflow step.

Key facts, excerpts, data or links the answer must use:

  1. Thread-level metrics: impressions, engagement rate, reposts, bookmarks.

  2. Structural elements: opening hooks, pacing, visuals, call-to-action lines.

  3. Timing data: day, hour, and follower growth spikes around each post.

Known constraints or boundaries: Rely only on data I attached. No speculation.

WORKFLOW

Step 1. Gap check – list any information still missing; ask me concise questions until gaps are filled.

Step 2. Plan – outline a logical structure or bullet agenda for the piece. Wait for my approval.

Step 3. Draft – write the first version following the approved plan.

Step 4. Review – pause and ask me for feedback on clarity, tone and completeness.

Step 5. Revise – improve the draft with my notes.

Repeat steps 3-4 until I agree with the command AGREE.

CONTEXT-HANDLING RULES

  • If a pasted source exceeds ~200 words, first give me a one-sentence summary and ask whether to keep the full text in context.

OUTPUT FORMAT

Return all content in plain text with no extra markdown styling.

FIRST ACTION

Start with Workflow “step 0: Gap check.”

Now I extracted my last 3 months tweets, and pasted the prompt.

Here’s the result: https://chatgpt.com/share/6867ec17-14a4-800f-9cc5-343ae2d90398. Don’t steal my viral posts please. Love you.

#3 - When not to share context (& what to do instead).

Context Is All You Need.

It limits hallucinations.

It gives you the right answer.

It gives it to you the right way.

But a lot of the time, you need a quick answer.

Quick text fixes (spelling, grammar, re-formatting, translation).

Simple mathematics or conversions (°F → °C, 5 MB → KB).

Small data grabs or labels (pull an email, tag sentiment).

Basic fact look-ups (“Symbol for gold?”).

Here’s my simple rule:

→ I need reasoning: 4W Prompt + Deep Research (in Tools).

→ I need quick or no context: Normal Prompt + GPT-4.5 model.

Comments

Login to leave a comment