惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Martin Fowler
Martin Fowler
Jina AI
Jina AI
J
Java Code Geeks
Microsoft Security Blog
Microsoft Security Blog
Recent Announcements
Recent Announcements
I
InfoQ
L
LangChain Blog
The Cloudflare Blog
IT之家
IT之家
博客园 - 叶小钗
Apple Machine Learning Research
Apple Machine Learning Research
B
Blog
A
About on SuperTechFans
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Last Week in AI
Last Week in AI
Blog — PlanetScale
Blog — PlanetScale
罗磊的独立博客
云风的 BLOG
云风的 BLOG
Microsoft Azure Blog
Microsoft Azure Blog
Engineering at Meta
Engineering at Meta
F
Fortinet All Blogs
博客园 - 聂微东
美团技术团队
博客园_首页

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Can Constitutional AI Make AI Safe? Here's Why I'm More O...
preeti deshmukh · 2026-06-16 · via DEV Community
Cover image for Can Constitutional AI Make AI Safe? Here's Why I'm More Optimistic

preeti deshmukh

Learning how Constitutional AI works didn't erase my concerns, but it did change how I think about them. I'm still cautious, just more optimistic than I was a year ago.


Everyone has an opinion on AI safety.

🤖 Doomers: "We're building something beyond human control."

⌨️ Boosters: "Relax, it's basically AI puberty."

📋 Constitutional AI:

"Just a reminder: I'm a list of rules written by humans, so maybe don't trust me more than humans."

😅 Meanwhile, the rest of us are just trying to get the model to return valid JSON.

Error: Unexpected token ',' at position 127

I'll be real.

Imagine you hired an intern. But instead of a 30-page HR handbook they'll never read — you sat with them, explained why certain things matter, and watched them practice until it clicked.

That's roughly what CAI does.

Anthropic gave the model a written constitution real principles sourced from things like the UN Declaration of Human Rights. Then trained it to do something unusual:

Read your own response. Does it violate a rule? Rewrite it.

That loop — generate → critique → revise runs thousands of times during training. By the time you're calling the API, the model isn't winging it. It's been through an ethics training camp.

And unlike Reinforcement Learning from Human Feedback (where crowd-sourced human raters decide what's "good"), CAI uses the AI itself as the rater guided by explicit rules. That's what makes it scalable. And that's what makes it auditable.


The Two-Phase Pipeline (Without the PhD)

Phase 1 — Supervised Learning

Prompt → Bad response → "Does this violate a principle?" → Revised response → Training data

No human labels needed. The model teaches itself using the constitution as the rubric.

Phase 2 — Reinforcement Learning from AI Feedback (RLAIF)

Two responses → AI picks the better one (using the constitution) → Trains a reward model → Final model optimized against it

Same structure as RLHF — but the labeler is an AI with a written policy, not a gig worker with a gut feeling.


What the Constitution Actually Covers

Source What it enforces
UN Declaration of Human Rights Harm avoidance, human dignity
Anthropic guidelines No violence, no deception
Honesty norms Accuracy, no hallucinated facts
Autonomy principles No preachiness, respects user judgment

This is why the model sometimes declines, adds caveats, or softens its tone mid-response — it's applying internalized versions of these rules, not running a live checklist.


What This Means When You're Actually Building

The model meets you halfway. But you have to show up first.

Your system prompt is your policy file. It's not just instructions, it's the context the model uses to apply its principles. Get it right and the model makes better calls. Leave it vague and you're back to flying blind.

# What actually works

system_prompt = "You are a customer support assistant for a B2B SaaS tool.
                 Users are authenticated business professionals.
                 Stay within product-related topics only."

# ✓ Declares intent
# ✓ Defines user context
# ✓ Scopes the task

A few more things I wish someone had told me:

  • Unexpected refusals? Your prompt probably looks like a harmful request even if it isn't. Rephrase, don't fight.
  • Sensitive domains? Declare the user role explicitly. "Users are verified medical professionals" in the system prompt changes how the model responds.
  • Agentic workflows? CAI principles apply at every step — not just the final output. Build confirmation steps for irreversible actions. The model will often ask for less permission than you grant it.

Am I Still Scared?

A little. Honestly.
I don't think that ever fully goes away and maybe it shouldn't.

But I'm not paralyzed anymore.

Because now I know the model I'm building on wasn't just trained to be smart.
It was trained to give a damn. With rules that are written down, consistently applied, and actually arguable.

That's not a small thing.
That's enough to keep going.


Go Deeper


Based on Anthropic's Constitutional AI research, published December 2022. Still the foundation of how Claude works today.