Anthropic’s Claude Chatbot Gains New Abilities To Write And Run Code

While Claude could attempt such tasks before, its answers weren’t always fully accurate due to the lack of a system for verifying mathematical precision.

Anthropic’s Claude Chatbot Gains New Abilities To Write And Run Code
Image / AnthropicAI

Anthropic has upgraded its AI chatbot, Claude, with a new feature that allows it to write and execute JavaScript code. This enhancement, part of a new "analysis tool," enables Claude to deliver more mathematically accurate and reproducible answers, taking its data-processing capabilities to the next level.

The tool, currently in preview, allows Claude to handle tasks such as performing complex calculations and analyzing data from documents like spreadsheets and PDFs. Anthropic likens the feature to a "code sandbox," where Claude can work through intricate problems, step-by-step, to provide precise and reliable results.

Anthropic outlined various scenarios in which this tool could be useful. For instance, a product manager could upload sales data and ask Claude to generate a country-specific performance analysis, or an engineer could feed the AI monthly financial data to produce a dashboard highlighting key trends. While Claude could attempt such tasks before, its answers weren’t always fully accurate due to the lack of a system for verifying mathematical precision.

This development brings Claude in line with competitors like Google’s Gemini models, which offer a similar feature called Code Execution that allows models to write and run Python code to improve accuracy. OpenAI's flagship models also include the ability to write and execute code through a feature known as Advanced Data Analysis.

By introducing this tool, Anthropic aims to position Claude as a more powerful AI assistant capable of tackling complex data-related tasks with higher accuracy.