Skip to content
← All lessons

Lesson 05 · Intermediate · 3 min

Prompt constraints: rules an AI will follow

Do/don't rules keep the model on-scope and prevent hallucinated extras.

Why

Constraints stop the model wandering: length limits, tech restrictions, and 'do not invent' rules. v0 and Claude prompts lean heavily on explicit do/don't lists.

How

Add a CONSTRAINTS block: 'Keep it under 150 words. Do not invent APIs. Only use the data provided.'

Try it

Add clear constraints to this prompt. Aim for 92+.

87structure

Target: 92. Keep working the prompt. The score moves as you type.

  • Constraints: State limits and do/don't rules, e.g. "Keep it under 200 words. Do not invent APIs."
  • Examples (few-shot): Add one input→output example to anchor tone, format, and edge handling.

Now put it to work: score a prompt you actually use on the desk and see whether this part is one it was missing. This is one of seven parts. To see all of them already in place, the templates are the finished shape; to practise on something new, the daily drill posts one brief a day.