Writing Task Prompts
How to write task prompts that produce the output you want with minimal iteration.
Overview
A task prompt is the instruction for one step of the work. The soul above it handles who the bot is and the rules that always apply, so the prompt can focus on what this specific step needs to do. The shorter and sharper the prompt, the more predictable the output.
What a good prompt covers
A good task prompt has three parts:
- The goal. What should the task produce? “Find the top five AI product launches from the past 24 hours.”
- The shape. What should the output look like? “Return each launch as a bullet point with the product name, a one-sentence summary, and the source URL.”
- Any constraints specific to this step. “Only include launches that are generally available today. Skip closed betas.”
Rules that apply to every task in the bot belong in the soul, not the prompt. See Writing an Effective Soul.
Reference upstream outputs in later stages
Tasks in a later stage can refer to the output of earlier tasks. Be explicit about what you want them to do with it.
A stage 2 writing task might read:
You have been given three lists from stage 1:
1. Product launches
2. Research papers
3. Policy news
Pick the five most important items across all three lists and write the
daily briefing. The first item should be the most consequential for a
product team.
Pair the prompt with the right tools
Attach only the tools this task actually needs. A writing task does not need WebSearch. An email task does not need web access. Tight scoping keeps the task focused and makes its behaviour easier to predict. See Tools Overview.
Common mistakes
Repeating the soul
If the soul already says “be factual and cite sources”, do not repeat it in the prompt. You are spending context on something the bot already knows.
Being vague about the output shape
“Summarise the news” is ambiguous. “Return a five-item bullet list, each item 30 words or less, ending with the source URL in parentheses” is not.
One giant prompt for everything
If you find yourself writing a prompt that does research, summarisation, and email delivery all in one, split it into separate tasks. Each one becomes simpler and easier to tune. See Bot Tasks.
No example of the output
When the format is non-obvious, include a tiny example in the prompt:
Format each item like this:
- **OpenAI announces X**. One-sentence summary. (source: https://...)
This is the single highest-leverage thing you can add to a prompt.