AI Tools

How to Write Better AI Prompts (Framework + Examples)

A five-part AI prompt framework with worked examples: context, task, format, constraints and samples, plus how to iterate until the output fits.

4 min read·Updated 2026-04-05

Most weak AI outputs are not a model problem. They are a brief problem: the prompt asks for everything, gives no context about the reader, and leaves the format to chance. This guide gives you a five-part framework you can reuse for almost any task, shows how each part changes the answer, and walks through worked examples you can adapt in minutes. By the end you will know how to brief a model the way you would brief a skilled colleague.

Why vague prompts fail

A model works only from the words in front of it plus what it absorbed in training. When you type "write something about email marketing", it has to invent your audience, your product, your tone and your goal, so it returns the statistical average of all those possibilities: fluent, balanced and unusable.

The fix is not a longer prompt, it is a denser one. Every sentence should either supply context, narrow the task, or constrain the answer. A 60-word prompt that hits all three reliably beats a 400-word ramble that hits none, because filler competes with instruction for the same attention.

The five-part prompt framework

Almost every strong prompt is a variation of the same five slots. Fill them in order, then read the result back before you send it:

PartQuestion it answersExample line
ContextWho is this for, and why now?You are writing for first-time renters in the US setting up a new apartment.
TaskWhat single action should happen?Draft a 120-word checklist for connecting electricity and internet.
FormatHow should the answer be shaped?Return five bullets, each under fifteen words.
ConstraintsWhat must be avoided?No brand names, no prices, plain US English.
ExampleWhat does good look like?Match the tone of this sample paragraph.

You will not always need all five. Tight factual jobs such as reformatting a list may only need format and constraints. Open creative work leans heavily on context and example. Notice which slot is missing every time an answer comes back flat.

Writing context and task together

Context and task fall apart when three paragraphs of background sit between them. Keep them adjacent so the instruction binds to the situation. A reliable order:

  1. One sentence for who you are and who the output serves.
  2. One sentence stating the exact deliverable, with a length or count.
  3. One sentence naming the result the reader should reach.
  4. Only then, the fine detail: tone, banned words, format, examples.

Numbers do more work than adjectives. "Write a helpful intro" is a wish. "Write a 40-word intro that ends with a question" is a specification the model can check against before it answers.

Specifying the output format

Format rules should be mechanical, not aspirational. Instead of "present it nicely", say "return a table with three columns: step, time, cost". Name the container, the fields, the order, and the maximum length of each field. If the output will be pasted into another system, show the exact wrapper, using <ul> and <li> tags or an object with fixed keys.

Also state what to leave out. "No preamble, no closing summary, start with the table" removes the most common time-waster: an answer that buries the payload under three sentences of throat clearing.

Using examples to pin down style

One good example beats three adjectives. If you want short sentences and concrete verbs, hand over two sentences that already read that way. A sample fixes register, vocabulary, rhythm and level of detail at once — things described as "professional yet friendly" never pin down.

Keep examples short, label them clearly, and make them match the shape of the task rather than the topic. For long-form work, supply one model paragraph instead of a finished piece, so the style transfers without the content being copied.

Iterate by changing one variable

When an answer disappoints, resist rewriting the whole prompt. Change one slot, rerun, and compare. Change context, format and constraints together and you will never learn which one mattered, and you will drift back toward a bloated prompt nobody can reuse.

Run promising drafts through the LLM Token Counter to see how many tokens your instruction costs before any output. Long prompts are not free: they add cost on every call and eat context space in a chat that already holds a long history. Save the reusable version with the AI Prompt Generator, test it on two or three inputs, and when the result is accurate but stiff, finish with the AI Humanizer to restore a natural voice.

Frequently asked questions

How long should a good prompt be? As long as the task requires and not one word longer. Most working prompts land between 50 and 200 words; the test of quality is whether every sentence narrows the answer.

Should instructions go at the start or the end? Both ends carry weight. Put durable rules at the start and this run's specific constraints at the end, so the final tokens the model reads are the ones that matter most for the current job.

Does a better prompt really cut cost? Yes. Tighter prompts mean fewer input tokens per call and fewer retry cycles, and those savings compound quickly across a workflow you run dozens of times a day.

Tools used in this guide

Related guides