Toolpuffin

    Loading...

    Up and down to choose, Enter to open, Esc to close.

    How to Write a Clear AI Prompt (Task, Context, Format and Rules)

    Updated December 2026

    Written by the Toolpuffin team. Tools in this guide are tested in the browser.

    A prompt is the text you give an AI assistant. The clearer it is, the less the assistant has to guess. This guide lists what a clear prompt contains, shows how to reuse one with blanks and how to clean one that you copied from somewhere else. No tool here uses AI and no text is sent anywhere.

    Try the tool: Prompt Builder

    What a clear prompt contains

    You do not need every part every time. Start with the task and add the parts the assistant could not guess on its own.

    • Task: what the assistant should do, in one or two sentences.
    • Role: who it should write as, if that matters.
    • Context: the background it cannot know, such as who the text is for and what happened before.
    • Audience, tone, format and length: for example friendly, a short list, under 100 words.
    • Rules: things to do or to avoid, one per line.

    Be clear and direct

    Anthropic's guide on prompting suggests a simple test: show your prompt to a colleague who knows little about the task and ask them to follow it. If they are confused, the assistant will probably be too. Results differ per assistant, and no prompt guarantees a correct answer, so check facts yourself.

    Source: Anthropic: Be clear and direct

    Reuse a prompt with blanks

    If you write the same kind of prompt again and again, keep one version with blanks such as {{topic}} and fill them in each time.

    1. Write your prompt once and replace the parts that change with {{names}}.
    2. Paste it in the Prompt Template Filler.
    3. Fill in a field for each blank.
    4. Copy the finished prompt.

    Clean up a pasted prompt

    A prompt copied from a document or a web page often has extra spaces, empty lines and invisible characters. They make the prompt longer without adding anything. The Prompt Cleaner removes them and shows the estimated tokens before and after.

    Practise writing prompts

    The best way to get better at prompts is to write a few and see what changes. The course below starts with a vague request and adds one building block per lesson: a task, your situation, the audience, a role, a format, a length, an example and what to avoid. A checklist shows which blocks are in your text. It does not run an AI, so copy your prompt and try it in the tool you use.

    More guides