Skip to content
Aristo

Learn

Constraints and boundaries6 minutes

Draw the boundaries

Set the scope, the must and must-not, the sources and what to do when unsure, and say which rule wins when they clash.

Why it matters

A capable model will happily do more than you asked, or something next to what you asked. Constraints are the fence around the task: how long, how wide, which sources, what is off limits, and what to do when the facts run out. Without them, a blog post becomes a buyer's guide, a literature search acquires studies that do not exist, and a support bot starts promising refunds.

The most valuable constraint is the one for the uncertain case. Telling the model what to do when it does not know (say so, mark it, ask, leave it out) is the simplest defence against confident invention. OpenAI's guidance for reasoning models asks you to state constraints explicitly in the prompt, and Google's guide shows constraints, such as a length limit for a summary, as one of the ways a prompt shapes the response.

Phrase boundaries as what to do where you can. Anthropic's guidance notes that telling the model what you want works better than listing what you do not want: “describe equipment by type” teaches more than “no brands”. And when two rules can clash, rank them, so the model does not have to guess which one you would sacrifice.

What good looks like

  • 0 — No boundaries. “Write a blog post about remote work.”
  • 1 — One vague boundary. “Write a short blog post about remote work.” Short is not a number.
  • 2 — Several concrete boundaries, silent on uncertainty. “About 600 words, for managers, no product recommendations, cite at least two studies.”
  • 3 — Boundaries plus must-nots and the uncertain case. “…if you cannot find a study published after 2023, say so rather than inventing one.”
  • 4 — Complete, consistent and prioritised. “…may stretch to 800 words to keep both studies; accuracy outranks length; mark any claim you are unsure of with ‘(verify)’.”

Common mistakes

  • Vague limits such as “short”, “simple” or “not too technical”. Turn each into a number or a definition.
  • A long list of prohibitions with nothing about what to do instead.
  • Rules that contradict each other (“be brief” and “cover everything”) with no priority between them.
  • No instruction for missing information, which leaves the model to fill the gap itself.
  • Constraints scattered through the prompt, so some are missed. Gather them in one place.

Try it on your own prompt

Paste a prompt into the workspace and ask yourself three questions: how big is the answer allowed to be, what is out of bounds, and what should happen if the model is unsure? Add one line for each, then rank them if they could pull against each other. Check how the constraints score moves.

Worked examples

Newsletter article

Weak
Write a blog post about composting.
Strong
<guidance>
{{paste our horticulture team's composting notes here}}
</guidance>

Write a post about home composting for our garden centre's monthly newsletter.

Boundaries:
- 600 to 700 words.
- Cover cold composting in a garden bin only; hot composting and wormeries are next month's topic.
- Describe equipment by type ("a lidded plastic bin", "a garden fork"), not by brand.
- Base every claim about how long materials take to break down on the notes above, not on general knowledge.
- If readers would need something the notes do not cover, list it at the end as a question for our staff instead of answering it.

If these rules conflict, accuracy comes first, then scope, then length: the post may run to 800 words if that is what accuracy needs.

The strong prompt sets length, scope, sources and an instruction for gaps, phrased as what to do, and ranks the rules so the model knows which one bends.

Literature search

Weak
Find me some sources on microplastics in drinking water.
Strong
Find peer-reviewed studies on microplastics in tap water for a literature review I am drafting.

- Include only journal articles published from 2020 onwards; leave out press releases, blogs and preprints.
- Give at most eight studies, each with a full citation and a link you have actually opened.
- If you cannot confirm that a study exists and says what you report, leave it out and tell me how many you left out.

Four real studies are worth more to me than eight uncertain ones, so when in doubt, drop it.

The weak prompt invites invented or low-quality sources. The strong one fixes scope and source type, caps the number, and says exactly what to do when the model is unsure.

Exercise

Add boundaries to this prompt: length, what to leave out, and what to do if a detail you need is missing.

Rewrite this prompt with a clear scope, acceptable sources and an instruction for when the model is unsure.

Rewrite this system prompt with what the assistant may and may not do, and what it does when it cannot help.

Try it on your own prompt

Sources