T1 · Beginner · 6 minStable · Last reviewed: 2026-08-19Early draft

Anatomy of a Prompt — What It's Made Of

In one line · A good prompt is built from clear parts: the task, the context, the constraints, and the shape you want the answer in.

Glossary:Context WindowLLMPrompt
Why it matters

If your prompt is one lumped-together line, you can't change one thing without breaking another. Separating the parts lets you tune each one on its own.

Like handing work to a colleague: you say what you need, give the info required, set the do-nots, and say how to hand it back. The model is exactly the same.

An analogy

Think of it as a work ticket: title, description, acceptance criteria. The model performs better when the ticket is well-organized.

'Summarize this text (task) for non-technical customers (context) in at most 3 points (constraint) as bullet points (format)' — each part stands clear on its own.

How it works

The model reads the whole prompt as one continuous text, so jumbled parts get weighted wrong. When you separate task, context, constraints, and format with headings or clear delimiters (like --- or XML tags), every sentence has an obvious job — and you can tweak one part while debugging without touching the rest. Practical rule: instructions first, the data the model works on last, inside delimiters.

Practice

🧪 Try it yourself: take a long prompt from your own work (or the linked exercise) and label its four parts: task, context, constraints, format. A missing part is usually why replies come back messy — fill it in, run both versions, and compare.

Common mistakes
  • Mixing the data the model should work on into the instruction text with no delimiters, so 'data' and 'commands' blur together.
  • Assuming constraints without writing them ('obviously I want it short') — what isn't in the prompt doesn't exist.
  • Describing the format vaguely ('make it neat') instead of showing a concrete example of the shape you want.
When to use it

Any prompt that goes into code or gets reused, and any prompt past 3-4 lines — the structure saves you debugging hours later.

When NOT to use it

A quick one-off chat question — formal structure there is overhead with no payoff. Just ask.

LET'S BUILD ITDone reading — now build it yourself.Break a given prompt into its parts