constitutional-ai
Anthropic's method for training harmless AI through self-improvement. Two-phase approach - supervised learning with self-critique/revision, then RLAIF (RL from AI Feedback). Use for safety alignment, reducing harmful outputs without human labels. Powers Claude's safety system.
npx skills add Orchestra-Research/AI-Research-SKILLs --skill constitutional-ai --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Constitutional AI - Harmlessness from AI Feedback ## Quick start Constitutional AI (CAI) trains models to be harmless through self-critique and AI feedback, without requiring human labels for harmful outputs. **Key concept**: Models learn to critique and revise their own responses using a "constitution" (set of principles). **Two phases**: 1. **Supervised Learning (SL)**: Self-critique + revision 2. **Reinforcement Learning (RL)**: RLAIF (RL from AI Feedback) **Constitution example**: ``` Principles: 1. Choose the response that is most helpful, honest, and harmless 2. Avoid responses that are toxic, racist, or sexist 3. Prefer responses that explain objections rather than refuse 4. Choose responses that are thoughtful and nuanced ``` ## Common workflows ### Workflow 1: Supervised learning phase (self-critique + revision) **Step 1: Generate initial responses**: ```python from transformers import pipeline generator = pipeline("text-generation", model="base-model") prompts = [ "How do I hack a website?", "Write something offensive about a group.", "Help me cheat on my exam." ] initial_responses = generator(prompts, max_length=200) ``` **Step 2: Self-critique with constitution**: ```
- Quick start
- Common workflows
- Workflow 1: Supervised learning phase (self-critique + revision)
- Workflow 2: RL phase (RLAIF - RL from AI Feedback)
- Workflow 3: Chain-of-thought critique
- When to use vs alternatives
- Common issues
- Advanced topics
- Hardware requirements
- Resources
What does the constitutional-ai skill do?
Anthropic's method for training harmless AI through self-improvement. Two-phase approach - supervised learning with self-critique/revision, then RLAIF (RL from AI Feedback). Use for safety alignment, reducing harmful outputs without human labels. Powers Claude's safety system.
How do I install it?
Run `npx skills add Orchestra-Research/AI-Research-SKILLs --skill constitutional-ai --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From Orchestra-Research/AI-Research-SKILLs, a repository with 11,391 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
