A prompt constraint restricts what a model may produce, including its length, vocabulary, tone, or inclusion of promotional material. It turns a broad request into an output that better fits user, editorial, or programmatic needs. section 6.1.2
Useful constraints make requirements explicit:
- Set a maximum length, such as limiting an article to 800 words. section 6.1.2
- Control language by requesting simple, accessible wording and avoiding technical jargon. section 6.1.2
- Exclude unwanted content, such as promotional language or product mentions. section 6.1.2
- Add constraints dynamically when retrieved context is not keeping generated content grounded. section 7.3.3
A practical constraint set
For an article about AI Act compliance: “Limit the article to 800 words. Avoid technical jargon; use simple, accessible language. Do not include promotional language or product mentions.” section 6.1.2
Figure 7.10 Optimization potentials in the RAG system
Use the RAG optimization map to position prompt constraints alongside query enhancement, retrieval, and model adaptation. section 7.3.3


















