Constraint Prompting

Domain: Prompt Engineering

🎯 Motivation

Adding constraints (word count, tone, complexity level) narrows the output to exactly what you need.

📋 Concrete Example

Constraints: ‘Max 50 words. Reading level: 12-year-old. Tone: encouraging. Must include the word practice.’ The model must satisfy all constraints simultaneously.

🔗 Analogy

Rules in a poetry contest - ‘14 lines, rhyming, about nature, no modern technology mentioned.’ The constraints shape the poem. Constraint prompting does the same for LLM output.