Claude under the hood: architecture, reasoning, and why it's different from GPT
Anthropic's Claude sits at the top of many benchmarks. But what really sets it apart from GPT or Gemini? Let's look under the hood.
Constitutional AI: a different approach to alignment
While OpenAI primarily bets on RLHF (Reinforcement Learning from Human Feedback), Anthropic came up with the concept of Constitutional AI (CAI). The model is given a set of principles — a "constitution" — and learns to evaluate and correct itself according to these rules.
In practice, this means Claude is generally less prone to jailbreaks and more consistent in following instructions. On the other hand, it's sometimes overly cautious — it will refuse even harmless requests if it judges them to be potentially problematic.
Extended thinking: chain-of-thought on steroids
Claude Opus and Sonnet support extended thinking — before the final answer, the model goes through an explicit reasoning process. Unlike OpenAI o1/o3, where chain-of-thought is hidden, with Claude you can inspect the reasoning.
// Example: API call with extended thinking
const response = await anthropic.messages.create({
model: "claude-sonnet-4-5-20250514",
max_tokens: 16000,
thinking: {
type: "enabled",
budget_tokens: 10000
},
messages: [{ role: "user", content: "Analyze this architecture..." }]
});
Extended thinking dramatically improves results on:
- Math and logic tasks
- Code analysis and debugging
- Complex decision-making processes
- Comparing multiple solution variants
Context window: 200k tokens and why it matters
Claude offers 200,000 tokens of context — that's roughly 500 pages of text. GPT-4 Turbo has 128k, Gemini 1.5 Pro theoretically up to 2M, but with significantly degrading quality on long inputs.
The key difference isn't just the size, but the retrieval quality. In needle-in-a-haystack tests, Claude consistently finds information anywhere in the context, while other models tend to "forget" the middle.
Practical uses:
- Analysis of whole codebases (Claude Code loads the entire repo)
- Processing legal documents or contracts
- Code review with full project context
- Summarizing extensive research papers
Claude Code: AI in the terminal
One of Anthropic's most interesting products is Claude Code — a CLI tool that works directly with your code. Unlike GitHub Copilot, which completes lines, Claude Code:
- Navigates the repository and understands the project structure
- Writes, edits, and refactors files
- Runs tests and fixes bugs
- Commits and creates pull requests
- Works with MCP servers to access external tools
This site is living proof — it was generated entirely through Claude Code in a single session.
Comparison with the competition (March 2025)
| Area | Claude Sonnet | GPT-4o | Gemini 2 Pro | |--------|--------------|--------|--------------| | Code | Excellent | Very good | Good | | Long documents | Excels | Average | Good (but unstable) | | Reasoning | Strong (ext. thinking) | Strong (o3) | Average | | Multimodality | Text + images | Text + images + audio + video | Widest | | Price (1M input tokens) | $3 | $2.50 | $1.25 | | Hallucinations | Lowest | Medium | Higher |
When to use what?
- Claude — programming, document analysis, precise instructions, code review
- GPT-4o/o3 — creative writing, multimodal tasks, plugin ecosystem
- Gemini — working with large data, integration with the Google ecosystem, price
No model is universally best. The key is knowing each one's strengths and using the right tool for the job.