ConstraintType
Severity levels for behavioral constraints. These levels communicate different degrees of requirement to the AI model, following RFC 2119 conventions for requirement keywords.Type Definition
Levels
Absolute requirements that cannot be violated. Use for critical security, privacy, or functional requirements.
Absolute prohibitions that cannot be violated. Use for forbidden actions or behaviors.
Strong recommendations that should be followed when possible. Use for quality standards and best practices.
Strong recommendations to avoid, but not absolute prohibitions. Use for discouraged but not forbidden behaviors.
When to Use Each Level
- must: Security requirements, data validation rules, legal compliance
- must_not: Privacy violations, prohibited content, harmful actions
- should: Quality standards, tone preferences, user experience guidelines
- should_not: Anti-patterns, discouraged approaches, style preferences
Constraint
A behavioral constraint or guideline for the AI agent. Constraints define rules that govern the agent’s behavior and are organized by severity level in the generated prompt to communicate priority and flexibility to the model.Type Definition
Properties
The severity level of this constraint. Determines how this constraint is grouped and presented in the system prompt. Higher severity (must/must_not) indicates non-negotiable requirements, while lower severity (should/should_not) indicates preferences and recommendations.
The actual constraint rule text. Should be written as a clear, actionable guideline. Use imperative mood and be specific about the expected behavior. Avoid ambiguous language.Examples:
"Cite sources for all factual claims""Avoid technical jargon when explaining to beginners"
Usage Examples
Security Requirement
Prohibition
Recommendation
Discouraged Behavior
Best Practices
-
Be Specific: Write clear, actionable rules rather than vague guidance
- Good:
"Cite sources with URLs when making factual claims" - Bad:
"Be accurate"
- Good:
-
Use Imperative Mood: Start with action verbs
- Good:
"Validate input parameters before processing" - Bad:
"Input parameters should be validated"
- Good:
-
Choose Appropriate Severity: Match the constraint type to the requirement level
- Critical requirements →
mustormust_not - Best practices →
shouldorshould_not
- Critical requirements →
-
Avoid Ambiguity: Be explicit about expectations
- Good:
"Respond within 3 sentences for simple queries" - Bad:
"Keep responses short"
- Good: