What is the difference between instructions and constraints?
Prompt Engineering Patterns: Instruction Following, Negative Constraints, and Output Format Control
Audio flashcard · 0:18Nortren·
What is the difference between instructions and constraints?
0:18
Instructions describe what the model should do; constraints describe limits on how it should do it. "Summarize this article" is an instruction. "Use no more than 100 words" is a constraint. Both belong in a prompt, but should be clearly separated and ordered consistently. Constraints work better when stated as positive limits than as prohibitions.
docs.anthropic.com