We rebuilt PromptSewa — and your prompts were reset

Lesson 5 · 6 min

Constraints, formats and refusal rules

The negative space of a prompt decides quality: what to avoid, what to refuse, and what shape to return.

Most prompt advice is about what to ask for. The leverage is usually in what you forbid. A model with no prohibition will fill gaps with the most common pattern in its training data, and the most common pattern is almost never your house style. Constraints are how you spend your judgement instead of the model's average.

State the format as a contract

If the result must be a table, say which columns and in what order. If it must be JSON, give the keys and the value types. If it must be three bullets, say three and no preamble. A format stated as a contract is checkable in one glance; a format described as a preference ("maybe a list would be nice") is not. The difference matters most when the output is consumed by code, because code has no tolerance for a friendly opening sentence before the JSON.

Forbid the failure you keep seeing

Every team has a recurring defect. Maybe the model invents statistics. Maybe it writes "in today's fast-paced world". Maybe it adds caveats nobody asked for, or turns a checklist into prose. Write that defect down as a prohibition, in plain language, in the prompt. One sentence prevents a correction round. Over time these prohibitions become a house style guide that travels with your prompts instead of living in a reviewer's head.

Refusal rules are part of the specification

Tell the model what to do when the input does not support the task. A support assistant should say "I do not have that information" instead of improvising a policy. A summariser should say "the document does not cover this" instead of padding. Refusal rules feel negative, but they are what make an answer trustworthy: a system that can decline is a system whose yes means something.

Example: "If the source text does not contain the answer, reply exactly: Not found in the provided text. Do not use outside knowledge." That single line converts a plausible guess into an honest gap, which is what you actually want from an extraction step.

Keep constraints few and load-bearing

Twenty constraints is not a better prompt; it is a list the model will partially satisfy. Choose the ones that change the output in ways you can observe. If removing a constraint would not change the result, it is noise. If two constraints conflict — "be comprehensive" and "keep it under 100 words" — the model will silently pick one, so resolve the conflict yourself before sending. Load-bearing constraints are short, specific and testable, and they are the ones you keep in a reusable template.

Checklist

  • Is the output format described precisely enough to verify?
  • Does the prompt ban the defect you see most often?
  • Is there a stated behaviour for missing information?
  • Do any two constraints contradict each other?

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