The AI world just does not slow down. This week Google struck first with a slew of announcements coming out of their I/O event, but it was Anthropic who just stole the spotlight with their largest release in awhile.
Yesterday Anthropic released two new models, Claude Opus 4 and Claude Sonnet 4, prompt migration information, and four new API features. Video to come later this weekend, subscribe here to make sure you don’t miss it:)
Let’s dive in!
Claude Opus 4 & Sonnet 4
Claude Opus 4: Now the highest performing model from Anthropic, Opus 4 excels in complex reasoning and advanced coding tasks.
-
200k context window
-
32k max output
-
$ 15/1M input tokens
-
$ 75/1M output tokens
-
Knowledge cutoff: March 2025
-
Notably, Opus 4 can autonomously perform tasks for up to seven hours (?!?) in some cases
Interestingly, the pricing is the exact same as Opus 3. The intelligence/$ is higher, but usually newer models come in at a lower cost.
Claude Sonnet 4: An upgrade from Sonnet 3.7, Sonnet 4 is designed for general tasks, and is still very strong on coding benchmarks.
-
200k context window
-
64k max output
-
$ 3.00 / 1M input tokens
-
$ 15.00 / 1M output tokens
-
Knowledge cutoff: March 2025
Again, the pricing is the same as its predecessor, 3.5 Sonnet.
New Capabilities for AI Agents
In addition to the two new models, Anthropic also released 4 new API features, aimed specifically to make it easier to builder more powerful agents.
-
Code Execution Tool: Allows models to run Python code in a sandboxed environment, enabling tasks like data analysis and visualization. Rather than just writing code, Claude can now serve more as a data analyst.
-
MCP Connector: Connect Claude to any remote Model Context Protocol (MCP) server without writing client code. Previously, connecting to MCP servers required building your own client harness to handle MCP connections. Now, the Anthropic API handles all connection management, tool discovery, and error handling automatically. Just the MCP server URL to your API request and you’re good to go. This is a huge plus to start using Anthropic models if you’re using MCP.
-
Files API: Simplifies how you store and access documents when building with Claude. Instead of managing file uploads in every request, you can now upload documents once and reference them repeatedly across conversations. Helpful for apps that need to continually query large document sets such as knowledge bases, technical documentation, or datasets.
-
Extended Prompt Caching: Enables caching of prompts for up to one hour (up from 5-minutes).
Prompt Engineering Best Practices
Similarly to what OpenAI didn’t with their recent launch of the GPT-4.1 models, Anthropic released some prompt engineering guidance for their Claude 4 models, and how to migrate prompts previously used with other Anthropic models.
Just like you needed to migrate prompts from GPT-4 to GPT-4.1, you’ll also need to migrate prompts from Claude 3.7 to Claude 4
A lot of the guidance might seem basic, but it is still a solid foundation and it’s the type of information you can’t hear enough of.
-
Be Explicit: Clearly define your expectations to guide the model’s responses.
Less Effective: “Fix this code.”
More Effective: “Refactor this Python code to improve readability and efficiency, ensuring it adheres to PEP 8 standards.”
-
Provide Context: Explain the rationale behind your instructions to improve understanding.
Less Effective: “Summarize this article.”
More Effective: “Summarize this article on climate change, highlighting the key findings and their implications for policy makers.”
-
Use Examples: Few shot prompting helps with Claude 4 models. Use examples to show the model what you want, rather than tell it. But make sure the examples you send align with the outputs you would want, as Claude 4 generally takes things more literally.
Less Effective: “Translate this text into French.”
More Effective: “Translate this English text into French. For example, ‘Hello’ becomes ‘Bonjour’, ‘Goodbye’ becomes ‘Au revoir’, and ‘Please’ becomes ‘S’il vous plaît’.”
-
Tell the model what to do instead of what not to do:
Less Effective: “Don’t use markdown”
More Effective: “Your output should be in paragraphs”
-
XML for formatting: Claude models love XML
Less Effective: “Explain the theory of relativity.”
More Effective: “As a physics professor, explain the theory of relativity in simple terms for high school students.”
-
Prompt style should match output style: If you want your output to not have markdown, don’t include markdown in your prompt.
-
Leverage thinking capabilities: Claude 4 is great as using tools within its chain of thought, but you can take it a step further by prompting this behavior.
Example: “After receiving tool results, carefully reflect on their quality and determine optimal next steps before proceeding. Use your thinking to plan and iterate based on this new information, and then take the best next action.” -
Parallel tool calling: Claude 4 models are already trained to be efficient at callings tools in parallel, but you can increase performance even more with a little prompting.
Example: “For maximum efficiency, whenever you need to perform multiple independent operations, invoke all relevant tools simultaneously rather than sequentially.”
Prompt migration from Sonnet 3.7 to Claude 4
In a similar way that you needed to migrate prompts from GPT-4o to GPT-4.1, you’ll also need to migrate prompts from Claude 3.7 to Claude 4. Specifically:
Clarify Your Expectations: Clearly outline what you want to see in the result. Being precise about your desired output helps guide Claude’s response.
Use Modifiers to Enhance Detail: Incorporate modifiers that prompt Claude to deliver more detailed and high-quality results. For example, instead of just saying, “Create an analytics dashboard,” say, “Create a comprehensive analytics dashboard with as many relevant features and interactive elements as possible, ensuring a fully-developed implementation.”
Request Features Directly: If you need specific elements, like animations or interactivity, explicitly request them to avoid ambiguity.
Wrapping up
We’ll continue to test the new models and add support for them in PromptHub shortly. More on this soon, but shout out to Anthropic who has re-entered the chat!