We rebuilt PromptSewa — and your prompts were reset

Lesson 2 · 6 min

The anatomy of a great prompt

Context, task, constraints and output shape — the four blocks every reliable prompt is built from.

Every reliable prompt in this course is built from four blocks, and the order matters less than their presence. Context tells the model what world it is operating in. Task names the single job. Constraints bound the answer. Output shape decides what the result looks like. When you read a prompt that works, you can usually label each sentence with one of those four words.

Context earns its tokens

Context is the material the model needs before it can do the task: the audience, the product, the prior conversation, the document being edited. Good context is specific and short. "You are a senior editor at a business publication" does more than three paragraphs of encouragement, because it implies a voice, a reading level and a set of decisions. Bad context is decoration: "You are the world's best assistant" adds no information about the task and can push the model toward inflated prose.

Task is one verb

State the job with a verb you could assign to a colleague. Summarise. Classify. Extract. Rewrite. Compare. Draft. Two verbs in one sentence usually means two tasks, and a model asked to do both will blend them. If you genuinely need two things, number them and ask for two labelled sections. That is not pedantry; it is the difference between a result you can check and a paragraph you have to untangle.

Constraints carry the quality

Length, tone, reading level, allowed sources, forbidden claims, formatting rules. Constraints are where most of the value sits, because they are where your judgement lives. "Do not invent statistics" or "only use the text I provided" prevents a whole class of failure. A prompt with a clear task and no constraints will produce something generic, and generic output is expensive to fix because every sentence needs a decision.

Example: context — "You are editing a support article for a non-technical audience." task — "Rewrite the steps below." constraints — "Keep every number and product name, use short sentences, do not add steps." output — "A numbered list, one action per item."

Output shape is a contract

Say what the result must look like: JSON with named keys, a table with fixed columns, three bullets and no preamble. Output shape is what makes a prompt reusable in a pipeline. It also makes evaluation possible — a result either matches the shape or it does not, and that check needs no human judgement.

Checklist

  • Can you label every sentence as context, task, constraint or shape?
  • Is there exactly one task verb?
  • Do the constraints encode your real standards?
  • Is the output shape checkable?

Finished this lesson?

Mark it complete to generate a certificate you can print or save as a PDF. We ask for an email only so you can be reached — no account is created.

All lessons