C.W.K.
Stream
Lesson 08 of 11 · published

Claude Family: Constitutional AI in Practice

~10 min · claude, anthropic, alignment

Level 0Token
0 XP0/94 lessons0/10 achievements
0/120 XP to next level120 XP to go0% complete

Anthropic's Claude models are decoder-only Transformers, distinguished from competitors mostly by post-training: every Claude model is aligned with Constitutional AI rather than purely RLHF, and they emphasize tool use and computer use.

ModelContextMax outputInput/Output ($/1M)Notable
Claude 3 Haiku200K4K$0.25 / $1.25Fast, cheap, ChatGPT-Free-tier alternative
Claude 3 Opus200K4K$15 / $75Highest-capability at launch
Claude 3.5 Sonnet (2024)200K8K$3 / $15Tool use, computer use
Claude 3.5 Haiku200K8K$0.80 / $4~65 tokens/s
Claude 3.7 Sonnet200K128K$3 / $15Extended thinking; GPQA 84.8%

The 128K max-output on Claude 3.7 Sonnet enables visible chain-of-thought reasoning — the model can produce up to 128K tokens of "thinking" before its final answer. This is comparable in shape to GPT-5's thinking mode and DeepSeek-R1.

Constitutional AI

Every Claude model is post-trained with Constitutional AI: a written set of principles guides the model's self-critique during fine-tuning. Compared to pure RLHF, this scales alignment without proportionally scaling human labeling, and the principles themselves are inspectable rather than implicit.

Code

Claude with extended thinking·python
import anthropic

client = anthropic.Anthropic()
response = client.messages.create(
    model="claude-3-7-sonnet-20250219",
    max_tokens=128_000,                  # extended-thinking budget
    thinking={"type": "enabled", "budget_tokens": 80_000},
    messages=[{"role": "user", "content": "Solve: integral of x*sin(x) dx"}]
)
print(response.content)
# response.content includes a 'thinking' block + a 'text' block.
# The model 'shows its work' inside thinking, then writes the final answer.

External links

Exercise

Send the same multi-step reasoning question to Claude 3.7 Sonnet with thinking enabled and disabled. Save the 'thinking' block when enabled. Read the chain of thought — does the model 'realize and correct' wrong reasoning mid-way? Compare answer accuracy between modes.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.