SpunkArt
Long reads and site policies

Prompt structure: techniques that make answers better

A prompt is the instruction and context you give a language model. Small changes in structure often matter more than clever wording. This guide covers the building blocks of a clear prompt, techniques for harder tasks, and a simple way to test whether a change helped.

The five building blocks

Most strong prompts contain these parts, in roughly this order. Not every prompt needs all five.

BlockPurposeExample line
ContextWho the output is for and why“This is for a newsletter read by volunteer gardeners.”
MaterialThe text or data to work onThe pasted notes, inside clear markers
TaskOne clear verb and object“Summarise the meeting decisions.”
ConstraintsLimits and rules“Under 120 words. Do not include names.”
FormatShape of the answer“A bulleted list, one decision per bullet.”

Before and after

Weak: “Make this better.”

Stronger:

You are editing a product description for a handmade
ceramic mug sold online. Readers want to know size,
care and what makes it different.

<draft>
...pasted text...
</draft>

Rewrite the draft in plain English, under 90 words.
Keep every factual detail. Do not add claims that are
not in the draft. Return only the new text.

The second version says who reads it, what “better” means, what must not change, and how to return the result.

Techniques for harder tasks

Separate instructions from material

Wrap pasted content in tags or clear markers such as <email>...</email>. This stops the model confusing your instructions with the text it is working on, and makes it easier to say “use only the information inside the tags”.

Show examples

One to three examples of input and desired output (“few-shot” prompting) are often clearer than a long description of a style. Vary the examples so the model does not copy surface details, such as always using the same length.

Ask for reasoning before the answer

For maths, logic or multi-step decisions, ask the model to work through the problem first and then give the final answer on its own line. Then check the reasoning, not just the conclusion.

Break big jobs into stages

Instead of “write a full report”, ask for an outline, review it, then ask for each section. Each stage is easier to check and correct.

Say what to do when unsure

Add a line like “If the notes do not say, write ‘not stated’ rather than guessing.” This reduces invented details.

Positive instructions beat bans

“Write in short sentences of under 20 words” works better than “don’t write long sentences”, because it describes the target.

Common mistakes

  • Packing several unrelated tasks into one prompt.
  • Leaving out the audience, so the tone is generic.
  • Asking for “facts” or quotes without supplying a source to draw from.
  • Judging a prompt from one lucky or unlucky answer.
  • Copying long “magic” prompts without knowing which part does the work.

How to test a prompt

  1. Collect five to ten realistic inputs, including awkward ones.
  2. Write down what a good answer looks like for each.
  3. Run the prompt on every input and mark each answer pass or fail.
  4. Change one thing at a time and run the same set again.
  5. Keep the version that passes more cases, and keep the test set for later.

Questions

Do I need to tell the model it is an expert?

A role can set tone and vocabulary, but concrete context about the reader and task usually helps more than a title.

Are longer prompts better?

Only when the extra length is useful context. Irrelevant detail can distract the model. Aim for complete, not long.

Why do I get different answers to the same prompt?

Models sample their output with some randomness. Clear constraints and a fixed format reduce the variation.