Managing Multiple Constraints
Stack length limits, required keywords, and forbidden words into an orderly checklist that the AI follows.
Why this matters
Real tasks have many rules at once: length, key words, tone, and words to avoid. Without a clear list, the AI drops some of them.
Number Your Rules
When rules are packed into one paragraph, the AI may skip the ones in the middle. A numbered list makes each rule easy to follow.
In real life: A recipe with steps numbered 1 to 4 is easy to follow. The same recipe as one long paragraph is easy to get wrong. Numbered rules work better for the AI too.
Keep "Must" and "Must Not" Apart
Put what the AI must include (key phrases, word limit) in one group. Put what it must avoid (banned words) in another.
In real life: Keep 'must include' rules apart from 'must not use' rules. This stops the AI mixing them up.
Ask It to Check, Then Check Again
A line like "check every rule before you answer" helps. For important work, also check the result with code or a second person.
In real life: A nurse follows a checklist before a procedure, and a colleague double-checks it. For rules that really matter, ask the AI to check, then check again yourself or with code.
Your practice task
Announce the transit update below to Lagos-Abuja bus passengers in 22 words or fewer. You must follow 4 rules simultaneously: 1) Max 22 words, 2) Include 'Jabi Terminal' and 'safety check', 3) Reassuring tone, and 4) No apology words ('sorry', 'apologize').
How to do it
- Read the transit update above.
- Write a numbered list of the 4 rules.
- Put required phrases and forbidden words in separate lines.
- Press Run proof and check each rule on the checklist.
Practice it for free in the app. You get instant checks that show what you got right and what to fix. A lesson takes about two minutes and you can try as many times as you like.
Quick reference: Numbered Constraint Stack
Ideal for operational customer updates, SMS broadcasts, and status alerts.
Adhere strictly to all rules: 1. Length: Max 22 words. 2. Include: "Term A" and "Term B". 3. Tone: Professional. 4. Forbidden: Do NOT use [Word X].
More lessons in this course
- Stress-Testing Guardrails & Injection DefenseBuild layered defense-in-depth guardrails that classify adversarial prompt attacks without executing malicious commands.
- Chaining Prompts: One Job per StepSplit a big task into small steps and pass each result safely into the next prompt.
- Testing Prompts on Tricky InputsTest a prompt on edge cases and add a safe fallback so it never guesses.