This implements Anthropic's Constitutional AI training method, the two-phase approach that powers Claude's safety system. You generate responses, have the model critique itself against a constitution (set of principles), revise based on critiques, then fine-tune. The RL phase uses RLAIF where AI evaluators replace human labelers for preference data. The real win is scalable safety alignment without needing humans to label harmful outputs, though you'll need to iterate on your constitution principles to avoid overly evasive refusals. Requires meaningful compute for the RL phase (2x A100s for 7B models) since you're training both policy and reward models. Good fit if you want explainable safety decisions and have clear principles to encode.

skills.sh installs
1K
GitHub stars
14.4K
last updated
Aug 21, 2026

Install

$ npx -y skills add orchestra-research/ai-research-skills --skill constitutional-ai --agent claude-code

Installs into .claude/skills of the current project.

Files

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:

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)

Sponsors

Details

Repository
github.com/orchestra-research/ai-research-skills
Categories
AI & Agent Building, Data Science & ML
First seen
Jun 3, 2026

More from orchestra-research/ai-research-skills

All 95
1microsoft avatarskill-authoringmicrosoft/github-copilot-for-azureGuidelines for writing Agent Skills that comply with the agentskills.io specification. WHEN: \"create a skill\", \"new skill\", \"write a skill\", \"skill templ1Kskills.sh installs
2maplibre avatarmaplibre-pmtiles-patternsmaplibre/maplibre-agent-skillsServerless vector and raster tiles with PMTiles for MapLibre GL JS — single-file format, HTTP range requests, hosting on S3/R2/GitHub Pages, generating with Pla833skills.sh installs
3practicalswan avatarword-documentpracticalswan/agent-skillsWord (.docx) manipulation via MCP server. Use for reading, creating, editing, formatting Word documents including tables, footnotes, comments, images, headers, 795skills.sh installs
4github avatarflowstudio-power-automate-monitoringgithub/awesome-copilotPro+ subscription required. Tenant-wide Power Automate monitoring using the FlowStudio MCP cached store: failure rates, run-health trends, maker/app inventory, 787skills.sh installs
5github avatarflowstudio-power-automate-governancegithub/awesome-copilotGovern Power Automate flows and Power Apps at scale using the FlowStudio MCP cached store. Classify flows by business impact, detect orphaned resources, audit c779skills.sh installs
6davidkiss avatarreflectiondavidkiss/smart-ai-skillsMUST use this skill when user provides feedback / ask to do things in certain way, or when a tool call fails - for self-improvement - to learn user preferences 734skills.sh installs