โ† All Techniques
๐Ÿ“œ

Constitutional AI Prompting โ€” Prompting Guide & Examples

Constitutional AI prompting defines explicit principles or rules that the AI must follow when generating and self-critiquing responses. The model generates output, then revises it against a set of 'constitutional' rules you define โ€” ensuring alignment with your values and standards.

How It Works

Define a set of principles (the 'constitution'): quality standards, ethical guidelines, brand rules, or factual requirements. The model generates a response, then self-critiques against each principle, revising any violations. This combines self-refine with explicit rule-based evaluation.

When to Use

Use constitutional prompting for content moderation, brand-aligned content generation, ethical AI applications, quality assurance, and any task where you need consistent adherence to specific standards.

Model-Specific Tips

ChatGPT / GPT-4

Define the constitution in the system prompt. GPT-4 follows constitutional constraints well. Use numbered principles for clarity.

Claude

Claude was literally trained with Constitutional AI methods. It responds exceptionally well to explicit principles and self-critique instructions.

Gemini

Gemini supports constitutional prompting. Define principles clearly and ask for self-evaluation. Gemini can rate compliance with each principle.

Pros & Cons

Pros

  • โœ“ Enforces consistent standards
  • โœ“ Self-auditing reduces review burden
  • โœ“ Scalable quality control
  • โœ“ Customizable to any domain or brand

Cons

  • โœ— Complex to set up the right principles
  • โœ— Higher token usage due to self-critique
  • โœ— Model may game its own rules
  • โœ— Requires testing to calibrate principles

Example Prompts

CONSTITUTION: 1. All claims must be verifiable 2. No superlatives without evidence 3. Acknowledge limitations honestly 4. Include actionable advice 5. Avoid jargon โ€” write for a general audience Task: Write a guide on investing in index funds. After writing, review your output against each constitutional principle. Revise any violations.

BRAND PRINCIPLES: - Tone: confident but not arrogant - Always lead with customer benefit - No competitor bashing - Include one data point per paragraph - End with clear CTA Write a landing page for our project management tool. Then audit it against each principle.

SAFETY CONSTITUTION: 1. Never provide medical diagnoses 2. Always recommend professional consultation 3. Use empathetic language 4. Don't minimize reported symptoms 5. Provide general wellness information only Respond to: 'I've had headaches every day for two weeks.' Follow the constitution strictly.

FAQ

What is Constitutional AI Prompting?
Constitutional AI prompting defines explicit principles or rules that the AI must follow when generating and self-critiquing responses. The model generates output, then revises it against a set of 'constitutional' rules you define โ€” ensuring alignment with your values and standards.
When should I use Constitutional AI Prompting?
Use constitutional prompting for content moderation, brand-aligned content generation, ethical AI applications, quality assurance, and any task where you need consistent adherence to specific standards.
How does Constitutional AI Prompting work?
Define a set of principles (the 'constitution'): quality standards, ethical guidelines, brand rules, or factual requirements. The model generates a response, then self-critiques against each principle, revising any violations. This combines self-refine with explicit rule-based evaluation.
Does Constitutional AI Prompting work with ChatGPT?
Define the constitution in the system prompt. GPT-4 follows constitutional constraints well. Use numbered principles for clarity.
Does Constitutional AI Prompting work with Claude?
Claude was literally trained with Constitutional AI methods. It responds exceptionally well to explicit principles and self-critique instructions.