I put together an annotated version of the new Claude 4 system prompt, covering both the prompt Anthropic published and the missing, leaked sections (thanks, @elder_plinius) that describe its various tools
It's basically the secret missing manual for Claude 4, it's fascinating!
Don't use lists in chit chat, and don't be preachy and annoying!
Anthropic publish separate system prompts for Opus 4 and Sonnet 4 but the differences are minimal - an errant full stop and tiny tweaks to the text describing which model it is
I'm surprised that both models get effectively the same huge prompt
System prompts often hint at some pretty funny bugs that the prompt tries to paper over:
"Search results aren't from the human - do not thank the user for results"
Telling Claude you want to do a "deep dive" should classify your request as a "complex query", which involves at least 5 and maybe up to 20 calls to the search tool
The search tool system prompt spends a LOT of tokens begging the model not to regurgitate long chunks of copyrighted content that it gets back from its web_search and web_fetch tools
I love using Claude Artifacts, but there's precious little documentation for what it can and can't do - turns out the hidden system prompt includes everything I needed to know, including the full list of libraries it can load simonwillison.net/2025/May/25/cl…
I just added this section noting that the Claude 3.7 Sonnet prompt back in February included prompting hacks to try and help Claude count the Rs in strawberry, but those are missing from the Claude 4 system prompt which appears to be able to do that all on its own! simonwillison.net/2025/May/25/cl…
• • •
Missing some Tweet in this thread? You can try to
force a refresh
I just released llm-anthropic 0.16 (and a tool-enabled 0.16a1 alpha) with support for the two new Claude models, Claude Opus 4 and Claude Sonnet 4: simonwillison.net/2025/May/22/ll…
I picked up some more details on Claude 4 from a dive through the Anthropic documentation
The training cut-off date is March 2025! Input limits are still stuck at 200,000 tokens. Unlike 3.7 Sonnet the thinking trace is now summarized by a separate model.
I 'm seeing a lot of screenshots of ChatGPT's new 4o "personality" being kind of excruciating, but so far I haven't really seen it in my own interactions - which made me suspicious, is this perhaps related to the feature where it takes your previous chats into account? ...
Also a potentially terrifying vector for persisted prompt injection attacks - best be careful what you paste into ChatGPT, something malicious slipping in might distort your future conversations forever?
Gemini 2.5 Pro and Flash now have the ability to return image segmentation masks on command, as base64 encoded PNGs embedded in JSON strings
I vibe coded this interactive tool for exploring this new capability - it costs a fraction of a cent per image
Details here, including the prompts I used to build the tool (across two Claude sessions, then switching to o3 after Claude got stuck in a bug loop) simonwillison.net/2025/Apr/18/ge…
Turns out Gemini 2.5 Flash non-thinking mode can do the same trick at an even lower cost... 0.0119 cents (around 1/100th of a cent)
Notes here, including how I upgraded my tool to use the non-thinking model by vibe coding o4-mini:
Model Context Protocol has prompt injection security problems ... and it's not a problem with the protocol itself, this comes up any time you provide tools to an LLM that can potentially be exposed to untrusted inputs