Skip to content

Writing Better Prompts: A Four-Part Formula

Get more useful answers from any AI chatbot by stating the task, the context, the format and your constraints.

  • By StackOverNews Team
  • Last updated
  • First published
  • 2 min read
  • Level: Beginner

A chatbot knows nothing about you, your reader or your purpose unless you tell it. Vague requests get generic answers. The fix is to give the model the same briefing you would give a capable colleague who is new to the job.

The four parts

1. Task

Say exactly what you want produced. Use a verb: write, summarise, compare, rewrite, list, explain.

2. Context

Say who it is for and why. Include the background a newcomer would need, and paste in the material you want the model to work from.

3. Format

Say what the output should look like: length, structure, tone, language.

4. Constraints

Say what to avoid and what must be included.

Before and after

A vague prompt:

Write an email about the meeting.

The same request with all four parts:

Write an email to my project team moving Thursday's planning
meeting to Friday at 10:00.

Context: two team members are at a client site on Thursday.
The agenda does not change.

Format: under 80 words, friendly but direct, with a clear subject line.

Constraints: ask people to reply only if Friday does not work for them.
Do not apologise more than once.

The second prompt takes thirty seconds longer to write and usually removes a round of corrections.

Three techniques that improve results

Give an example

If you want a particular style, show one. A short sample of the tone or layout you want is clearer than a description of it.

Ask for the reasoning or the sources

“List the assumptions you made” or “say which parts you are unsure about” gives you something to check. Treat any sources it lists as leads to verify, since references can be invented.

Refine instead of restarting

Treat the first answer as a draft. Follow up with specific changes: “shorter”, “remove the second paragraph”, “make the tone more formal”. The conversation keeps its context, so small corrections are quick.

A reusable template

Task: [what to produce]
Context: [audience, purpose, background, source material]
Format: [length, structure, tone]
Constraints: [must include / must avoid]

Save it somewhere handy and fill it in whenever a request matters.

What to do next

A well-written prompt improves the answer, but it does not make the answer true. The next lesson covers how to check what a chatbot tells you.

Sources

  1. Prompt engineering guide (platform.openai.com)
  2. Prompt engineering overview (docs.anthropic.com)
  3. Prompt design strategies (ai.google.dev)
  • AI
  • prompts
  • productivity

Get new lessons by email

One short email when we publish a new tutorial or an important alert. No spam, unsubscribe any time.

Sign-up opens soon.