Anthropic’s AI Now Capable of Writing and Running Code

author
By Tanu Chahal

24/10/2024

cover image for the blog

Anthropic has introduced a new feature for its Claude chatbot, enabling it to write and execute JavaScript code. This advancement is part of an analysis tool designed to provide "mathematically precise and reproducible answers." Now in a preview phase, the tool allows Claude to perform tasks such as data analysis and calculations on various files, including spreadsheets and PDFs. The results are presented as interactive visualizations.

Anthropic explains that this tool functions like an integrated code sandbox. Claude can now handle complex mathematical operations, explore and clean data, and analyze it step-by-step to deliver accurate results. The tool eliminates the chatbot's previous reliance on abstract analysis, ensuring systematic data processing for more reliable outputs.

Some practical applications include a product manager using Claude to analyze sales performance by country or an engineer requesting financial data analysis to generate performance dashboards. Although Claude had attempted similar tasks before, the absence of mathematical verification sometimes led to inaccuracies.

Comparable features exist in other models, such as Google’s Gemini with its Code Execution and OpenAI’s Advanced Data Analysis, both of which enable code generation and execution. However, Anthropic’s new analysis tool is now accessible to all Claude users, making it a valuable addition to chatbot-powered data analysis. For those interested in exploring this feature, it can be activated by logging into Claude.ai.