Skip to content
← All lessons

Lesson 05 · Intermediate · 3 min

Add guardrails with constraints

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.